From: Simon Marchi Date: Fri, 24 Sep 2021 03:51:40 +0000 (-0400) Subject: gdb: remove FIELD_DWARF_BLOCK macro X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=d8557c3d229589c690a1bef92be434eb663e3bb6;p=binutils-gdb.git gdb: remove FIELD_DWARF_BLOCK macro Remove FIELD_DWARF_BLOCK, replace its uses with field::loc_dwarf_block. Change-Id: I66b7d6a960cb5e341e61e21bd3cc9a6ac26de6a8 --- diff --git a/gdb/dwarf2/loc.c b/gdb/dwarf2/loc.c index f7ec26823d4..eb128fa5fc6 100644 --- a/gdb/dwarf2/loc.c +++ b/gdb/dwarf2/loc.c @@ -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; diff --git a/gdb/gdbtypes.c b/gdb/gdbtypes.c index db704757c8c..8cfb9db280e 100644 --- a/gdb/gdbtypes.c +++ b/gdb/gdbtypes.c @@ -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) diff --git a/gdb/gdbtypes.h b/gdb/gdbtypes.h index e3a3d98242f..e68aab5aefe 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_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)