From: Klaus Zeitler <kzeitler@lucent.com>
To: gdb@sources.redhat.com
Subject: Re: gdb needs full C++ function signature to set a breakpoint
Date: Fri, 08 Jul 2005 14:09:00 -0000 [thread overview]
Message-ID: <q5gll4h5qzb.fsf@lucent.com> (raw)
In-Reply-To: <20050707185717.GA11441@nevyn.them.org> (Daniel Jacobowitz's message of "Thu, 7 Jul 2005 14:57:17 -0400")
I figured out the difference between my small example and the big image.
For the example image gdb correctly recognizes the program as C++, i.e. says:
"The current source language is "auto; currently c++"."
whereas for the real image gdb claims, that it's c.
So a simple "set lang c++" is all that was needed.
Now I would like to know why gdb thinks that this is a c image.
Could it be that gdb decides that by searching main()?
Some time ago somebody had the clever idea to link our image with a
library for testing that contained a 2nd main() in a c file. To avoid linker
errors he made main() a weak symbol.
When I remove this 2nd main() function, the linker now finds the original
main() function in a c++ file and now gdb identifies the image as C++.
Klaus
--
------------------------------------------
| Klaus Zeitler Lucent Technologies |
| Email: kzeitler@lucent.com |
------------------------------------------
---
I have made this letter longer than usual because I lack
the time to make it shorter. -- Blaise Pascal
next prev parent reply other threads:[~2005-07-08 14:09 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-07-07 8:16 Klaus Zeitler
2005-07-07 19:21 ` Daniel Jacobowitz
2005-07-08 14:09 ` Klaus Zeitler [this message]
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=q5gll4h5qzb.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