[PATCH 1/3] Change how Python architecture and language are handled

Tom Tromey tromey@adacore.com
Mon Jan 10 21:22:16 GMT 2022


>>> -  gdbpy_enter (struct gdbarch *gdbarch, const struct language_defn *language);
>>> +  explicit gdbpy_enter (struct gdbarch *gdbarch = nullptr,
>>> +			const struct language_defn *language = nullptr);

Andrew> I know the old code was not commented, but it would be awesome if we
Andrew> could take this opportunity to add a description of what the function
Andrew> does, and what the parameters are used for.

Tom> Will do.

Some of it is documented at the 'class' level:

/* Called before entering the Python interpreter to install the
   current language and architecture to be used for Python values.
   Also set the active extension language for GDB so that SIGINT's
   are directed our way, and if necessary install the right SIGINT
   handler.  */
class gdbpy_enter

However I've added some text to the constructor as well.

Tom


More information about the Gdb-patches mailing list