[RFA 3/6] Make PSYMBOL_VALUE_ADDRESS take objfile argument

Tom Tromey tom@tromey.com
Fri Jun 1 21:03:00 GMT 2018


>>>>> "Keith" == Keith Seitz <keiths@redhat.com> writes:

Keith> Just a word of warning: ANOFFSET will assert if PSYMBOL_SECTION is
Keith> -1. [Setting that field isn't added until the last patch.] As a
Keith> result, I am seeing a lot of temporary regressions. I build with -O0,
Keith> so maybe these won't show up during a buildbot test run?

Maybe they would, and anyway it seems like bad form to rely on this
being optimized out.

Since the goal here is just to do some syntax checking maybe there is
another form that could be used, like

(0 ? 0 : (ANOFFSET ((objfile)->section_offsets, ((symbol)->pginfo.section))))

Not sure if that will trigger warnings, but I can find out.

If that doesn't work one idea would be to just drop it from the patch,
since it has done its job already.

Tom



More information about the Gdb-patches mailing list