This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [RFA 3/6] Make PSYMBOL_VALUE_ADDRESS take objfile argument
- From: Tom Tromey <tom at tromey dot com>
- To: Keith Seitz <keiths at redhat dot com>
- Cc: Tom Tromey <tom at tromey dot com>, gdb-patches at sourceware dot org
- Date: Fri, 01 Jun 2018 15:03:35 -0600
- Subject: Re: [RFA 3/6] Make PSYMBOL_VALUE_ADDRESS take objfile argument
- References: <20180503223621.22544-1-tom@tromey.com> <20180503223621.22544-4-tom@tromey.com> <1a874bc2-1a4d-3dd5-4718-10b93d5d2868@redhat.com>
>>>>> "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