]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
gdb: remove FIELD_DWARF_BLOCK macro
authorSimon Marchi <simon.marchi@polymtl.ca>
Fri, 24 Sep 2021 03:51:40 +0000 (23:51 -0400)
committerSimon Marchi <simon.marchi@polymtl.ca>
Fri, 29 Oct 2021 20:44:21 +0000 (16:44 -0400)
Remove FIELD_DWARF_BLOCK, replace its uses with field::loc_dwarf_block.

Change-Id: I66b7d6a960cb5e341e61e21bd3cc9a6ac26de6a8

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

index f7ec26823d435402a3f4da59be315d39c58ef2d6..eb128fa5fc6fe76352611821cee814da9465293d 100644 (file)
@@ -649,7 +649,7 @@ call_site_to_target_addr (struct gdbarch *call_site_gdbarch,
        struct type *caller_core_addr_type;
        struct gdbarch *caller_arch;
 
-       dwarf_block = FIELD_DWARF_BLOCK (call_site->target);
+       dwarf_block = call_site->target.loc_dwarf_block ();
        if (dwarf_block == NULL)
          {
            struct bound_minimal_symbol msym;
index db704757c8c1e30ede789b8dc5cd7834d5139d6a..8cfb9db280e0ae372e697a4eeeab1304a4a15aa4 100644 (file)
@@ -4233,8 +4233,8 @@ check_types_equal (struct type *type1, struct type *type2,
              {
                struct dwarf2_locexpr_baton *block1, *block2;
 
-               block1 = FIELD_DWARF_BLOCK (*field1);
-               block2 = FIELD_DWARF_BLOCK (*field2);
+               block1 = field1->loc_dwarf_block ();
+               block2 = field2->loc_dwarf_block ();
                if (block1->per_cu != block2->per_cu
                    || block1->size != block2->size
                    || memcmp (block1->data, block2->data, block1->size) != 0)
index e3a3d98242f66f57a8e4ae3866d8338e90df5f3d..e68aab5aefec5c07292c0b2aab839c2975a39023 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_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_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) ((thistype)->field (n).loc_physaddr ())
-#define TYPE_FIELD_DWARF_BLOCK(thistype, n) FIELD_DWARF_BLOCK ((thistype)->field (n))
+#define TYPE_FIELD_DWARF_BLOCK(thistype, n) ((thistype)->field (n).loc_dwarf_block ())
 #define TYPE_FIELD_ARTIFICIAL(thistype, n) FIELD_ARTIFICIAL((thistype)->field (n))
 #define TYPE_FIELD_BITSIZE(thistype, n) FIELD_BITSIZE((thistype)->field (n))
 #define TYPE_FIELD_PACKED(thistype, n) (FIELD_BITSIZE((thistype)->field (n))!=0)