NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

lib/49445: gdb can't "run" programs on BE8 arm



>Number:         49445
>Category:       lib
>Synopsis:       gdb can't "run" programs on BE8 arm
>Confidential:   no
>Severity:       critical
>Priority:       high
>Responsible:    lib-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed Dec 03 08:30:00 +0000 2014
>Originator:     Martin Husemann
>Release:        NetBSD 7.99.2
>Organization:
The NetBSD Foundation, Inc.
>Environment:
System: NetBSD space-truckin.duskware.de 7.99.2 NetBSD 7.99.2 (CUBIETRUCK) #117: Tue Dec 2 14:49:39 CET 2014 martin%night-owl.duskware.de@localhost:/usr/src/sys/arch/evbarm/compile/CUBIETRUCK evbarm
Architecture: earmv7hfeb
Machine: evbarm
>Description:

Debugging live processes on ARM BE8 machines via gdb's "run" command does
not work. Attaching to live processes via gdb -p however works.

>How-To-Repeat:

cc -Wall -O0 -g hello.c
gdb ./a.out
(gdb) run
Starting program: /tmp/a.out 

Program received signal SIGSEGV, Segmentation fault.
_rtld_objlist_clear (list=0x0) at /usr/src/libexec/ld.elf_so/rtld.c:1504
1504            while (!SIMPLEQ_EMPTY(list)) {
(gdb) bt
#0  _rtld_objlist_clear (list=0x0) at /usr/src/libexec/ld.elf_so/rtld.c:1504
#1  0x400255e0 in _rtld (sp=<optimized out>, relocbase=<optimized out>)
    at /usr/src/libexec/ld.elf_so/rtld.c:750
(gdb) x/16i $pc
=> 0x400221f8 <_rtld_objlist_clear+12>: ldr     r3, [r0]
   0x400221fc <_rtld_objlist_clear+16>: mov     r4, r0
   0x40022200 <_rtld_objlist_clear+20>: cmp     r3, #0
   0x40022204 <_rtld_objlist_clear+24>: ldmeq   sp, {r3, r4, r11, sp, pc}
   0x40022208 <_rtld_objlist_clear+28>: mov     r0, r3
   0x4002220c <_rtld_objlist_clear+32>: ldr     r3, [r3]
   0x40022210 <_rtld_objlist_clear+36>: cmp     r3, #0
   0x40022214 <_rtld_objlist_clear+40>: streq   r4, [r4, #4]
   0x40022218 <_rtld_objlist_clear+44>: str     r3, [r4]
   0x4002221c <_rtld_objlist_clear+48>: bl      0x400276c4 <xfree>
(gdb) info reg
r0             0x0      0
r1             0x0      0
r2             0x0      0
r3             0x0      0
r4             0x7fffcc60       2147470432
r5             0x1      1
r6             0x40048008       1074036744
r7             0x0      0
r8             0x7fffcca0       2147470496
r9             0x20a34  133684
r10            0x0      0
r11            0x7fffcc2c       2147470380
r12            0x7fffcc30       2147470384
sp             0x7fffcc18       0x7fffcc18
lr             0x400255e0       1073894880
pc             0x400221f8       0x400221f8 <_rtld_objlist_clear+12>
cpsr           0x400d0210       1074594320


>Fix:

n/a



Home | Main Index | Thread Index | Old Index