This is the mail archive of the gdb-patches@sourceware.org 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: [PATCH 0/2] Demangler crash handler


Florian Weimer wrote:
> * Gary Benson:
> > > It would be more reliable to run the demangler in a separate
> > > process.
> >
> > Agreed.  There are two issues though.  First is performance:
> > GDB can demangle a lot of symbols--starting GDB on LibreOffice
> > demangles more than 369,000 symbols on my machine, and typing
> > "b <Tab><Tab>" demangles 2,740,000 more--so the IPC overhead
> > has to be seriously low.
> 
> Is most of the demangling of the bulk kind?  These cases are easy in
> the sense that a ping-pong between the two processes is avoidable.
> 
> More worrisome would be the occasional demangling as part of other
> tasks, where the context switches might become very visible.

It probably is bulk, though I don't know for sure.  You could probably
rearrange GDB to demangle a whole object file or CU's symbols at once.

> > > What's so difficult about fixing the demangler?
> >
> > It's not so difficult really, but fixes take time to diagnose,
> > reproduce, fix, test, review, etc.
> 
> I was referring to a more permanent fix, not just patching the bug
> of the day as users encounter it.

Ah, sorry.  The main difficulty for me is that I don't fully
understand the mangling spec.  The people who really know it backwards
are the people who wrote the libiberty demangler in the first place :)
That, and time.  This demangler work is not my main job at the moment.
It just happens that I (foolishly?) fixed a bug on it last year so now
I'm Demangler Man until someone else falls into the trap.

Cheers,
Gary

-- 
http://gbenson.net/


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