This is the mail archive of the
gdb-prs@sources.redhat.com
mailing list for the GDB project.
c++/1023: setting a breakpoint on C++ member functions
- From: zeitler at lucent dot com
- To: gdb-gnats at sources dot redhat dot com
- Date: 3 Feb 2003 14:00:11 -0000
- Subject: c++/1023: setting a breakpoint on C++ member functions
- Reply-to: zeitler at lucent dot com
>Number: 1023
>Category: c++
>Synopsis: setting a breakpoint on C++ member functions
>Confidential: no
>Severity: serious
>Priority: high
>Responsible: unassigned
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Mon Feb 03 14:08:00 UTC 2003
>Closed-Date:
>Last-Modified:
>Originator: Klaus Zeitler (zeitler@lucent.com)
>Release: unknown-1.0
>Organization:
>Environment:
Solaris 5.8 and Linux SuSE 7.2
>Description:
gdb 5.0 and 5.2 both don't allow me to set breakpoints on
some member functions (generated with g++ 2.8.1 or 2.95.3)
e.g.
------------ snip ---------
class myClass
{
public:
myClass() {};
~myClass() {};
void performUnblocking( short int cell_index );
void performBlocking( int cell_index );
};
void myClass::performUnblocking( short int cell_index ) {}
void myClass::performBlocking( int cell_index ) {}
------------ snip ---------
b myClass::performUnblocking works
but myClass::performBlocking doesn't.
nm show the following names for these 2 functions:
08048500 T performBlocking__7myClassi
080484e0 T performUnblocking__7myClasss
I observe the same behavior on Solaris 5.8 and under Linux
SuSE 7.2. I know I can set a breakpoint via the mangled
names or use completion (with Tab) but we're using gdb via
another tool that sets the breakpoints
automatically with the syntax above.
I don't know if this is a g++ or a gdb problem. g++ 3.0.4
generates mangled names that look slightly different and
setting breakpoints on these functions works just fine.
00010770 T _ZN7myClass15performBlockingEi
0001075c T _ZN7myClass17performUnblockingEs
Unfortunately the set of tools we use (vxworks Tornado,
Objectime) and other project restrictions don't allow as
to simply switch to a new g++ compiler.
Is there some workaround or gdb patch for this problem?
I appreciate any help.
>How-To-Repeat:
>Fix:
>Release-Note:
>Audit-Trail:
>Unformatted: