[ELDK] ELDK 5.2 and backtrace on ARM Kirkwood not working
Detlev Zundel
dzu at denx.de
Tue Jul 3 16:25:44 CEST 2012
Hi Andreas,
> we use glibc's backtrace function to gather some information when our
> software crashes.
>
> (see http://www.kernel.org/doc/man-pages/online/pages/man3/backtrace.3.html)
>
> The program at the bottom of the man page produces the expected result
> for ELDK 4.2. But for ELDK 5.2 it does not work any more:
>
> ELDK 4.2:
> $ gcc -rdynamic -o prog prog.c
> $ ./prog 3
> backtrace() returned 7 addresses
> ./prog(puts+0x100) [0x8544]
> ./prog(puts+0x1bc) [0x8600]
> ./prog(backtrace_symbols+0x248) [0x8644]
> ./prog(backtrace_symbols+0x240) [0x863c]
> ./prog(backtrace_symbols+0x240) [0x863c]
> ./prog(backtrace_symbols+0x2c0) [0x86bc]
> /lib/libc.so.6(__libc_start_main+0x1ac) [0x400a2a5c]
>
> ELDK 5.2:
> $ gcc -rdynamic -o prog prog.c
> $ ./prog 3
> backtrace() returned 0 addresses
>
>
> Trying different compiler flags did not help (-O0,
> -fno-omit-frame-pointer, -g, ...). Maybe I missed the important one
> for this problem.
>
> Has anybody an idea what goes wrong?
Try adding "-funwind-tables" to CFLAGS.
Cheers
Detlev
--
WARNING: The external boundaries of India as depicted in map(s) are neither
correct nor authentic. Other external boundaries as depicted in the map(s)
may neither be correct nor authentic.
-- Garmin MapSource manual
--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-40 Fax: (+49)-8142-66989-80 Email: dzu at denx.de
More information about the eldk
mailing list