Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: Pedro Alves <palves@redhat.com>
To: Mark Manning <mark4th@gmail.com>
Cc: Sterling Augustine <saugustine@google.com>, gdb@sourceware.org
Subject: Re: back into the thread....
Date: Wed, 13 Nov 2013 10:34:00 -0000	[thread overview]
Message-ID: <528354AB.2000504@redhat.com> (raw)
In-Reply-To: <CAPGNrUV7muruJKzwLJ_eZQis3Uxy4-fRpFCKkAiPn16o18F9Nw@mail.gmail.com>

On 11/12/2013 10:54 PM, Mark Manning wrote:
> 
> Also, the "can not access addres zero" error is totally bogus, there
> is no attempted access to address zero by my code.  What i believe is
> happening is GDB is accessing some structure related to debug info for
> the code it is about to execute and the pointer it is trying to use is
> null (this is pure guesswork).
> 
> The exact address that is in question here is 0xc000 which due to my
> ye-olde C64 days is very easy to remember :).  After hitting my break
> point i jump to this address, i know the program counter is at this
> address because i can do a dump of the disassembly from $pc but
> someone somewhere is attempting to access address zero immediately
> after i single step that branch (actally a mov pc, lr).

"mov pc, lr" moves the contents of $lr to $pc.  IOW, it's a jump.
ARM has no hardware single-step support.  This means that to single-step
one instruction, GDB has to figure out where the instruction might
land (by disassembling the instruction and being aware of the instruction
set), place a breakpoint there, and then let execution continue.

It just sounds like $lr is 0, and GDB is then trying to set
the breakpoint there, which of course fails.  That would be a
bug in your code, not GDB.

-- 
Pedro Alves


      reply	other threads:[~2013-11-13 10:34 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-11-12 22:09 Mark Manning
2013-11-12 22:42 ` Sterling Augustine
2013-11-12 22:47   ` Sterling Augustine
2013-11-12 22:59     ` Mark Manning
2013-11-12 23:00       ` Mark Manning
     [not found]         ` <CAPGNrUUYWR7AOcFwTSxdEZa47E8iUJyfhzhWs+6jSc2+f4xqrg@mail.gmail.com>
2013-11-12 23:10           ` Sterling Augustine
2013-11-12 23:09     ` Mark Manning
2013-11-13  6:48     ` Phi Debian
2013-11-13 12:29       ` Mark Manning
2013-11-13 12:54         ` Phi Debian
2013-11-13 12:59           ` Mark Manning
2013-11-14 17:19             ` Arnab Bhaduri
2013-11-12 22:55   ` Mark Manning
2013-11-13 10:34     ` Pedro Alves [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=528354AB.2000504@redhat.com \
    --to=palves@redhat.com \
    --cc=gdb@sourceware.org \
    --cc=mark4th@gmail.com \
    --cc=saugustine@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