From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9898 invoked by alias); 27 Aug 2004 17:49:56 -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 9890 invoked from network); 27 Aug 2004 17:49:54 -0000 Received: from unknown (HELO smoothsmoothie.com) (198.87.242.244) by sourceware.org with SMTP; 27 Aug 2004 17:49:54 -0000 Received: (qmail 32284 invoked by uid 1000); 27 Aug 2004 17:54:20 -0000 Date: Fri, 27 Aug 2004 17:49:00 -0000 From: Jay Monkman To: Mark Beckwith Cc: gdb@sources.redhat.com Subject: Re: bdi2000 and gdb (newbie question) Message-ID: <20040827175419.GD26065@smoothsmoothie.com> References: <20040826205715.GF6632@john.intrig.com> <20040826221713.GH14665@smoothsmoothie.com> <20040827162407.GI6632@john.intrig.com> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="w7PDEPdKQumQfZlR" Content-Disposition: inline In-Reply-To: <20040827162407.GI6632@john.intrig.com> User-Agent: Mutt/1.5.6+20040722i X-SW-Source: 2004-08/txt/msg00418.txt.bz2 --w7PDEPdKQumQfZlR Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-length: 1663 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 c= ame 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. > 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. --w7PDEPdKQumQfZlR Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature Content-Disposition: inline Content-length: 189 -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (GNU/Linux) iD8DBQFBL3VLxcGMvvluubARAstiAKCa/jMgwQI9CbkjlvqQ3ctquEOk6ACg0F7z xkqU3CPcLqxZ7HZ+XfmNKPk= =wI1X -----END PGP SIGNATURE----- --w7PDEPdKQumQfZlR--