From: Daniel Jacobowitz <drow@false.org>
To: Steven Johnson <sjohnson@neurizon.net>
Cc: gdb@sources.redhat.com
Subject: Re: GDB and ARM Frame Pointer strangeness
Date: Tue, 08 Jun 2004 04:29:00 -0000 [thread overview]
Message-ID: <20040608042936.GA7514@nevyn.them.org> (raw)
In-Reply-To: <40C53F70.8030101@neurizon.net>
On Tue, Jun 08, 2004 at 02:24:16PM +1000, Steven Johnson wrote:
> This is all well and good, but at the beginning of the world, when the
> target is not yet properly initialised, the frame is corrupt.
> Dereferencing R11 (on an ARM) and then looking at that Memory is BAD.
> R11 at the beginning of the world doesnt contain anything valid.
It is the responsibility of the stub to be robust against bad reads, in
general. Most stubs manage this without trouble.
> This seems to be a worse problem (to me) than the one supposedly solved
> by the piece of code here. I would have thought it would only need to
> do this if:
> 1. The frame was valid. AND
> 2. You modify a frame register OR
> 3. You modify any memory within the current Frame.
GDB has no concept of "valid" in the sense that you're using it.
"There is always a frame" - if we're connected to a target that has
registers and memory, it has a frame.
If your stub is going to fall down like this I recommend having the
stub initialize registers to point to memory that won't trap when read.
--
Daniel Jacobowitz
next prev parent reply other threads:[~2004-06-08 4:29 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-06-07 8:50 Steven Johnson
2004-06-08 4:25 ` Steven Johnson
2004-06-08 4:29 ` Daniel Jacobowitz [this message]
2004-06-08 5:02 ` Steven Johnson
2004-06-08 12:26 ` Mark Salter
2004-06-08 23:47 ` Steven Johnson
2004-06-09 15:14 ` Andrew Cagney
2004-06-10 0:06 ` Steven Johnson
2004-06-10 2:20 ` Ian Lance Taylor
2004-06-10 4:37 ` Steven Johnson
2004-06-10 5:10 ` Ian Lance Taylor
2004-06-10 7:16 ` Steven Johnson
2004-06-10 21:32 ` Andrew Cagney
2004-06-11 0:46 ` Steven Johnson
2004-06-11 15:33 ` Andrew Cagney
2004-06-10 9:03 ` Richard Earnshaw
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=20040608042936.GA7514@nevyn.them.org \
--to=drow@false.org \
--cc=gdb@sources.redhat.com \
--cc=sjohnson@neurizon.net \
/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