Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: Jay Monkman <jtm-list-gdb@smoothsmoothie.com>
To: Mark Beckwith <mark@intrig.com>
Cc: gdb@sources.redhat.com
Subject: Re: bdi2000 and gdb (newbie question)
Date: Fri, 27 Aug 2004 17:49:00 -0000	[thread overview]
Message-ID: <20040827175419.GD26065@smoothsmoothie.com> (raw)
In-Reply-To: <20040827162407.GI6632@john.intrig.com>

[-- Attachment #1: Type: text/plain, Size: 1706 bytes --]

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 #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

  reply	other threads:[~2004-08-27 17:49 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-08-26 20:57 Mark Beckwith
2004-08-26 21:06 ` Daniel Jacobowitz
2004-08-26 22:12 ` Jay Monkman
2004-08-27 16:24   ` Mark Beckwith
2004-08-27 17:49     ` Jay Monkman [this message]
2004-09-01 16:18       ` Mark Beckwith
2004-09-01 18:53         ` Jay Monkman
2004-09-01 21:00           ` Mark Beckwith
2004-08-27  6:59 ` Fabian Cenedese

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=20040827175419.GD26065@smoothsmoothie.com \
    --to=jtm-list-gdb@smoothsmoothie.com \
    --cc=gdb@sources.redhat.com \
    --cc=mark@intrig.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