Community
Participate
Working Groups
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.
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.
Created attachment 25517 [details] C++ test case
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.