From: Orjan Friberg <orjan.friberg@axis.com>
To: gdb-patches@sources.redhat.com
Subject: Function argument no longer in register
Date: Mon, 29 Mar 2004 14:21:00 -0000 [thread overview]
Message-ID: <406830DF.10109@axis.com> (raw)
Hi all,
What should happen when a function argument goes out of scope because
the register used to pass it is now used for something else? I
encountered the following situation:
foo (char *str)
{
...
i = bar ();
...
}
The str argument is passed in register r10, which is then overwritten
with the return value from bar. If I stop somewhere after the call to
bar and try to "print str", GDB will try to read from the address
pointed out by r10 (i.e. sends an 'm' packet to the remote stub).
I don't know what kind of problem I'm looking at here. Could it be that
the debug information is wrong? I'm guessing GDB somehow fails to
realize that the function argument is out of scope at this point.
--
Orjan Friberg
Axis Communications
next reply other threads:[~2004-03-29 14:21 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-03-29 14:21 Orjan Friberg [this message]
2004-03-29 14:25 ` Daniel Jacobowitz
2004-03-29 14:44 ` Orjan Friberg
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=406830DF.10109@axis.com \
--to=orjan.friberg@axis.com \
--cc=gdb-patches@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