Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: Klaus Zeitler <kzeitler@lucent.com>
To: gdb@sources.redhat.com
Subject: gdb needs full C++ function signature to set a breakpoint
Date: Thu, 07 Jul 2005 08:16:00 -0000	[thread overview]
Message-ID: <q5g4qb76nga.fsf@lucent.com> (raw)

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.


             reply	other threads:[~2005-07-07  8:16 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-07-07  8:16 Klaus Zeitler [this message]
2005-07-07 19:21 ` Daniel Jacobowitz
2005-07-08 14:09   ` Klaus Zeitler
2005-07-08 14:19     ` Daniel Jacobowitz

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=q5g4qb76nga.fsf@lucent.com \
    --to=kzeitler@lucent.com \
    --cc=gdb@sources.redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox