From 37eb913ed8c4798b736e678f4dbd9f4a91a68f74 Mon Sep 17 00:00:00 2001 From: Salvatore Cro Date: Thu, 9 Sep 2010 15:45:44 +0200 Subject: libubacktrace: Provide uClibc with backtrace functions A new shared object, libubacktrace.so.0 is added to uClibc to provide backtrace functions to support application self-debugging. This set of functions requires to dynamically load libgcc_s.so so they need to call dlopen/dlsym that are provided by libdl. For this reason they cannot be included into libc.so.0 but are provided by a new library. User application that wants to use backtrace needs to be compiled with -fexceptions option and -rdynamic to get full symbols printed and must be linked against libubacktrace.so Signed-off-by: Carmelo Amoroso --- libubacktrace/backtrace.c | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 libubacktrace/backtrace.c (limited to 'libubacktrace/backtrace.c') diff --git a/libubacktrace/backtrace.c b/libubacktrace/backtrace.c new file mode 100644 index 000000000..872180028 --- /dev/null +++ b/libubacktrace/backtrace.c @@ -0,0 +1,19 @@ +/* + * Perform stack unwinding by using the _Unwind_Backtrace. + * + * User application that wants to use backtrace needs to be + * compiled with -fexceptions option and -rdynamic to get full + * symbols printed. + + * Copyright (C) 2010 STMicroelectronics Ltd + * Author(s): Carmelo Amoroso + * + * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball. + * + */ +#error "Arch specific implementation must be provided to properly work" +int backtrace (void **array, int size) +{ + return -1; +} + -- cgit v1.2.3