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] Introduce notion of "search name"


> I have to say, I think our allocation rules are hairy enough already.
> If there is some better solution on the horizon for lazy demangling's
> allocation, I am relucantant to put in complex and slow mechanisms,
> even temporarily.  It's a step backwards, justified by work that isn't
> even scheduled.
>
> Paul, how critical is this to the intent of your change?  I haven't
> reviewed it.

Sorry, I'm not sure what that pesky pronoun "this" refers to here.
The complex allocation is the one that goes symbol->bfd
section->bfd->objfile.  It is not critical at all; I use it only on
the general principle that we try to allocate names things on
obstacks.  I have a simple fallback that just uses a hash table on
malloced symbols on the theory that the set of demangled names does
not generally change over a GDB session (unless, of course, you are in
the habit of running 'file' on many different executables in one
session or completely rewriting your program before reloading it into
GDB), so that one would gain little storage saving from using an
obstack anyway.  Using just that fallback (at least until we come up
with a better way of getting to an appropriate obstack) would simplify
my code.

Paul


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