Article View: gnu.gdb.bug
Article #555Re: Trouble setting breakpoints in g++ member fn's
From: Fred Fish
Date: Sat, 12 Dec 1992 16:00
Date: Sat, 12 Dec 1992 16:00
51 lines
2206 bytes
2206 bytes
In article <1992Dec11.133649.25642@e2big.mko.dec.com> yon@cbm.dec.com writes:
>I try that (using both just <TAB> and C-c <TAB>), and I get "[no match]" on the
>latter. I've also tried forcing "language" to be "c++".
The time optimization put in symtab.c to avoid doing unnecessary demanglings
is broken. This patch will fix things so that completion works again, but
it will have probably have noticable effects on gdb's speed, particularly
with large executables. You may want to try it though.
-Fred
*** /export/home/work/devo.ref/gdb/symtab.c Thu Dec 10 09:38:22 1992
--- symtab.c Fri Dec 11 18:43:37 1992
***************
*** 2499,2507 ****
--- 2499,2512 ----
/* clip symbols that cannot match */
+ #if 0
+ /* This is broken. For example, if text="bob:", for class bob, then
+ symnames like "__3bobi" (bob's constructor), or "doug__3bobi" (a
+ function doug in class bob) will be rejected. -fnf */
if (!cplus_match (symname, text, text_len)) {
return;
}
+ #endif
/* matches mangled, may match unmangled. now clip any symbol names
that we've already considered. (This is a time optimization) */
***************
*** 2523,2528 ****
--- 2528,2540 ----
symname = demangled;
} else {
+ #if 1
+ /* The symbol is not a mangled C++ symbol, thus it is a potential
+ match only if it's leading substring matches text in text_len
+ characters. */
+ if (strncmp (symname, text, text_len) != 0)
+ return;
+ #endif
symname = savestring (symname, strlen (symname));
}
--
|\/ o\ Fred Fish, 1835 E. Belmont Drive, Tempe, AZ 85284, USA
|/\__/ 1-602-491-0048 {asuvax,mcdphx,cygint,amix}!fishpond!fnf
Technical Details
Message-ID:
<Bz5LtK.LEs@fishpond.uucp>Path:
arc1-ca.pugleaf.net!sparky!uunet!cis.ohio-state.edu!cygnus.com!fnfReferences:
<1992Dec11.133649.25642@e2big.mko.dec.com>Show Full Headers
Complete Article Headers
Newsgroups: gnu.gdb.bug Path: arc1-ca.pugleaf.net!sparky!uunet!cis.ohio-state.edu!cygnus.com!fnf From: fnf@cygnus.com (Fred Fish) Subject: Re: Trouble setting breakpoints in g++ member fn's Message-ID: <Bz5LtK.LEs@fishpond.uucp> Sender: gnulists@ai.mit.edu Organization: Amiga Library Distribution Services References: <1992Dec11.133649.25642@e2big.mko.dec.com> Distribution: gnu Date: Sat, 12 Dec 1992 16:00:55 GMT Approved: bug-gdb@prep.ai.mit.edu Lines: 52