Bug 13417 - linespecs dont' accept operator<
Summary: linespecs dont' accept operator<
Status: RESOLVED FIXED
Alias: None
Product: gdb
Classification: Unclassified
Component: c++ (show other bugs)
Version: unknown
: P2 normal
Target Milestone: 7.5
Assignee: Keith Seitz
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-11-17 19:01 UTC by Tom Tromey
Modified: 2012-05-22 00:52 UTC (History)
1 user (show)

See Also:
Host:
Target:
Build:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Tom Tromey 2011-11-17 19:01:20 UTC
I ran a script to generate all the symbols from a C++ library:

nm --demangle libwebkitgtk-1.0.so.0.7.2.debug | sed -n 's/^.* [tT] \(.*\)$/break \1/p' > /tmp/L

Then I sourced this script into gdb.  It failed like:

/tmp/L:4187: Error in sourced command file:
malformed template specification in command

This line says:

break JSC::operator<(JSC::UString const&, JSC::UString const&)

linespec is trying to match the end of the template here, but it
doesn't recognize that this is in fact not a template.
Comment 1 Tom Tromey 2011-11-18 14:06:13 UTC
Also affects

break WebCore::TextStream::operator<<(char const*)
Comment 2 Keith Seitz 2012-03-20 22:51:01 UTC
The pending linespec rewrite fixes this. From archer-keiths-linespec-rewrite:

(gdb) break JSC::operator<(JSC::UString const&, JSC::UString const&)
Breakpoint 1 at 0x13c4490: file Source/JavaScriptCore/wtf/RefPtr.h, line 68.
(gdb) break WebCore::TextStream::operator<<(char const*)
Breakpoint 2 at 0xb255f0: file Source/WebCore/platform/text/TextStream.cpp, line 86.
(gdb) inf br
Num     Type           Disp Enb Address            What
1       breakpoint     keep y   0x00000000013c4490 in JSC::operator<(JSC::UString const&, JSC::UString const&) at Source/JavaScriptCore/wtf/RefPtr.h:68
2       breakpoint     keep y   0x0000000000b255f0 in WebCore::TextStream::operator<<(char const*) at Source/WebCore/platform/text/TextStream.cpp:86
Comment 3 Tom Tromey 2012-05-22 00:52:54 UTC
Fixed.