]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blobdiff - gdb/jv-lang.c
* Makefile.in (c_lang.o, jv_lang.o, language.o): Add $(demangle_h).
[thirdparty/binutils-gdb.git] / gdb / jv-lang.c
index f6bc2deb9d863bfe613bcd4246b913e6a03602bf..9e73030362d1e11a004a55b380aed3d795fc6b51 100644 (file)
@@ -34,6 +34,7 @@
 #include "jv-lang.h"
 #include "gdbcore.h"
 #include "block.h"
+#include "demangle.h"
 #include <ctype.h>
 
 struct type *java_int_type;
@@ -996,6 +997,12 @@ java_create_fundamental_type (struct objfile *objfile, int typeid)
   return c_create_fundamental_type (objfile, typeid);
 }
 
+static char *java_demangle (const char *mangled, int options)
+{
+  return cplus_demangle (mangled, options | DMGL_JAVA);
+}
+
+
 /* Table mapping opcodes into strings for printing operators
    and precedences of the operators.  */
 
@@ -1055,6 +1062,7 @@ const struct language_defn java_language_defn =
   java_val_print,              /* Print a value using appropriate syntax */
   java_value_print,            /* Print a top-level value */
   NULL,                                /* Language specific skip_trampoline */
+  java_demangle,               /* Language specific symbol demangler */
   {"", "", "", ""},            /* Binary format info */
   {"0%lo", "0", "o", ""},      /* Octal format info */
   {"%ld", "", "d", ""},                /* Decimal format info */