This is the mail archive of the gdb-patches@sources.redhat.com 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]

Re: Fear and loathing in lookup_block_symbol


> We can't copy the old code's style exactly.  SYMBOL_MATCHES_NAME calls strcmp_iw() on the demangled names (to ignore whitespace), but strcmp_iw is poorly named; it doesn't give you a less-than greater-than return value like strcmp().  It'd be better termed streq_iw() or something unlike strcmp().  But we can make vast improvements without digging into this problem by changing the code to something like:

I'd consider a change to fix strcmp_iw() semantics so that it more 
correctlu resembles strcmp(), to be an obvious fix.

as for streq(), we're trying to kill off those STREQ() macro's so this 
could confuse things :-)

andrew



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