gdb: remove FIELD_STATIC_PHYSNAME macro

Remove FIELD_STATIC_PHYSNAME, replace its uses with field::loc_physname.

Change-Id: Iaa8952410403b4eb5bbd68411feea27e2405d657
This commit is contained in:
Simon Marchi 2021-09-23 23:47:42 -04:00
parent 5d2038e3f5
commit 16654a591a
3 changed files with 4 additions and 5 deletions

View file

@ -694,7 +694,7 @@ call_site_to_target_addr (struct gdbarch *call_site_gdbarch,
const char *physname; const char *physname;
struct bound_minimal_symbol msym; struct bound_minimal_symbol msym;
physname = FIELD_STATIC_PHYSNAME (call_site->target); physname = call_site->target.loc_physname ();
/* Handle both the mangled and demangled PHYSNAME. */ /* Handle both the mangled and demangled PHYSNAME. */
msym = lookup_minimal_symbol (physname, NULL, NULL); msym = lookup_minimal_symbol (physname, NULL, NULL);

View file

@ -4226,8 +4226,8 @@ check_types_equal (struct type *type1, struct type *type2,
return false; return false;
break; break;
case FIELD_LOC_KIND_PHYSNAME: case FIELD_LOC_KIND_PHYSNAME:
if (!compare_maybe_null_strings (FIELD_STATIC_PHYSNAME (*field1), if (!compare_maybe_null_strings (field1->loc_physname (),
FIELD_STATIC_PHYSNAME (*field2))) field2->loc_physname ()))
return false; return false;
break; break;
case FIELD_LOC_KIND_DWARF_BLOCK: case FIELD_LOC_KIND_DWARF_BLOCK:

View file

@ -2125,7 +2125,6 @@ extern void set_type_vptr_basetype (struct type *, struct type *);
(TYPE_CPLUS_SPECIFIC(thistype)->virtual_field_bits == NULL ? 0 \ (TYPE_CPLUS_SPECIFIC(thistype)->virtual_field_bits == NULL ? 0 \
: B_TST(TYPE_CPLUS_SPECIFIC(thistype)->virtual_field_bits, (index))) : B_TST(TYPE_CPLUS_SPECIFIC(thistype)->virtual_field_bits, (index)))
#define FIELD_STATIC_PHYSNAME(thisfld) ((thisfld).loc_physname ())
#define FIELD_STATIC_PHYSADDR(thisfld) ((thisfld).loc_physaddr ()) #define FIELD_STATIC_PHYSADDR(thisfld) ((thisfld).loc_physaddr ())
#define FIELD_DWARF_BLOCK(thisfld) ((thisfld).loc_dwarf_block ()) #define FIELD_DWARF_BLOCK(thisfld) ((thisfld).loc_dwarf_block ())
#define FIELD_ARTIFICIAL(thisfld) ((thisfld).artificial) #define FIELD_ARTIFICIAL(thisfld) ((thisfld).artificial)
@ -2134,7 +2133,7 @@ extern void set_type_vptr_basetype (struct type *, struct type *);
#define TYPE_FIELD_LOC_KIND(thistype, n) ((thistype)->field (n).loc_kind ()) #define TYPE_FIELD_LOC_KIND(thistype, n) ((thistype)->field (n).loc_kind ())
#define TYPE_FIELD_BITPOS(thistype, n) ((thistype)->field (n).loc_bitpos ()) #define TYPE_FIELD_BITPOS(thistype, n) ((thistype)->field (n).loc_bitpos ())
#define TYPE_FIELD_ENUMVAL(thistype, n) ((thistype)->field (n).loc_enumval ()) #define TYPE_FIELD_ENUMVAL(thistype, n) ((thistype)->field (n).loc_enumval ())
#define TYPE_FIELD_STATIC_PHYSNAME(thistype, n) FIELD_STATIC_PHYSNAME ((thistype)->field (n)) #define TYPE_FIELD_STATIC_PHYSNAME(thistype, n) ((thistype)->field (n).loc_physname ())
#define TYPE_FIELD_STATIC_PHYSADDR(thistype, n) FIELD_STATIC_PHYSADDR ((thistype)->field (n)) #define TYPE_FIELD_STATIC_PHYSADDR(thistype, n) FIELD_STATIC_PHYSADDR ((thistype)->field (n))
#define TYPE_FIELD_DWARF_BLOCK(thistype, n) FIELD_DWARF_BLOCK ((thistype)->field (n)) #define TYPE_FIELD_DWARF_BLOCK(thistype, n) FIELD_DWARF_BLOCK ((thistype)->field (n))
#define TYPE_FIELD_ARTIFICIAL(thistype, n) FIELD_ARTIFICIAL((thistype)->field (n)) #define TYPE_FIELD_ARTIFICIAL(thistype, n) FIELD_ARTIFICIAL((thistype)->field (n))