[sysprof] Add a simple testdemangle.c test program



commit 139437ecbe00150566db734888bcfecd5cbd0194
Author: SÃren Sandmann Pedersen <sandmann daimi au dk>
Date:   Wed Aug 31 19:57:33 2011 -0400

    Add a simple testdemangle.c test program

 Makefile.am    |   11 ++++++++++-
 testdemangle.c |    7 +++++++
 2 files changed, 17 insertions(+), 1 deletions(-)
---
diff --git a/Makefile.am b/Makefile.am
index 0520f5f..7ac1852 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -100,7 +100,7 @@ sysprof_cli_LDADD = $(CORE_DEP_LIBS)
 # 
 # Test programs
 #
-noinst_PROGRAMS = testelf testunwind
+noinst_PROGRAMS = testelf testunwind testdemangle
 
 # testunwind
 testunwind_SOURCES =	\
@@ -122,3 +122,12 @@ testelf_SOURCES =	\
 
 testelf_CPPFLAGS = $(CORE_DEP_CFLAGS)
 testelf_LDADD = $(CORE_DEP_LIBS)
+
+# testdemangle
+testdemangle_SOURCES =	\
+	testdemangle.c	\
+	elfparser.c	\
+	elfparser.h	\
+	demangle.c
+testdemangle_CPPFLAGS = $(CORE_DEP_CFLAGS)
+testdemangle_LDADD = $(CORE_DEP_LIBS)
diff --git a/testdemangle.c b/testdemangle.c
new file mode 100644
index 0000000..c2b3d56
--- /dev/null
+++ b/testdemangle.c
@@ -0,0 +1,7 @@
+#include "elfparser.h"
+
+int
+main ()
+{
+    printf ("%s\n", elf_demangle ("_ZN8Inkscape7FiltersL12filter2D_FIRIhLj4EEEvPT_iiPKS2_iiiiPKNS_4Util10FixedPointIjLj16EEEii"));
+}



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]