From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20694 invoked by alias); 27 Aug 2004 16:24:11 -0000 Mailing-List: contact gdb-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sources.redhat.com Received: (qmail 20674 invoked from network); 27 Aug 2004 16:24:09 -0000 Received: from unknown (HELO intrig.com) (66.160.152.62) by sourceware.org with SMTP; 27 Aug 2004 16:24:09 -0000 Received: from mail.intrig.com ([66.169.138.168]) by intrig.com for ; Fri, 27 Aug 2004 09:24:05 -0700 Received: by mail.intrig.com (sSMTP sendmail emulation); Fri, 27 Aug 2004 11:24:07 -0500 Date: Fri, 27 Aug 2004 16:24:00 -0000 From: Mark Beckwith To: Jay Monkman Cc: gdb@sources.redhat.com Subject: Re: bdi2000 and gdb (newbie question) Message-ID: <20040827162407.GI6632@john.intrig.com> References: <20040826205715.GF6632@john.intrig.com> <20040826221713.GH14665@smoothsmoothie.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20040826221713.GH14665@smoothsmoothie.com> User-Agent: Mutt/1.4.1i X-SW-Source: 2004-08/txt/msg00416.txt.bz2 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. 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)