diff options
author | Simon Marchi <simon.marchi@polymtl.ca> | 2021-09-26 21:06:12 -0400 |
---|---|---|
committer | Simon Marchi <simon.marchi@polymtl.ca> | 2021-10-29 16:44:45 -0400 |
commit | fcbbbd90f04a137e92681d6c6dcbea95688b0c5a (patch) | |
tree | 93d4707c635a9061fbce357798126adf849f48df /gdb | |
parent | 970db5186051c051d9c5bd1f7ed404902b96fa80 (diff) | |
download | gdb-fcbbbd90f04a137e92681d6c6dcbea95688b0c5a.zip gdb-fcbbbd90f04a137e92681d6c6dcbea95688b0c5a.tar.gz gdb-fcbbbd90f04a137e92681d6c6dcbea95688b0c5a.tar.bz2 |
gdb: remove TYPE_FIELD_STATIC_PHYSNAME
Remove TYPE_FIELD_STATIC_PHYSNAME, replace with type::field +
field::loc_physname.
Change-Id: Ie35d446b67dd1d02f39998b406001bdb7e6d5abb
Diffstat (limited to 'gdb')
-rw-r--r-- | gdb/ax-gdb.c | 2 | ||||
-rw-r--r-- | gdb/compile/compile-cplus-types.c | 2 | ||||
-rw-r--r-- | gdb/gdbtypes.c | 2 | ||||
-rw-r--r-- | gdb/gdbtypes.h | 1 | ||||
-rw-r--r-- | gdb/value.c | 2 |
5 files changed, 4 insertions, 5 deletions
diff --git a/gdb/ax-gdb.c b/gdb/ax-gdb.c index b56652a..beeee65 100644 --- a/gdb/ax-gdb.c +++ b/gdb/ax-gdb.c @@ -1447,7 +1447,7 @@ gen_static_field (struct agent_expr *ax, struct axs_value *value, } else { - const char *phys_name = TYPE_FIELD_STATIC_PHYSNAME (type, fieldno); + const char *phys_name = type->field (fieldno).loc_physname (); struct symbol *sym = lookup_symbol (phys_name, 0, VAR_DOMAIN, 0).symbol; if (sym) diff --git a/gdb/compile/compile-cplus-types.c b/gdb/compile/compile-cplus-types.c index 1bd083d..31634a9 100644 --- a/gdb/compile/compile-cplus-types.c +++ b/gdb/compile/compile-cplus-types.c @@ -614,7 +614,7 @@ compile_cplus_convert_struct_or_union_members case FIELD_LOC_KIND_PHYSNAME: { - const char *physname = TYPE_FIELD_STATIC_PHYSNAME (type, i); + const char *physname = type->field (i).loc_physname (); struct block_symbol sym = lookup_symbol (physname, instance->block (), VAR_DOMAIN, nullptr); diff --git a/gdb/gdbtypes.c b/gdb/gdbtypes.c index 84e987b..9dd7692 100644 --- a/gdb/gdbtypes.c +++ b/gdb/gdbtypes.c @@ -5573,7 +5573,7 @@ copy_type_recursive (struct objfile *objfile, break; case FIELD_LOC_KIND_PHYSNAME: new_type->field (i).set_loc_physname - (xstrdup (TYPE_FIELD_STATIC_PHYSNAME (type, i))); + (xstrdup (type->field (i).loc_physname ())); break; case FIELD_LOC_KIND_DWARF_BLOCK: new_type->field (i).set_loc_dwarf_block diff --git a/gdb/gdbtypes.h b/gdb/gdbtypes.h index e6384b1..5a8fb74 100644 --- a/gdb/gdbtypes.h +++ b/gdb/gdbtypes.h @@ -2128,7 +2128,6 @@ extern void set_type_vptr_basetype (struct type *, struct type *); #define FIELD_ARTIFICIAL(thisfld) ((thisfld).artificial) #define FIELD_BITSIZE(thisfld) ((thisfld).bitsize) -#define TYPE_FIELD_STATIC_PHYSNAME(thistype, n) ((thistype)->field (n).loc_physname ()) #define TYPE_FIELD_STATIC_PHYSADDR(thistype, n) ((thistype)->field (n).loc_physaddr ()) #define TYPE_FIELD_DWARF_BLOCK(thistype, n) ((thistype)->field (n).loc_dwarf_block ()) #define TYPE_FIELD_ARTIFICIAL(thistype, n) FIELD_ARTIFICIAL((thistype)->field (n)) diff --git a/gdb/value.c b/gdb/value.c index e64811f..5c27a96 100644 --- a/gdb/value.c +++ b/gdb/value.c @@ -2960,7 +2960,7 @@ value_static_field (struct type *type, int fieldno) break; case FIELD_LOC_KIND_PHYSNAME: { - const char *phys_name = TYPE_FIELD_STATIC_PHYSNAME (type, fieldno); + const char *phys_name = type->field (fieldno).loc_physname (); /* type->field (fieldno).name (); */ struct block_symbol sym = lookup_symbol (phys_name, 0, VAR_DOMAIN, 0); |