This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [RFA 3/6] Make PSYMBOL_VALUE_ADDRESS take objfile argument


On 2018-06-01 17:03, Tom Tromey wrote:
"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

Or change these macros to be functions :). Types will be properly checked even though the parameter is unused.

Simon


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]