Fixed
Created: Jun 19, 2016
Updated: Dec 3, 2018
Resolved Date: Dec 4, 2016
Found In Version: 8.0
Fix Version: 8.0.0.12
Severity: Standard
Applicable for: Wind River Linux 8
Component/s: Toolchain
Using backtrace is a common way to give a printout trace a faulty state. On ARM this does not give a good backtrace especially when using pthreads.
On ARM:
Obtained 6 stack frames.
./bt_loop2(print_trace+0x20) [0x89a8]
./bt_loop2() [0x8af4]
/lib/libc.so.6() [0x46a4fba0]
/lib/libc.so.6() [0x46a40d16]
/lib/libc.so.6(gsignal+0x25) [0x46a4ef8e]
/lib/libc.so.6(abort+0xef) [0x46a51860]
On x86 (native compiler):
Obtained 9 stack frames.
./out/native/bt_loop2(print_trace+0x19) [0x400c36]
./out/native/bt_loop2() [0x400d3d]
/lib/x86_64-linux-gnu/libc.so.6(+0x36c30) [0x7fb9c75fbc30]
/lib/x86_64-linux-gnu/libc.so.6(gsignal+0x39) [0x7fb9c75fbbb9]
/lib/x86_64-linux-gnu/libc.so.6(abort+0x148) [0x7fb9c75fefc8]
./out/native/bt_loop2(dummy_function+0x41) [0x400cf8]
./out/native/bt_loop2(main+0xb6) [0x400df5]
/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf5) [0x7fb9c75e6ec5]
./out/native/bt_loop2() [0x400b59]
Compile options for ARM:
CC=arm-wrs-linux-gnueabi-gcc -march=armv7-a -marm -mthumb-interwork -mfloat-abi=softfp -mfpu=neon -tthumb2-v7-a-neon --sysroot=/RCS/wrl6/example/getrelease/out/axm5516/wrlinux_600/sdk-20140820/sysroots/armv7a-vfp-neon-wrs-linux-gnueabi -g -rdynamic -funwind-tables -mapcs-frame -fno-omit-frame-pointer
Compile options for x86:
gcc -g -rdynamic
do_configure_append_arm () {
# Forward port the patch applied to WRL6 to enable backtrace from abort()
echo "CFLAGS-abort.c = -funwind-tables" >> ${B}/configparms
echo "CFLAGS-raise.c = -funwind-tables" >> ${B}/configparms
}
./bt_loop2 -a
and
./bt_loop2_pthread -a