Code

use c++filt for symbol demangling if available
authormental <mental@users.sourceforge.net>
Mon, 8 May 2006 23:31:42 +0000 (23:31 +0000)
committermental <mental@users.sourceforge.net>
Mon, 8 May 2006 23:31:42 +0000 (23:31 +0000)
ChangeLog
src/debug/Makefile_insert
src/gc-anchored.cpp
src/sp-object.cpp

index 49f2ee0bad56b7c92883dd7506a317223725b007..03a9434806530aa1f10a1b50cc9ae7808ac479ca 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2006-05-08  MenTaLguY  <mental@rydia.net>
+
+       * src/debug/demangle.cpp, src/debug/demangle.h, src/sp-object.cpp,
+         src/gc-anchored.cpp:
+
+         use c++filt for symbol demangling if available
+
 2006-05-08  MenTaLguY  <mental@rydia.net>
 
        * src/xml/repr-util.cpp:
index ec4e0ceea2cf44e2aba2c9e4faf9e1e1ce721e6f..a8bf7761efc95538513d85b4a9b3cc4acc57750a 100644 (file)
@@ -5,6 +5,7 @@ debug/clean:
        rm -f debug/libinkdebug.a $(debug_libinkdebug_a_OBJECTS)
 
 debug_libinkdebug_a_SOURCES = \
+       debug/demangle.cpp debug/demangle.h \
        debug/event.h \
        debug/event-tracker.h \
        debug/heap.cpp debug/heap.h \
index baf36c0c95c51ffb4670565939b54c2620b36586..3f4cfc12dcf8cbe1a3022882495dbfe451f480f5 100644 (file)
@@ -13,6 +13,7 @@
 #include "gc-anchored.h"
 #include "debug/event-tracker.h"
 #include "debug/simple-event.h"
+#include "debug/demangle.h"
 #include "util/share.h"
 #include "util/format.h"
 
@@ -32,7 +33,7 @@ public:
     {
         _addProperty("base", Util::format("%p", Core::base(const_cast<Anchored *>(object))));
         _addProperty("pointer", Util::format("%p", object));
-        _addProperty("class", Util::share_static_string(typeid(*object).name()));
+        _addProperty("class", Debug::demangle(typeid(*object).name()));
         _addProperty("new-refcount", Util::format("%d", object->_anchored_refcount() + bias));
     }
 };
index fbe16e957b826874d0657b99eb1b70eb532457d7..5e011bd046dce8ccde3ecf4f00011dc8d5a9f7a2 100644 (file)
@@ -45,6 +45,7 @@
 #include "xml/node-fns.h"
 #include "debug/event-tracker.h"
 #include "debug/simple-event.h"
+#include "debug/demangle.h"
 #include "util/share.h"
 #include "util/format.h"
 
@@ -241,7 +242,7 @@ public:
     : BaseRefCountEvent(name)
     {
         _addProperty("object", Util::format("%p", object));
-        _addProperty("class", Util::share_static_string(g_type_name(G_TYPE_FROM_INSTANCE(object))));
+        _addProperty("class", Debug::demangle(g_type_name(G_TYPE_FROM_INSTANCE(object))));
         _addProperty("new-refcount", Util::format("%d", G_OBJECT(object)->ref_count + bias));
     }
 };