Re: back into the thread....
Pedro Alves <[email protected]>
| Newsgroups | gmane.comp.gdb.devel |
|---|---|
| Message-ID | <[email protected]> |
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