X-Git-Url: http://drtracing.org/?a=blobdiff_plain;ds=sidebyside;f=gdb%2Fd-namespace.c;h=f3053d6a734c4c938486d9cb3e489e3f0704d050;hb=39ec04904ff172dd67fd43ed3720f26d854732bf;hp=4edef188e9e14bd52de71fc58a91cfe208e2360b;hpb=4de283e4b5f21207fe12f99913d1f28d4f07843c;p=deliverable%2Fbinutils-gdb.git diff --git a/gdb/d-namespace.c b/gdb/d-namespace.c index 4edef188e9..f3053d6a73 100644 --- a/gdb/d-namespace.c +++ b/gdb/d-namespace.c @@ -1,6 +1,6 @@ /* Helper routines for D support in GDB. - Copyright (C) 2014-2019 Free Software Foundation, Inc. + Copyright (C) 2014-2020 Free Software Foundation, Inc. This file is part of GDB. @@ -24,6 +24,7 @@ #include "namespace.h" #include "d-lang.h" #include "gdb_obstack.h" +#include "gdbarch.h" /* This returns the length of first component of NAME, which should be the demangled name of a D variable/function/method/etc. @@ -130,7 +131,7 @@ d_lookup_symbol (const struct language_defn *langdef, return {}; type = check_typedef (TYPE_TARGET_TYPE (SYMBOL_TYPE (lang_this.symbol))); - classname = TYPE_NAME (type); + classname = type->name (); nested = name; } else @@ -307,7 +308,7 @@ d_lookup_nested_symbol (struct type *parent_type, parent_type = check_typedef (parent_type); - switch (TYPE_CODE (parent_type)) + switch (parent_type->code ()) { case TYPE_CODE_STRUCT: case TYPE_CODE_UNION: