gdb: remove FIELD_STATIC_PHYSADDR macro
authorSimon Marchi <simon.marchi@polymtl.ca>
Fri, 24 Sep 2021 03:50:02 +0000 (23:50 -0400)
committerSimon Marchi <simon.marchi@polymtl.ca>
Fri, 29 Oct 2021 20:44:21 +0000 (16:44 -0400)
Remove FIELD_LOC_KIND_PHYSADDR, replace its uses with
field::loc_physaddr.

Change-Id: Ifd8b2bdaad75f42bfb1404ef8c396ffe7e10ac55

gdb/dwarf2/loc.c
gdb/gdbtypes.c
gdb/gdbtypes.h

index 9d9267b7c69359809a8e739c7a91a77b79277814..f7ec26823d435402a3f4da59be315d39c58ef2d6 100644 (file)
@@ -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:
index 14bc546df023ec6da5433ee13ebd7ff8c82450e5..db704757c8c1e30ede789b8dc5cd7834d5139d6a 100644 (file)
@@ -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:
index 8af7bab9bf5daf2330a304d404b21dc94a0e4960..e3a3d98242f66f57a8e4ae3866d8338e90df5f3d 100644 (file)
@@ -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))