summaryrefslogtreecommitdiff
path: root/meta
diff options
context:
space:
mode:
authorYuanjie Huang <yuanjie.huang@windriver.com>2016-12-09 11:49:34 -0600
committerRichard Purdie <richard.purdie@linuxfoundation.org>2017-01-11 11:46:52 +0000
commitb0e6a6048fa09dceac78bf8c46d484690ff5b098 (patch)
treee4cf650d735f7f1154313dd283298a60bde47af2 /meta
parent5a19335f0f1d763a066a8c9ead23bb332e229f93 (diff)
downloadopenembedded-core-b0e6a6048fa09dceac78bf8c46d484690ff5b098.tar.gz
openembedded-core-b0e6a6048fa09dceac78bf8c46d484690ff5b098.tar.bz2
openembedded-core-b0e6a6048fa09dceac78bf8c46d484690ff5b098.zip
glibc: Enable backtrace from abort on ARM
ARM stack frames for abort and raise were limited to the the actual abort and raise call, such as: Obtained 4 stack frames. ./test-app(print_trace+0x1c) [0x10a08] ./test-app() [0x10b3c] /lib/libc.so.6(__default_sa_restorer+0) [0x4adae1e0] /lib/libc.so.6(gsignal+0xa0) [0x4adacf74] This is not terribly useful when trying to figure out what function may have called called the abort, especially when using pthreads. After the change the trace would now look like: Obtained 8 stack frames. ./test-app(print_trace+0x1c) [0x10a08] ./test-app() [0x10b3c] /lib/libc.so.6(__default_sa_restorer+0) [0x4befe1e0] /lib/libc.so.6(gsignal+0xa0) [0x4befcf74] /lib/libc.so.6(abort+0x134) [0x4befe358] ./test-app(dummy_function+0x50) [0x10adc] ./test-app(main+0xd4) [0x10c24] /lib/libc.so.6(__libc_start_main+0x114) [0x4bee7a58] (From OE-Core rev: 93bf8713d8e13c278543baea94fb8dad0cb80e49) Signed-off-by: Yuanjie Huang <yuanjie.huang@windriver.com> Signed-off-by: Mark Hatle <mark.hatle@windriver.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Armin Kuster <akuster808@gmail.com>
Diffstat (limited to 'meta')
-rw-r--r--meta/recipes-core/glibc/glibc.inc6
1 files changed, 6 insertions, 0 deletions
diff --git a/meta/recipes-core/glibc/glibc.inc b/meta/recipes-core/glibc/glibc.inc
index e85c7044a0..7bae0e9554 100644
--- a/meta/recipes-core/glibc/glibc.inc
+++ b/meta/recipes-core/glibc/glibc.inc
@@ -78,3 +78,9 @@ do_configure_prepend() {
}
GLIBC_ADDONS ?= "nptl,libidn"
+
+# Enable backtrace from abort()
+do_configure_append_arm () {
+ echo "CFLAGS-abort.c = -fasynchronous-unwind-tables" >> ${B}/configparms
+ echo "CFLAGS-raise.c = -fasynchronous-unwind-tables" >> ${B}/configparms
+}