[RFA 3/6] Make PSYMBOL_VALUE_ADDRESS take objfile argument

Simon Marchi simon.marchi@polymtl.ca
Tue Jun 5 20:50:00 GMT 2018


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



More information about the Gdb-patches mailing list