Bug 105247 - Setting Toggle Method Breakpoint does not work on methods other than constructors and destructors
Summary: Setting Toggle Method Breakpoint does not work on methods other than construc...
Status: NEW
Alias: None
Product: CDT
Classification: Tools
Component: cdt-debug (show other bugs)
Version: 3.0   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: cdt-debug-inbox@eclipse.org CLA
QA Contact: Jonah Graham CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-07-26 19:54 EDT by Joanne Woo CLA
Modified: 2020-09-04 15:24 EDT (History)
0 users

See Also:


Attachments
C++ test case (4.81 KB, text/plain)
2005-08-01 14:30 EDT, Joanne Woo CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Joanne Woo CLA 2005-07-26 19:54:24 EDT
The fix for 100992 enables setting constructor and destructor breakpoints using
Toggle Method Breakpoint.  This menu item is still not working for setting
breakpoints in all other methods.

A workaround is to use Toggle Breakpoint for those methods.
Comment 1 Joanne Woo CLA 2005-08-01 14:24:03 EDT
I tested setting breakpoints with the attached test case using gdb in the
command line and here's what I found:

b 'String::size() const'    (quotes and const are required)

b 'String::read(int) const' (quotes and const required)

b String::write(int, char) (quotes are optional here)

In the case of overloaded methods, gdb is supposed to give you a list of
choices.  So, if you entered:

b String::String

gdb is supposed to give you the list of constructors to choose from, including
an option to cancel and another option 'all' to set brealpoint on all of them.
gdb 5.3post-0.20021129.18rh on RedHat 9.0 return this:
(gdb) b String::String
[0] cancel
[1] all
[2] String at string_example.cpp:109
[3] String at string_example.cpp:109
[4] String at string_example.cpp:109
>

gdb 6.3 returned this:
(gdb) b String::String
[0] cancel
[1] all
?HERE
?HERE
?HERE
>

neither of which is correct.

b 'String::String<Esc-?
gave me this list of optiosn:
String::String()               String::String(char const*)
String::String(String const&)


So, to set a breakpoint at String::String(const String&), the correct syntax is:
b String::String(String const&)

For String::String(const char* s), it's
b String::String(char const*)

For the operator methods:
b 'String::operator<Esc-?
return this list:
String::operator=(String const&)  String::operator[](int)
String::operator=(char const*)    String::operator[](int) const

Pretty confusing but this does work.
Comment 2 Joanne Woo CLA 2005-08-01 14:30:22 EDT
Created attachment 25517 [details]
C++ test case
Comment 3 Joanne Woo CLA 2005-08-01 14:31:17 EDT
In CDT 2.1.1, setting method breakpoints using Toggle Breakpoint in the Outline
view works fine on non-constructors and non-destructor methods. This is only
broken in CDT 3.0 but there's a workaround so this doesn't have to be fixed
urgently.