[PATCH v2] Add gdb.Architecture.integer_type Python function

Tom Tromey tromey@adacore.com
Tue Oct 26 17:26:08 GMT 2021


>>>>> "Tom" == Tom Tromey <tromey@adacore.com> writes:

Tom> +/* Implementation of gdb.integer_type.  */
Tom> +static PyObject *
Tom> +archpy_integer_type (PyObject *self, PyObject *args, PyObject *kw)
Tom> +{
Tom> +  static const char *keywords[] = { "size", "signed", NULL };
Tom> +  int size, is_signed = 1;
Tom> +
Tom> +  if (!gdb_PyArg_ParseTupleAndKeywords (args, kw, "i|p", keywords,
Tom> +					&size, &is_signed))
Tom> +    return nullptr;
Tom> +
Tom> +  const struct builtin_type *builtins = builtin_type (python_gdbarch);

I realized later that I needed to update this to use the 'self' architecture.
I've made this change locally.

Tom


More information about the Gdb-patches mailing list