Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: Jean Christophe Beyler <jean.christophe.beyler@gmail.com>
To: Jean Christophe Beyler <jean.christophe.beyler@gmail.com>,
	 	Paul Pluzhnikov <ppluzhnikov@google.com>,
	David Daney <ddaney@caviumnetworks.com>,
	gdb@sourceware.org
Subject: Re: GDB interactions with GCC
Date: Tue, 03 Nov 2009 18:09:00 -0000	[thread overview]
Message-ID: <c568a2600911031009i32df7512v9dbaa5d049934a1b@mail.gmail.com> (raw)
In-Reply-To: <20091103180127.GA7855@caradoc.them.org>

That is what I noticed as well. So you have confirmed that if we want
to retain that information, it needs to be stored on the stack even if
the optimization levels are used.

Thanks,
Jc

On Tue, Nov 3, 2009 at 1:01 PM, Daniel Jacobowitz <drow@false.org> wrote:
> On Tue, Nov 03, 2009 at 12:54:54PM -0500, Jean Christophe Beyler wrote:
>> On my architecture, I can have the code for foo reduced to :
>>
>> add FirstInputRegister, FirstInputRegister, 1
>> call bar
>> branch return.
>>
>> Therefore, once I'm in bar, the input register that foo had has been
>> lost since it's been incremented. The original value of a has been
>> lost since it is not in a particular register, was not spilled.
>>
>> In this case, how does GDB handle it ?
>
> GDB will report that the value is not available.  If you compile
> without optimization, GCC will generally save it in a stack slot, and
> the value will be available.
>
> --
> Daniel Jacobowitz
> CodeSourcery
>


  reply	other threads:[~2009-11-03 18:09 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-11-02 22:44 Jean Christophe Beyler
2009-11-02 23:16 ` David Daney
2009-11-03 17:22   ` Jean Christophe Beyler
2009-11-03 17:38     ` Paul Pluzhnikov
2009-11-03 17:55       ` Jean Christophe Beyler
2009-11-03 18:01         ` Daniel Jacobowitz
2009-11-03 18:09           ` Jean Christophe Beyler [this message]
2009-11-03 18:14             ` 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=c568a2600911031009i32df7512v9dbaa5d049934a1b@mail.gmail.com \
    --to=jean.christophe.beyler@gmail.com \
    --cc=ddaney@caviumnetworks.com \
    --cc=gdb@sourceware.org \
    --cc=ppluzhnikov@google.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