sparc gdb broken

Joel Sherrill joel.sherrill at OARcorp.com
Mon Sep 7 14:15:10 UTC 2009


Ralf Corsepius wrote:
> On 09/07/2009 01:57 AM, Joel Sherrill wrote:
>   
>> psim works on powerpc-rtems4.10-gdb.
>>
>> $ rpm -qf /opt/rtems-4.10/bin/powerpc-rtems4.10-gdb
>> rtems-4.10-powerpc-rtems4.10-gdb-6.8.50.20090902-2.fc10.i386
>>
>> So this appears to be sis specific.
>> --joel
>>
>> Joel Sherrill wrote:
>>     
>>> Hi,
>>>
>>> I am not sure what broke or how to debug it but
>>> sparc-rtems4.10-gdb core dumps when you run something.
>>>
>>> This is definitely why we need to test pre-releases. :)
>>>
>>> $ rpm -qf /opt/rtems-4.10/bin/sparc-rtems4.10-gdb
>>> rtems-4.10-sparc-rtems4.10-gdb-6.8.50.20090902-2.fc10.i386
>>>
>>> (gdb) tar sim
>>> Connected to the simulator.
>>> (gdb) load
>>> (gdb) r
>>> Starting program:
>>> /home/joel/rtems-4.10-work/build/gcc-testing/rtems/build-sparc-sis-rtems/sparc-rtems4.10/c/sis/testsuites/samples/ticker/ticker.exe
>>>
>>> Segmentation fault
>>>       
>
> FWIW: I can't reproduce it - gdb doesn't segfault for me. It actually 
> doen't seem to be doing anything (no output from ticker itself).
>
>   
That is what it does when I run sparc-rtems4.10-gdb under gdb.
I end up having to kill it all from another window.  But when I
let it fail and dump core, this is the backtrace:

Core was generated by `sparc-rtems4.10-gdb ticker.exe'.
Program terminated with signal 11, Segmentation fault.
[New process 3552]
#0  0x080b941b in init_regcache_descr (gdbarch=0x89690a0)
    at ../../gdb-6.8.50.20090902/gdb/regcache.c:132
132        descr->sizeof_register[i] = TYPE_LENGTH 
(descr->register_type[i]);
(gdb) bt
#0  0x080b941b in init_regcache_descr (gdbarch=0x89690a0)
    at ../../gdb-6.8.50.20090902/gdb/regcache.c:132
#1  0x081071be in gdbarch_data (gdbarch=0x89690a0, data=0x88fe3e8)
    at ../../gdb-6.8.50.20090902/gdb/gdbarch.c:3526
#2  0x080bac40 in regcache_descr ()
    at ../../gdb-6.8.50.20090902/gdb/regcache.c:154
#3  regcache_xmalloc (gdbarch=0x41)
    at ../../gdb-6.8.50.20090902/gdb/regcache.c:215
#4  0x080bad65 in get_thread_arch_regcache (ptid=
      {pid = 42000, lwp = 0, tid = 42000}, gdbarch=0x89690a0)
    at ../../gdb-6.8.50.20090902/gdb/regcache.c:438
#5  0x080bae51 in get_thread_regcache (ptid=
      {pid = 42000, lwp = 0, tid = 42000})
    at ../../gdb-6.8.50.20090902/gdb/regcache.c:462
#6  0x080bae85 in get_current_regcache ()
    at ../../gdb-6.8.50.20090902/gdb/regcache.c:468
#7  0x080eea7e in post_create_inferior (target=0x8820c80, from_tty=0)
    at ../../gdb-6.8.50.20090902/gdb/infcmd.c:396
#8  0x080ef408 in run_command_1 (args=0x0, from_tty=1,
    tbreak_at_main=<value optimized out>)
    at ../../gdb-6.8.50.20090902/gdb/infcmd.c:574
#9  0x08055ac0 in execute_command (p=0x88ee841 "", from_tty=1)
    at ../../gdb-6.8.50.20090902/gdb/top.c:453
#10 0x08103e88 in command_handler (command=0x88ee840 "")
    at ../../gdb-6.8.50.20090902/gdb/event-top.c:511
#11 0x08104b92 in command_line_handler (rl=0x89ac348 "")
    at ../../gdb-6.8.50.20090902/gdb/event-top.c:735
#12 0x009d2507 in rl_callback_read_char () at ../callback.c:205
#13 0x08103fab in rl_callback_read_char_wrapper (client_data=0x0)
    at ../../gdb-6.8.50.20090902/gdb/event-top.c:178
#14 0x08103524 in handle_file_event (data={ptr = 0x0, integer = 0})
    at ../../gdb-6.8.50.20090902/gdb/event-loop.c:812
#15 0x08102d2b in process_event ()
    at ../../gdb-6.8.50.20090902/gdb/event-loop.c:394
#16 0x08103b84 in gdb_do_one_event (data=0x0)
    at ../../gdb-6.8.50.20090902/gdb/event-loop.c:459
#17 0x080fe47b in catch_errors (func=0x8103930 <gdb_do_one_event>,
    func_args=0x0, errstring=0x8233de9 "", mask=6)
    at ../../gdb-6.8.50.20090902/gdb/exceptions.c:510
#18 0x08091e3a in tui_command_loop (data=0x0)
    at ../../gdb-6.8.50.20090902/gdb/tui/tui-interp.c:153
#19 0x080feaf4 in current_interp_command_loop ()
    at ../../gdb-6.8.50.20090902/gdb/interps.c:291
#20 0x0804dbcb in captured_command_loop (data=0x0)
    at ../../gdb-6.8.50.20090902/gdb/main.c:226
#21 0x080fe47b in catch_errors (func=0x804dbc0 <captured_command_loop>,
---Type <return> to continue, or q <return> to quit---q
func_argQuit
(gdb) q

I am going to post this to the gdb list also.  Maybe someone
there has more insight based upon the backtrace.
>>> I will try a couple of the other simulators in gdb now
>>> to see how they work.
>>>
>>> Suggestions on debugging this welcomed.
>>>       
>
> *-rtems4.10-gdb's are ordinary host application.
> => The standard means of debugging are supposed to be used:
> * core dump analysis (ulimit -c; gdb /opt/rtems-4.10/bin/gdb core*),
> * strace
> * gdb'ing sparc-rtems4.10-gdb
> etc.
>
> Specific to Fedora (likely also works on CentOS 5):
>
> Pulling in debugging symbols for installed applications/libraries:
> # yum --enablerepo=rtems4.10-debuginfo install \
>    rtems-4.10-sparc-rtems4.10-debuginfo
>
> or
>
> # debuginfo-install rtems-4.10-sparc-rtems4.10-gdb
>
>   
Thanks.
> Ralf
>   




More information about the users mailing list