Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: Mike Frysinger <vapier@gentoo.org>
To: Mark Kettenis <mark.kettenis@xs4all.nl>
Cc: gdb@sourceware.org,  jzhang918@gmail.com
Subject: Re: simulator runtime sanity checks
Date: Mon, 21 Aug 2006 20:28:00 -0000	[thread overview]
Message-ID: <200608211600.36514.vapier@gentoo.org> (raw)
In-Reply-To: <200608211816.k7LIGgJ6021973@elgar.sibelius.xs4all.nl>

[-- Attachment #1: Type: text/plain, Size: 3797 bytes --]

On Monday 21 August 2006 14:16, Mark Kettenis wrote:
> From: Mike Frysinger <vapier@gentoo.org>
> >
> > is this expected behavior ?  or should the higher sim layers catch this ?
> >
> > happens with latest cvs HEAD and arm-elf-gdb as well ...
> >
> > $ bfin-elf-gdb
> > (gdb) target sim
> > Connected to the simulator.
> > (gdb) run
> > Starting program:
> > warning: No executable file specified.
> > warning: No program loaded.
> > Segmentation fault
>
> Is that gdb or the (nonexisting) program that crashes?

gdb ... the higher sim layers call down into the lower layers to interpret 
code and the low layers fall apart ...

bfin-elf crashes in the sim/bfin/ parts, here's the bt for arm-elf:
$ gdb ./gdb
Using host libthread_db library "/lib/libthread_db.so.1".
(top-gdb) r
Starting program: /usr/local/src/gnu/sourceware/build/gdb/gdb 
GNU gdb 6.5.50.20060821-cvs
Copyright (C) 2006 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "--host=x86_64-unknown-linux-gnu --target=arm-elf".
(gdb) target sim
Connected to the simulator.
(gdb) r
Starting program:  
warning: No executable file specified.
warning: No program loaded.

Program received signal SIGSEGV, Segmentation fault.
bfd_get_mach (abfd=0x0) at ../../bfd/archures.c:797
797     {
(top-gdb) bt
#0  bfd_get_mach (abfd=0x0) at ../../bfd/archures.c:797
#1  0x0000000000520879 in sim_create_inferior (sd=<value optimized out>, 
abfd=0x0, argv=0x0, env=0x7fec80)
    at ../../../sim/arm/wrapper.c:252
#2  0x0000000000427c98 in gdbsim_create_inferior (exec_file=0x0, 
args=0x849d10 "", env=0x7fec80, 
    from_tty=<value optimized out>) at ../../gdb/remote-sim.c:469
#3  0x000000000047a842 in run_command_1 (args=0x0, from_tty=1, 
tbreak_at_main=<value optimized out>)
    at ../../gdb/infcmd.c:546
#4  0x000000000040b6ed in execute_command (p=0x7cd481 "", from_tty=1) 
at ../../gdb/top.c:455
#5  0x000000000048a377 in command_handler (command=0x7cd480 "") 
at ../../gdb/event-top.c:516
#6  0x000000000048b018 in command_line_handler (rl=<value optimized out>) 
at ../../gdb/event-top.c:801
#7  0x000000000055502a in rl_callback_read_char () 
at ../../readline/callback.c:204
#8  0x000000000048a529 in rl_callback_read_char_wrapper (client_data=0x0) 
at ../../gdb/event-top.c:179
#9  0x000000000048929f in process_event () at ../../gdb/event-loop.c:343
#10 0x0000000000489a96 in gdb_do_one_event (data=<value optimized out>) 
at ../../gdb/event-loop.c:380
#11 0x0000000000486a4b in catch_errors (func=0x4899b0 <gdb_do_one_event>, 
func_args=0x0, errstring=0x5b7e1f "", 
    mask=<value optimized out>) at ../../gdb/exceptions.c:515
#12 0x00000000004393d6 in tui_command_loop (data=<value optimized out>) 
at ../../gdb/tui/tui-interp.c:151
#13 0x0000000000405119 in captured_command_loop (data=0x0) 
at ../../gdb/main.c:101
#14 0x0000000000486a4b in catch_errors (func=0x405110 <captured_command_loop>, 
func_args=0x0, errstring=0x5b7e1f "", 
    mask=<value optimized out>) at ../../gdb/exceptions.c:515
#15 0x0000000000405779 in captured_main (data=<value optimized out>) 
at ../../gdb/main.c:826
#16 0x0000000000486a4b in catch_errors (func=0x405150 <captured_main>, 
func_args=0x76ac0ea2f4d0, errstring=0x5b7e1f "", 
    mask=<value optimized out>) at ../../gdb/exceptions.c:515
#17 0x0000000000405104 in gdb_main (args=0x0) at ../../gdb/main.c:835
#18 0x00000000004050d6 in main (argc=<value optimized out>, argv=0x0) 
at ../../gdb/gdb.c:35
(top-gdb)
-mike
-mike

[-- Attachment #2: Type: application/pgp-signature, Size: 827 bytes --]

      reply	other threads:[~2006-08-21 20:28 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-08-21  8:10 Mike Frysinger
2006-08-21 12:44 ` Daniel Jacobowitz
2006-08-21 17:43 ` Michael Snyder
2006-08-21 20:28   ` Mike Frysinger
2006-08-21 18:16 ` Mark Kettenis
2006-08-21 20:28   ` Mike Frysinger [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=200608211600.36514.vapier@gentoo.org \
    --to=vapier@gentoo.org \
    --cc=gdb@sourceware.org \
    --cc=jzhang918@gmail.com \
    --cc=mark.kettenis@xs4all.nl \
    /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