From: Mark Beckwith <mark@intrig.com>
To: Jay Monkman <jtm-list-gdb@smoothsmoothie.com>
Cc: gdb@sources.redhat.com
Subject: Re: bdi2000 and gdb (newbie question)
Date: Fri, 27 Aug 2004 16:24:00 -0000 [thread overview]
Message-ID: <20040827162407.GI6632@john.intrig.com> (raw)
In-Reply-To: <20040826221713.GH14665@smoothsmoothie.com>
On Thu, Aug 26, 2004 at 05:17:13PM -0500, Jay Monkman wrote:
> On Thu, Aug 26, 2004 at 03:57:15PM -0500, Mark Beckwith wrote:
> > prompt> gdb CSB337_tst.elf
> >
> > (gdb) target remote 192.168.100.44:2001
> > Remote debugging using 192.168.100.44:2001
> > 0x00000000 in ?? ()
> >
> > // Ok, then I try to step:
> >
> > (gdb) step
> > Cannot find bounds of current function
>
> It doesn't look like you loaded your program. Here's the basic
> sequence I use
>
> # gdb
>
> (gdb) file whatever.elf
> (gdb) load
> (gdb) br main
> (gdb) continue
Ok, thanks for the tip on the load comand. Here is the sequence I use now.
I've inserted comments with //
# gdb
(gdb) file CSB337_tst.elf
Reading symbols from CSB337_tst.elf...done.
(gdb) target remote 192.168.1.93:2001
Remote debugging using 192.168.1.93:2001
0xffffffff in ?? ()
(gdb) load
Loading section .text, size 0x1dad4 lma 0x20100000
Loading section .data, size 0x12dc lma 0x2011dad4
Loading section .rodata, size 0x6596 lma 0x2011edb0
Start address 0x20100070, load size 152390
Transfer rate: 152390 bits/sec, 299 bytes/write.
(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.
(gdb) continue
Continuing.
Program received signal SIGTRAP, Trace/breakpoint trap.
<function called from gdb>
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
So it looks like my breakpoint setup is incorrect, right? I have the BDI
configured for HARD breakpoints. Is there something else I need to do?
Also, if I don't insert a breakpoint, and then just type continue, and hit
control-c a few seconds later I get:
(gdb) c
Continuing.
Program received signal SIGSTOP, Stopped (signal).
Cannot remove breakpoints because program is no longer writable.
It might be running in another process.
Further execution is probably impossible.
0x00000000 in ?? ()
My endianness is set to LITTLE.
Thanks,
Mark
>
> There are a few things to keep in mind when using the BDI-2000 with
> GDB.
> - You need to load the file before you do start trying to run it.
> - Use 'continue' not 'run' to initiate execution.
> - Make sure you have the BDI-2000 configured for the correct
> type of breakpoints.
> - (ARM specific) It is frequently good to put break points at the
> data and instruction expection vectors:
> br *0xc
> br *0x10
--
Mark Beckwith, Intrig (http://www.intrig.com)
next prev parent reply other threads:[~2004-08-27 16:24 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 [this message]
2004-08-27 17:49 ` Jay Monkman
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=20040827162407.GI6632@john.intrig.com \
--to=mark@intrig.com \
--cc=gdb@sources.redhat.com \
--cc=jtm-list-gdb@smoothsmoothie.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