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]
Other format: [Raw text]

Re: RFA/symtab: (Almost) always hash blocks when searching them


On Sun, Feb 09, 2003 at 05:03:21PM -0500, Daniel Jacobowitz wrote:
> I'm working on modifying the symbol lookup functions to return multiple
> symbols when there are multiple possible matches, and I didn't want to have
> to modify all three kinds of binary search in lookup_block_symbol.  First I
> tried fixing mdebugread.c to generate hashed blocks properly; it was too
> messy, and I couldn't build an mdebug toolchain to test with [mips-ecoff was
> my best guess, and it's been broken for months.  Part of it was my fault and
> then GCC started segfaulting after I fixed that].
> 
> So instead, I added a new function to hash a block retroactively.  Then, in
> lookup_block_symbol, where we would previously have done a binary search we
> instead hash the block and do a hash table search.  Amortized cost is
> somewhat lower, complexity cost is much lower.  I like it.
> 
> I also updated the comments; the bit about not matching demangled names was
> out of date.  Symbols are hashed by their demangled name, if any.
> 
> Is this patch OK?

Never mind for now.  I'm solving my problem in a different way, and I
didn't notice the constness issue with this patch before I posted it.

-- 
Daniel Jacobowitz
MontaVista Software                         Debian GNU/Linux Developer


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