[PATCH 4/9] gdb: remove LA_VALUE_PRINT macro

Tom Tromey tom@tromey.com
Tue Oct 20 20:06:23 GMT 2020


Andrew> In theory, when we are inside (for example) the
Andrew> ada_language::print_array_index function the current_language should
Andrew> always be set to Ada, so this change should have no effect.  However,
Andrew> if we ever could get into ada_language::print_array_index with the
Andrew> current language set to something else (which I think would have been
Andrew> a bug) then we would now see a change in behaviour.  I couldn't find
Andrew> any cases where this happened though.

I suspect this particular case was just for uniformity.

In the C value-printing code, though, sometimes calls are indirected via
the current language because other languages call into the C
implementation.

There's nothing sacred about that, though, and it's always been a bit ugly.
Cleaning it up as is done in this patch seems like a plus to me.

Tom


More information about the Gdb-patches mailing list