This is the mail archive of the gdb@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: simulator runtime sanity checks


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: pgp00000.pgp
Description: PGP signature


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]