* simulator runtime sanity checks
@ 2006-08-21 8:10 Mike Frysinger
2006-08-21 12:44 ` Daniel Jacobowitz
` (2 more replies)
0 siblings, 3 replies; 6+ messages in thread
From: Mike Frysinger @ 2006-08-21 8:10 UTC (permalink / raw)
To: gdb; +Cc: Jie Zhang
[-- Attachment #1: Type: text/plain, Size: 313 bytes --]
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
-mike
[-- Attachment #2: Type: application/pgp-signature, Size: 827 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread* Re: simulator runtime sanity checks 2006-08-21 8:10 simulator runtime sanity checks Mike Frysinger @ 2006-08-21 12:44 ` Daniel Jacobowitz 2006-08-21 17:43 ` Michael Snyder 2006-08-21 18:16 ` Mark Kettenis 2 siblings, 0 replies; 6+ messages in thread From: Daniel Jacobowitz @ 2006-08-21 12:44 UTC (permalink / raw) To: Mike Frysinger; +Cc: gdb, Jie Zhang On Mon, Aug 21, 2006 at 04:11:33AM -0400, Mike Frysinger wrote: > 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 > -mike FWIW, I think that should be an error. -- Daniel Jacobowitz CodeSourcery ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: simulator runtime sanity checks 2006-08-21 8:10 simulator runtime sanity checks 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 2 siblings, 1 reply; 6+ messages in thread From: Michael Snyder @ 2006-08-21 17:43 UTC (permalink / raw) To: Mike Frysinger; +Cc: gdb, Jie Zhang On Mon, 2006-08-21 at 04:11 -0400, Mike Frysinger wrote: > 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 You told the simulator to run, with no loaded program, and with memory basically in an un-initialized state. I'd say the behavior was not surprising. Which higher sim layer would you expect to catch this? ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: simulator runtime sanity checks 2006-08-21 17:43 ` Michael Snyder @ 2006-08-21 20:28 ` Mike Frysinger 0 siblings, 0 replies; 6+ messages in thread From: Mike Frysinger @ 2006-08-21 20:28 UTC (permalink / raw) To: Michael Snyder; +Cc: gdb, Jie Zhang [-- Attachment #1: Type: text/plain, Size: 592 bytes --] On Monday 21 August 2006 13:43, Michael Snyder wrote: > and with memory basically in an un-initialized state. exactly > I'd say the behavior was not surprising. it is and it isnt > Which higher sim layer would you expect to catch this? i'd expect the simulator to initialize itself when the target was set to "sim" and then if the user tried to run without loading a program yet, gdb would tell you it is unable to run because nothing has been loaded either that or the lower sim layers lack state checks to make sure they are in situation where they can run -mike [-- Attachment #2: Type: application/pgp-signature, Size: 827 bytes --] ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: simulator runtime sanity checks 2006-08-21 8:10 simulator runtime sanity checks Mike Frysinger 2006-08-21 12:44 ` Daniel Jacobowitz 2006-08-21 17:43 ` Michael Snyder @ 2006-08-21 18:16 ` Mark Kettenis 2006-08-21 20:28 ` Mike Frysinger 2 siblings, 1 reply; 6+ messages in thread From: Mark Kettenis @ 2006-08-21 18:16 UTC (permalink / raw) To: vapier; +Cc: gdb, jzhang918 > From: Mike Frysinger <vapier@gentoo.org> > Date: Mon, 21 Aug 2006 04:11:33 -0400 > > 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? Mark ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: simulator runtime sanity checks 2006-08-21 18:16 ` Mark Kettenis @ 2006-08-21 20:28 ` Mike Frysinger 0 siblings, 0 replies; 6+ messages in thread From: Mike Frysinger @ 2006-08-21 20:28 UTC (permalink / raw) To: Mark Kettenis; +Cc: gdb, jzhang918 [-- 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 --] ^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2006-08-21 20:28 UTC | newest] Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2006-08-21 8:10 simulator runtime sanity checks 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 is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox