aboutsummaryrefslogtreecommitdiff
path: root/demangle.c
diff options
context:
space:
mode:
authorJuan Cespedes <cespedes@debian.org>1998-04-25 14:31:58 +0200
committerJuan Cespedes <cespedes@debian.org>1998-04-25 14:31:58 +0200
commitac3db297f7c6f08b02a7edfb32e441875fd7c1d7 (patch)
tree8e0f7fce638eab7af22db3ec4c74f4e9679bcb78 /demangle.c
parent28f60197b93b45422a73e5d1a6aa581584d6c4a5 (diff)
downloadltrace-ac3db297f7c6f08b02a7edfb32e441875fd7c1d7.tar.gz
Version: 0.3.0
* Preliminary autoconf support * Switched to getopt() * New option: -C (demangle C++ names) * New options: --help, --version * Display "format" (printf-like) argument types * Updated manual page * New option: -e
Diffstat (limited to 'demangle.c')
-rw-r--r--demangle.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/demangle.c b/demangle.c
new file mode 100644
index 0000000..3469003
--- /dev/null
+++ b/demangle.c
@@ -0,0 +1,19 @@
+#if HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#if HAVE_LIBIBERTY
+
+#include <string.h>
+
+#include "demangle.h"
+
+char * my_demangle(char * function_name)
+{
+ char * tmp;
+
+ tmp = cplus_demangle(function_name+strspn(function_name,"_"),DMGL_ANSI | DMGL_PARAMS);
+ return tmp ? tmp : strdup(function_name);
+}
+
+#endif