From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20577 invoked by alias); 7 Dec 2005 08:03:01 -0000 Received: (qmail 20570 invoked by uid 22791); 7 Dec 2005 08:03:00 -0000 X-Spam-Check-By: sourceware.org Received: from mail.sysgo.com (HELO mail.sysgo.com) (62.8.134.5) by sourceware.org (qpsmtpd/0.31) with ESMTP; Wed, 07 Dec 2005 08:02:59 +0000 Received: from localhost (localhost [127.0.0.1]) by mail.sysgo.com (Postfix) with ESMTP id A82AFFB836; Wed, 7 Dec 2005 09:02:55 +0100 (CET) Received: from mail.sysgo.com (localhost [127.0.0.1]) by localhost (AvMailGate-2.0.2-8) id 27366-14BDF902; Wed, 07 Dec 2005 09:02:55 +0100 Received: from donald.sysgo.com (unknown [172.20.1.30]) by mail.sysgo.com (Postfix) with ESMTP id 21336FB836; Wed, 7 Dec 2005 09:02:54 +0100 (CET) Received: by donald.sysgo.com (Postfix, from userid 65534) id 4B4131C8297; Wed, 7 Dec 2005 09:02:53 +0100 (CET) Received: from cam (unknown [172.40.1.200]) by donald.sysgo.com (Postfix) with ESMTP id EEC4C1AB0F4; Wed, 7 Dec 2005 09:02:51 +0100 (CET) From: Carlos Mitidieri To: gdb@sourceware.org Subject: Re: debugging a bootloader Date: Wed, 07 Dec 2005 08:03:00 -0000 User-Agent: KMail/1.8.2 Cc: pgilliam@us.ibm.com, Daniel Jacobowitz References: <200512061501.38025.carlos.mitidieri@sysgo.com> <20051206140248.GB32659@nevyn.them.org> <200512061016.51838.pgilliam@us.ibm.com> In-Reply-To: <200512061016.51838.pgilliam@us.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200512070936.25684.carlos.mitidieri@sysgo.com> X-AntiVirus: checked by AntiVir MailGate (version: 2.0.2-8; AVE: 6.33.0.11; VDF: 6.33.0.9; host: mailgate2.sysgo.com) Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2005-12/txt/msg00073.txt.bz2 Hello all, On Tuesday 06 December 2005 19:16, Paul Gilliam wrote: > On Tuesday 06 December 2005 06:02, Daniel Jacobowitz wrote: > > On Tue, Dec 06, 2005 at 03:01:37PM +0100, Carlos Mitidieri wrote: Thank you. > > > I have a doubt on the applicability of gdb: > > > Is it possible to use gdb in connection with the accompanying simulator > > > to debug a bootloader (like u-boot) for an arm > > > Thank you very much for your attention. > > > > Probably not; you need a simulator that will provide all the hardware > > your boot loader expects. > > But you *may* be able to debug *part* of it with the simulator. > > But that's just a guess > -=# Paul #=- I have actually tried to debug u-boot with the arm-eabi-gdb target (therefore gdb-6.4) in connection with the simulator. In accord to Paul guesses, it was possible to run some part of the code. Unfortunately, the arm-eabi-gdb itself went through a seg-fault before any problem could be devised in the u-boot. I then used gdb (configured as "i586-suse-linux") to look at arm-eabi-gdb, so obtaining the following outcome: Program received signal SIGSEGV, Segmentation fault. 0x081405b8 in get_frame_pc (frame=0x0) at frame.c:1321 1321 frame.c: No such file or directory. in frame.c The steps to reproduce this are as follows: 1. Load arm-eabi-gdb in the gdb 2. Run arm-eabi.gdb 3. In arm-eabi-gdb issue the commands: 3.1. (gdb) file u-boot.elf 3.2. (gdb) target sim 3.3. (gdb) load 3.4. (gdb) break start_armboot 3.5. (gdb) run 3.6. (gdb) step repeat "step" a few times, and you get the seg-fault. If somebody would like to take a look at this, but is not willing to build all the required cross tools and bootloader, please let me know and I will happily send you the binaries. As a last remark, I have tried another versions from gdb to build the arm-eabi-gdb, and this problem appeared on every one. Also, many versions of the cross tools were tested together, with equal results. Sincerely Carl