FYI: minor simplification in add_psymbol_to_bcache
Tom Tromey
tromey@redhat.com
Wed Nov 4 19:16:00 GMT 2009
>>>>> "Daniel" == Daniel Jacobowitz <drow@false.org> writes:
Tom> First, it removes the gratuitous use of a 'static' local variable.
Daniel> It adds a memset... if you assume that this is a hot function, then it
Daniel> was probably avoided on purpose. On the other hand, the way it's
Daniel> implemented is quite dodgy; there will be bogus padding if
Daniel> sizeof (long) != sizeof (CORE_ADDR) and you alternate adding symbols
Daniel> with VAL and COREADDR set.
TBH I was not thinking too soundly, I suppose, when I nuked this. I
think your point is a good one. If you'd prefer, I will leave this
static and just zero out that field.
Tom
More information about the Gdb-patches
mailing list