This is the mail archive of the gdb-prs@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]

[Bug gdb/15508] New: arm-eabi simulator crashes if ran with no loaded binaries


http://sourceware.org/bugzilla/show_bug.cgi?id=15508

             Bug #: 15508
           Summary: arm-eabi simulator crashes if ran with no loaded
                    binaries
           Product: gdb
           Version: HEAD
            Status: NEW
          Severity: normal
          Priority: P2
         Component: gdb
        AssignedTo: unassigned@sourceware.org
        ReportedBy: luis_gustavo@mentor.com
    Classification: Unclassified


Build gdb for arm-eabi with the simulator enabled, as follows:

CFLAGS="-g3 -O0" ../src/configure --enable-sim --target=arm-eabi

Then run the following:

./gdb -ex "target sim" -ex "run"

GNU gdb (GDB) 7.6.50.20130520-cvs
Copyright (C) 2013 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "--host=x86_64-unknown-linux-gnu --target=arm-eabi".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Connected to the simulator.
Starting program:  
warning: No executable file specified.
warning: No program loaded.
Segmentation fault (core dumped)

This is the backtrace...
Connected to the simulator.
Starting program:  
warning: No executable file specified.
warning: No program loaded.
During symbol reading, debug info gives command-line macro definition with
non-zero line 1: __STDC__ 1.

Program received signal SIGSEGV, Segmentation fault.
0x000000000069de98 in ARMul_SetPC (state=0x0, value=0) at
../../../src/sim/arm/armsupp.c:83
83      if (ARMul_MODE32BIT)
(top-gdb) bt
#0  0x000000000069de98 in ARMul_SetPC (state=0x0, value=0) at
../../../src/sim/arm/armsupp.c:83
#1  0x000000000068e607 in sim_create_inferior (sd=0x1, abfd=0x0, argv=0x0,
env=0xc1e720) at ../../../src/sim/arm/wrapper.c:249
#2  0x000000000045680f in gdbsim_create_inferior (target=0xb55120 <gdbsim_ops>,
exec_file=0x0, args=0xc34840 "", env=0xc1e720, from_tty=1)
    at ../../src/gdb/remote-sim.c:646
#3  0x0000000000574b71 in target_create_inferior (exec_file=0x0, args=0xc34840
"", env=0xc1e720, from_tty=1) at ../../src/gdb/target.c:508
#4  0x0000000000529872 in run_command_1 (args=0x0, from_tty=1,
tbreak_at_main=0) at ../../src/gdb/infcmd.c:585
#5  0x000000000052996d in run_command (args=0x0, from_tty=1) at
../../src/gdb/infcmd.c:617
#6  0x00000000004596ef in do_cfunc (c=0xbe0af0, args=0x0, from_tty=1) at
../../src/gdb/cli/cli-decode.c:113
#7  0x000000000045c813 in cmd_func (cmd=0xbe0af0, args=0x0, from_tty=1) at
../../src/gdb/cli/cli-decode.c:1888
#8  0x000000000064c305 in execute_command (p=0x7fffffffe45f "", from_tty=1) at
../../src/gdb/top.c:488
#9  0x0000000000548d66 in catch_command_errors (command=0x64c09e
<execute_command>, arg=0x7fffffffe45c "run", from_tty=1, mask=6) at
../../src/gdb/exceptions.c:573
#10 0x000000000054c6bb in captured_main (data=0x7fffffffe020) at
../../src/gdb/main.c:1031
#11 0x0000000000548c92 in catch_errors (func=0x54b584 <captured_main>,
func_args=0x7fffffffe020, errstring=0x80cd04 "", mask=6) at
../../src/gdb/exceptions.c:546
#12 0x000000000054c762 in gdb_main (args=0x7fffffffe020) at
../../src/gdb/main.c:1064
#13 0x000000000040602a in main (argc=5, argv=0x7fffffffe128) at
../../src/gdb/gdb.c:34

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.


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