[PATCH 4/4] gdb/python: move styling support to gdb.styling

Tom Tromey tom@tromey.com
Wed Oct 27 20:39:58 GMT 2021


>>>>> "Andrew" == Andrew Burgess <andrew.burgess@embecosm.com> writes:

Andrew> This commit moves the two Python functions that are used for styling
Andrew> into a new module, gdb.styling, there's then a small update in
Andrew> python.c so GDB can find the functions in their new location.

Looks reasonable to me.

Andrew> Still, despite these functions never having been part of a documented
Andrew> API, it is possible that a user out there has overridden these to, in
Andrew> some way, customize how GDB performs styling.  Moving the function as
Andrew> I propose in this patch could break things for that user, however,
Andrew> fixing this breakage is trivial, and, as these functions were never
Andrew> documented, I don't think we should be obliged to not break user code
Andrew> that relies on them.

I agree, we should only be constrained to the documented API.

Tom


More information about the Gdb-patches mailing list