This is the mail archive of the gdb@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

gdb needs full C++ function signature to set a breakpoint


Hello,
I'm debugging a program with automatically generated C++ code (hundreds of
classes with lots of ugly looking, but unique, i.e. not overloaded member
functions). When I try to set a breakpoint on such a C++ member function name
gdb always says: "The class ... does not have any method named ...".

For example using the following function:
aMOTxAmp_Actor::choicePoint28_checkAST(SPD<MODCInvokeActionReq, SP<MODCBase> > const*, prMOAccess::Conjugate*)
(that gets mangled to
_ZN14aMOTxAmp_Actor22choicePoint28_checkASTEPK3SPDI19MODCInvokeActionReq2SPI8MODCBaseEEPN10prMOAccess9ConjugateE)
gdb says:
(gdb) b aMOTxAmp_Actor::choicePoint28_checkAST
the class aMOTxAmp_Actor does not have any method named choicePoint28_checkAST
Hint: try 'aMOTxAmp_Actor::choicePoint28_checkAST<TAB> or 'aMOTxAmp_Actor::choicePoint28_checkAST<ESC-?>

Thus I always need to have these function names expanded with '...<tab>'.
That's not very convenient but ok as long as I don't want to set breakpoints
via .gdbinit (in the latter case I use the mangled names).

Now what puzzles me is, that when I reduce my 100MB image to a small example
with only one or two of these weird functions, gdb is able to set the
breakpoint in the example above.
BTW I've checked that in both cases 'nm <image> | grep choicePoint28_checkAST'
returns exactly one (and the same) match.

Thanks

Klaus

-- 
 ------------------------------------------
|  Klaus Zeitler      Lucent Technologies  |
|  Email:             kzeitler@lucent.com  |
 ------------------------------------------
---
The only problem with being a man of leisure
is that you can never stop and take a rest.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]