/* Support for printing Java types for GDB, the GNU debugger.
- Copyright (C) 1997-2013 Free Software Foundation, Inc.
+ Copyright (C) 1997-2015 Free Software Foundation, Inc.
This file is part of GDB.
#include "demangle.h"
#include "gdb-demangle.h"
#include "jv-lang.h"
-#include "gdb_string.h"
#include "typeprint.h"
#include "c-lang.h"
#include "cp-abi.h"
-#include "gdb_assert.h"
+#include "cp-support.h"
/* Local functions */
return;
}
- CHECK_TYPEDEF (type);
+ type = check_typedef (type);
switch (TYPE_CODE (type))
{
{
QUIT;
/* Don't print out virtual function table. */
- if (strncmp (TYPE_FIELD_NAME (type, i), "_vptr", 5) == 0
+ if (startswith (TYPE_FIELD_NAME (type, i), "_vptr")
&& is_cplus_marker ((TYPE_FIELD_NAME (type, i))[5]))
continue;
/* Don't print the dummy field "class". */
- if (strncmp (TYPE_FIELD_NAME (type, i), "class", 5) == 0)
+ if (startswith (TYPE_FIELD_NAME (type, i), "class"))
continue;
print_spaces_filtered (level + 4, stream);
p = strrchr (real_physname, ')');
gdb_assert (p != NULL);
++p; /* Keep the trailing ')'. */
- physname = alloca (p - real_physname + 1);
+ physname = (char *) alloca (p - real_physname + 1);
memcpy (physname, real_physname, p - real_physname);
physname[p - real_physname] = '\0';
mangled_name = physname;
demangled_name =
- cplus_demangle (mangled_name,
- DMGL_ANSI | DMGL_PARAMS | DMGL_JAVA);
+ gdb_demangle (mangled_name,
+ DMGL_ANSI | DMGL_PARAMS | DMGL_JAVA);
if (demangled_name == NULL)
demangled_name = xstrdup (mangled_name);