public inbox for gdb@sourceware.org
 help / color / mirror / Atom feed
From: Daniel Jacobowitz <drow@false.org>
To: Klaus Zeitler <kzeitler@lucent.com>
Cc: gdb@sources.redhat.com
Subject: Re: gdb needs full C++ function signature to set a breakpoint
Date: Fri, 08 Jul 2005 14:19:00 -0000	[thread overview]
Message-ID: <20050708141853.GA17776@nevyn.them.org> (raw)
In-Reply-To: <q5gll4h5qzb.fsf@lucent.com>

On Fri, Jul 08, 2005 at 04:09:44PM +0200, Klaus Zeitler wrote:
> 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()?

GDB does not have a single impression of the language - it depends on
the current location in the code.  But yes, before the program is
started, the current "location" used is main().

This is a wart; it'd be nice if the CLI did not depend on this for some
things that it does presently, but it isn't clear how to fix it.

-- 
Daniel Jacobowitz
CodeSourcery, LLC

      reply	other threads:[~2005-07-08 14:19 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
2005-07-08 14:19     ` Daniel Jacobowitz [this message]

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=20050708141853.GA17776@nevyn.them.org \
    --to=drow@false.org \
    --cc=gdb@sources.redhat.com \
    --cc=kzeitler@lucent.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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).