Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: Carlos Mitidieri <carlos.mitidieri@sysgo.com>
To: gdb@sourceware.org
Cc: pgilliam@us.ibm.com, Daniel Jacobowitz <drow@false.org>
Subject: Re: debugging a bootloader
Date: Wed, 07 Dec 2005 08:03:00 -0000	[thread overview]
Message-ID: <200512070936.25684.carlos.mitidieri@sysgo.com> (raw)
In-Reply-To: <200512061016.51838.pgilliam@us.ibm.com>

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


      parent reply	other threads:[~2005-12-07  8:03 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-12-06 13:29 Carlos Mitidieri
2005-12-06 14:02 ` Daniel Jacobowitz
2005-12-06 17:45   ` Paul Gilliam
2005-12-07  2:35     ` Jim Blandy
2005-12-07  8:05       ` Carlos Mitidieri
2005-12-07  8:03     ` Carlos Mitidieri [this message]

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=200512070936.25684.carlos.mitidieri@sysgo.com \
    --to=carlos.mitidieri@sysgo.com \
    --cc=drow@false.org \
    --cc=gdb@sourceware.org \
    --cc=pgilliam@us.ibm.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