This is the mail archive of the gdb@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: bdi2000 and gdb (newbie question)


On Fri, Aug 27, 2004 at 11:24:07AM -0500, Mark Beckwith wrote:
> (gdb) br main
> Note: breakpoint -2 also set at pc 0x2011beac. // don't know where this came from
> Breakpoint 1 at 0x2011beac: file main.c, line 45.

That seems odd. Maybe it's an artifact of using HW breakpoints, but I
don't think so.

> Program received signal SIGTRAP, Trace/breakpoint trap.
> <function called from gdb>

What is the PC when you get here? (It will probably be off by 8 bytes
from the next instruction to be executed.) My guess is that the CPU
ended up running through the weeds.

It looks like you have a problem in your program between your entry
point (0x20110070) and main(). Maybe instead of putting your break
point at main(), put it earlier or even start single-stepping from
your program's entry point.

Are you running from RAM or some kind of ROM? If you are running from
RAM, you'll probably be better off using SW breakpoints. Since the
ARM920 only has 1 HW breakpoint, it limits your ability to debug.

Based on the addressess, it looks like you are running from SDRAM. Are
you initializing it before loading the program (like in the BDI-2000's
config file)?





> Current language:  auto; currently asm
> (gdb) next
>     // here, there is a very long pause here, then:
> Warning:
> Cannot insert breakpoint 0.
> Error accessing memory address 0xdead: Unknown error 4294967295.
>     // the bdi console also outputs:
> # TARGET: all hardware breakpoints in use

This is because you've got a breakpoint at main() and using 'next'
causes gdb to insert a breakpoint for the next line of code. The
ARM920 only has one HW breakpoint, and you are trying to use two.

Attachment: signature.asc
Description: Digital signature


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]