This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
Re: back into the thread....
- From: Pedro Alves <palves at redhat dot com>
- To: Mark Manning <mark4th at gmail dot com>
- Cc: Sterling Augustine <saugustine at google dot com>, gdb at sourceware dot org
- Date: Wed, 13 Nov 2013 10:30:03 +0000
- Subject: Re: back into the thread....
- Authentication-results: sourceware.org; auth=none
- References: <CAPGNrUX7TA-4eCrrP=sD9G6oNe5Kw=eWPm_jm-D7=9ZTz-v6BA at mail dot gmail dot com> <CAEG7qUx69s2cdp4XY3cGtAakDQAoSrGnbhgvvLxUzZG+rJKC_g at mail dot gmail dot com> <CAPGNrUV7muruJKzwLJ_eZQis3Uxy4-fRpFCKkAiPn16o18F9Nw at mail dot gmail dot 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