This is the mail archive of the
gdb-prs@sourceware.org
mailing list for the GDB project.
[Bug c++/12266] Typedefs are not expanded to their base types inbreakpoint definitions
- From: "anonyme_uprh at hotmail dot com" <sourceware-bugzilla at sourceware dot org>
- To: gdb-prs at sourceware dot org
- Date: Fri, 18 Feb 2011 10:26:58 +0000
- Subject: [Bug c++/12266] Typedefs are not expanded to their base types inbreakpoint definitions
- Auto-submitted: auto-generated
- References: <bug-12266-4717@http.sourceware.org/bugzilla/>
http://sourceware.org/bugzilla/show_bug.cgi?id=12266
--- Comment #4 from Martin SchrÃder <anonyme_uprh at hotmail dot com> 2011-02-18 10:26:53 UTC ---
Hello Keith,
I've just tried the patchset you've linked to. I've applied it against the
snapshot gdb-7.2.50.20110218.
Unfortunately, it still doesn't work right. I start the debugger for my test
case and issue the following commands:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
(gdb) break calltest(foo)
Function "calltest(foo)" not defined.
Make breakpoint pending on future shared library load? (y or [n]) n
(gdb) break calltest(std::string)
Function "calltest(std::string)" not defined.
Make breakpoint pending on future shared library load? (y or [n]) n
(gdb) break calltest(string)
Function "calltest(string)" not defined.
Make breakpoint pending on future shared library load? (y or [n]) n
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Then, I try to register the breakpoint with the fully expanded typedef:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
(gdb) break calltest(std::basic_string<char, std::char_traits<char>,
std::allocator<char> >)
Breakpoint 1 at 0x4013c3: file typedef.c, line 5.
(gdb) inf br
Num Type Disp Enb Address What
1 breakpoint keep y 0x004013c3 in calltest(foo) at typedef.c:5
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
As you can see, using the exanded type works. Afterwards, I tried the above
three commands again:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
(gdb) break calltest(foo)
Note: breakpoint 1 also set at pc 0x4013c3.
Breakpoint 2 at 0x4013c3: file typedef.c, line 5.
(gdb) break calltest(std::string)
Function "calltest(std::string)" not defined.
Make breakpoint pending on future shared library load? (y or [n]) n
(gdb) break calltest(string)
Function "calltest(string)" not defined.
Make breakpoint pending on future shared library load? (y or [n]) n
(gdb) inf br
Num Type Disp Enb Address What
1 breakpoint keep y 0x004013c3 in calltest(foo) at typedef.c:5
2 breakpoint keep y 0x004013c3 in calltest(foo) at typedef.c:5
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
As you can see, now the root of the typedef-chain (foo) works, but not its
first expansion to std::string.
So, the bug still exists. Before you register any breakpoints, execute any
actions or start the program, only the leaf of the typedef-chain (the full type
expansion) works.
After an action, the root and leaf work, but none of the intermediate stages
do.
So, I guess that even though 11734 & 12273 might be fixed, my error seems to
persist.
Of course, I might have misapplied your diff, so just to be on the safe side,
I've added a diff from the gdb-7.2.50.20110218 snapshot to your patchset.
--
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.