[PATCH] sim: unify symbol table handling
Trevor Saunders
tbsaunde@tbsaunde.org
Mon Aug 15 14:21:00 GMT 2016
On Mon, Aug 15, 2016 at 10:22:04AM +0100, Nick Clifton wrote:
> Hi Mike,
>
> > Nick: can you double check the aarch64 & msp430 changes ?
> > And see if in general this makes sense to you ?
>
> Sure.
>
> > diff --git a/sim/aarch64/interp.c b/sim/aarch64/interp.c
> > [...]
> > /* Filter out (in place) symbols that are useless for disassembly.
> > COUNT is the number of elements in SYMBOLS.
> > Return the number of useful symbols. */
> >
> > -static unsigned long
> > -remove_useless_symbols (asymbol **symbols, unsigned long count)
> > +static long
> > +remove_useless_symbols (asymbol **symbols, long count)
>
> I understand the change to a signed long, but personally I consider
> it a mistake. The number of symbols is always going to be a positive
> value, and the need for an error value could easily be handled using
> -1U instead of -1L. But the problem is endemic to the BFD library's
> symbol handling code, so I guess that it will have to stay. *sigh*
or can we convert sim to C++ and use maybe<unsigned long> ? ;)
Trev
More information about the Gdb-patches
mailing list