diff options
author | Simon Marchi <simon.marchi@polymtl.ca> | 2021-09-23 23:50:02 -0400 |
---|---|---|
committer | Simon Marchi <simon.marchi@polymtl.ca> | 2021-10-29 16:44:21 -0400 |
commit | 31a1516a815ea3699cefdf92be60680c56cd6e8f (patch) | |
tree | b097526bfb698f0c67e983e7f4e1893f811a3f0e /gdb | |
parent | 16654a591ae6ebd8075a3447a569b7c16ca30754 (diff) | |
download | fsf-binutils-gdb-31a1516a815ea3699cefdf92be60680c56cd6e8f.zip fsf-binutils-gdb-31a1516a815ea3699cefdf92be60680c56cd6e8f.tar.gz fsf-binutils-gdb-31a1516a815ea3699cefdf92be60680c56cd6e8f.tar.bz2 |
gdb: remove FIELD_STATIC_PHYSADDR macro
Remove FIELD_LOC_KIND_PHYSADDR, replace its uses with
field::loc_physaddr.
Change-Id: Ifd8b2bdaad75f42bfb1404ef8c396ffe7e10ac55
Diffstat (limited to 'gdb')
-rw-r--r-- | gdb/dwarf2/loc.c | 2 | ||||
-rw-r--r-- | gdb/gdbtypes.c | 3 | ||||
-rw-r--r-- | gdb/gdbtypes.h | 3 |
3 files changed, 3 insertions, 5 deletions
diff --git a/gdb/dwarf2/loc.c b/gdb/dwarf2/loc.c index 9d9267b..f7ec268 100644 --- a/gdb/dwarf2/loc.c +++ b/gdb/dwarf2/loc.c @@ -719,7 +719,7 @@ call_site_to_target_addr (struct gdbarch *call_site_gdbarch, int sect_idx = COMPUNIT_BLOCK_LINE_SECTION (cust); CORE_ADDR delta = per_objfile->objfile->section_offsets[sect_idx]; - return FIELD_STATIC_PHYSADDR (call_site->target) + delta; + return call_site->target.loc_physaddr () + delta; } default: diff --git a/gdb/gdbtypes.c b/gdb/gdbtypes.c index 14bc546..db70475 100644 --- a/gdb/gdbtypes.c +++ b/gdb/gdbtypes.c @@ -4221,8 +4221,7 @@ check_types_equal (struct type *type1, struct type *type2, have a type. */ continue; case FIELD_LOC_KIND_PHYSADDR: - if (FIELD_STATIC_PHYSADDR (*field1) - != FIELD_STATIC_PHYSADDR (*field2)) + if (field1->loc_physaddr () != field2->loc_physaddr ()) return false; break; case FIELD_LOC_KIND_PHYSNAME: diff --git a/gdb/gdbtypes.h b/gdb/gdbtypes.h index 8af7bab..e3a3d98 100644 --- a/gdb/gdbtypes.h +++ b/gdb/gdbtypes.h @@ -2125,7 +2125,6 @@ extern void set_type_vptr_basetype (struct type *, struct type *); (TYPE_CPLUS_SPECIFIC(thistype)->virtual_field_bits == NULL ? 0 \ : B_TST(TYPE_CPLUS_SPECIFIC(thistype)->virtual_field_bits, (index))) -#define FIELD_STATIC_PHYSADDR(thisfld) ((thisfld).loc_physaddr ()) #define FIELD_DWARF_BLOCK(thisfld) ((thisfld).loc_dwarf_block ()) #define FIELD_ARTIFICIAL(thisfld) ((thisfld).artificial) #define FIELD_BITSIZE(thisfld) ((thisfld).bitsize) @@ -2134,7 +2133,7 @@ extern void set_type_vptr_basetype (struct type *, struct type *); #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_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) ((thistype)->field (n).loc_physaddr ()) #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_BITSIZE(thistype, n) FIELD_BITSIZE((thistype)->field (n)) |