Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: Richard Earnshaw <Richard.Earnshaw@arm.com>
To: Steven Johnson <sjohnson@neurizon.net>
Cc: Ian Lance Taylor <ian@wasabisystems.com>, gdb@sources.redhat.com
Subject: Re: GDB and ARM Frame Pointer strangeness
Date: Thu, 10 Jun 2004 09:03:00 -0000	[thread overview]
Message-ID: <1086858165.27704.31.camel@pc960.cambridge.arm.com> (raw)
In-Reply-To: <40C7E59F.8080400@neurizon.net>

On Thu, 2004-06-10 at 05:37, Steven Johnson wrote:
> OK, Ill break it down.
> 1. We are not using a stub running on our target.
> 2. We are using the ARM7TDMI JTAG DEBUG Interface, in the context of 
> "stub" we have a program running on a PC that translates the GDB Remote 
> Serial Protocol into ARM JTAG Debug Commands.
> 
> The exact reason why the target is crashing is obscure, we are using a 
> SOC, and there arent any real bus state pins one can probe to determine 
> the CPU state, and on recovery into a mode where we can inspect things 
> again, everything is reset.  The best information we have at the moment 
> is, if we access an invalid (unmapped) memory location the processor 
> enters a state, which we have not been able to recover from without a 
> hardware reset.  Our current guess is it goes into an infinite bus cycle 
> waiting for the memory to respond.  The chip does have Memory Mapped IO 
> that can wait indefinately on the state of an external XWAIT pin.  But 
> what we know for sure, is that immedialtely after reset, a read to an 
> invalid memory address crashes the processor, and the only way we have 
> found to recover is a hard reset.

I suspect the easiest thing to do here is to emulate the memory aborts. 
The way to do this is to construct a virtual memory map in the stub that
describes the valid regions of memory.  Then *every* memory access by
the debugger is checked against the map by the stub which then simulates
an abort if the address isn't valid.  It's a bit slower than having the
hardware do it, but it should make things much more robust.  The number
of entry points in the stub that access memory is quite limited, so it
shouldn't be too much work to track them down.

R.


      parent reply	other threads:[~2004-06-10  9:03 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
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 [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=1086858165.27704.31.camel@pc960.cambridge.arm.com \
    --to=richard.earnshaw@arm.com \
    --cc=gdb@sources.redhat.com \
    --cc=ian@wasabisystems.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