From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19668 invoked by alias); 10 Apr 2003 06:08:53 -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 19654 invoked from network); 10 Apr 2003 06:08:52 -0000 Received: from unknown (HELO baradas.org) (66.166.225.55) by sources.redhat.com with SMTP; 10 Apr 2003 06:08:52 -0000 Received: by baradas.org (Postfix, from userid 500) id 46F9998990; Thu, 10 Apr 2003 02:08:49 -0400 (EDT) From: Peter Barada To: Jan.Vermeulen@siemens.com Cc: pbarada@mail.wm.sps.mot.com, gdb@sources.redhat.com In-reply-to: <57FD2C3A246F76438CA6FDAD8FE9F19597E9D6@hrtades7.atea.be> (message from Vermeulen Jan on Thu, 10 Apr 2003 08:02:52 +0200) Subject: Re: How to build application to run under the ppc simulator? References: <57FD2C3A246F76438CA6FDAD8FE9F19597E9D6@hrtades7.atea.be> Message-Id: <20030410060849.46F9998990@baradas.org> Date: Thu, 10 Apr 2003 06:08:00 -0000 X-SW-Source: 2003-04/txt/msg00093.txt.bz2 >> I can't stepi from the start, I have to run it. How(actually, >> *where*) can I set a breakpoint at the *first* instruction so I can >> *then* stepi? > >If your only function is 'foo', why not try "break foo" at the gdb command? > >I just tried it out (same example as you) and it works. I can stepi in the >program and see that it jumps to 0x0 after the 'blr' instruction at the end >of 'foo' where it segfaults. Yeah, I figured out that I can break at main, but I'm trying to figure out why: (gdb) tar sim Connected to the simulator. (gdb) load (gdb) p $pc $1 = 0 (gdb) x/i 0x0 0x0: Cannot access memory at address 0x0 (gdb) So the simulater starts out at 0x0 which doesn't make sense. Where does gdb change its mind and figure out where to start? BTW, how do I use the 'built-in' serial port in the ppc simulator? -- Peter Barada peter@baradas.org