From mboxrd@z Thu Jan 1 00:00:00 1970 From: Michael Snyder To: Daniel Berlin Cc: Jim Blandy , gdb-patches@sources.redhat.com Subject: Re: [RFA]: Fix partial symbol lookups Date: Wed, 15 Nov 2000 08:56:00 -0000 Message-id: <3A12C01A.659A@redhat.com> References: X-SW-Source: 2000-11/msg00172.html Daniel Berlin wrote: > Correct. > But this never worked since 1994 anyway, since psymbols have no > demangled name in them. > :) Good catch! I too remember the comments that imply that mangled names are in there, and have assumed they were true. > > I also corrected lookup_partial_symbol to binary search the global > table, regardless of language, since this is the part that had led me > to believe it had demangled names in it in the first place. Are you SURE that NO language puts mangled names in? If so, then this should be a big improvement. > Since we > only have a sorted list of mangled names in the global list, there is > no reason to linear search it, ever. > Statics still aren't sorted, so we linear search those. Hmmm -- so why not sort the statics? >From Peter.Schauer@regent.e-technik.tu-muenchen.de Wed Nov 15 10:17:00 2000 From: "Peter.Schauer" To: msnyder@redhat.com (Michael Snyder) Cc: dberlin@redhat.com, jimb@cygnus.com, gdb-patches@sources.redhat.com, ezannoni@cygnus.com Subject: Re: [RFA]: Fix partial symbol lookups Date: Wed, 15 Nov 2000 10:17:00 -0000 Message-id: <200011151817.TAA05077@reisser.regent.e-technik.tu-muenchen.de> References: <3A12C01A.659A@redhat.com> X-SW-Source: 2000-11/msg00173.html Content-length: 1616 > Daniel Berlin wrote: > > > Correct. > > But this never worked since 1994 anyway, since psymbols have no > > demangled name in them. > > :) > > Good catch! I too remember the comments that imply that > mangled names are in there, and have assumed they were true. They were not true from 1994 - Dec 1998 and I should be blamed that I didn't remove the code and comment when I removed the demangling of partial symbols back in 1994, my sincere apologies. > > I also corrected lookup_partial_symbol to binary search the global > > table, regardless of language, since this is the part that had led me > > to believe it had demangled names in it in the first place. > > Are you SURE that NO language puts mangled names in? > If so, then this should be a big improvement. I just double checked once again. add_psymbol_to_list (which is used by most symbol readers) calls SYMBOL_INIT_LANGUAGE_SPECIFIC (&psymbol, language), which sets the demangled name to NULL. But wait, the HP patches reintroduced the demangling of partial symbols for their symbol reader (look for add_psymbol_with_dem_name_to_list). This is really bad, as GDB now has to cope with the presence and non-presence of demangling in partial symbols. I'd be very reluctant to reintroduce the demangling of partial symbols for all other symbol readers, instead someone should fix the HP reader to not need the demangling of partial symbols. I am now afraid that we have to back out all 2000-10-12 Dan Berlin changes, to get a reliably working (and perhaps sometimes slower) GDB again. -- Peter Schauer pes@regent.e-technik.tu-muenchen.de >From dberlin@redhat.com Wed Nov 15 10:43:00 2000 From: Daniel Berlin To: Michael Snyder Cc: Jim Blandy , gdb-patches@sources.redhat.com Subject: Re: [RFA]: Fix partial symbol lookups Date: Wed, 15 Nov 2000 10:43:00 -0000 Message-id: References: <3A12C01A.659A@redhat.com> X-SW-Source: 2000-11/msg00174.html Content-length: 1753 Michael Snyder writes: > Daniel Berlin wrote: > > > Correct. > > But this never worked since 1994 anyway, since psymbols have no > > demangled name in them. > > :) > > Good catch! I too remember the comments that imply that > mangled names are in there, and have assumed they were true. Mangled names are, demangled names aren't. I think that's what you meant, I mix up the terms all the time. I thought the same thing, until Peter pointed out I was wrong. :) > > > > > I also corrected lookup_partial_symbol to binary search the global > > table, regardless of language, since this is the part that had led me > > to believe it had demangled names in it in the first place. > > Are you SURE that NO language puts mangled names in? You mean demangled, and yes, i'm positive. Sat Oct 8 04:27:21 1994 Peter Schauer (pes@regent.e-technik.tu-muenchen.de) Speed up GDB startup time by not demangling partial symbols. * symfile.h (ADD_PSYMBOL_VT_TO_LIST), symfile.c (add_psymbol_to_list, add_psymbol_addr_to_list): No longer demangle partial symbols. * symtab.c (lookup_symbol, list_symbols): Handle mangled variables, e.g. C++ static members, via the minimal symbols. Since this happened, the only calls to SYMBOL_INIT_DEMANGLED_NAME is in the symreaders, and only occur on full symbols. > If so, then this should be a big improvement. Yup. > > > Since we > > only have a sorted list of mangled names in the global list, there is > > no reason to linear search it, ever. > > Statics still aren't sorted, so we linear search those. > > Hmmm -- so why not sort the statics? Usually there aren't enough to matter, I believe. I think that was the reasoning, anyway. --Dan