gdb: remove TYPE_FIELD_STATIC_PHYSNAME
authorSimon Marchi <simon.marchi@polymtl.ca>
Mon, 27 Sep 2021 01:06:12 +0000 (21:06 -0400)
committerSimon Marchi <simon.marchi@polymtl.ca>
Fri, 29 Oct 2021 20:44:45 +0000 (16:44 -0400)
Remove TYPE_FIELD_STATIC_PHYSNAME, replace with type::field +
field::loc_physname.

Change-Id: Ie35d446b67dd1d02f39998b406001bdb7e6d5abb

gdb/ax-gdb.c
gdb/compile/compile-cplus-types.c
gdb/gdbtypes.c
gdb/gdbtypes.h
gdb/value.c

index b56652a7a2516c9efc4af010382b14457289f7bb..beeee65fe435a7d865f96828c594c8e96c1a326d 100644 (file)
@@ -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)
index 1bd083df8703260d5639f8163ec41f6703356813..31634a9ca9241314598ed341309eb15ad87332d4 100644 (file)
@@ -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);
index 84e987b0410e1ffc8e4143c701e754cc38172e17..9dd76920421680e4556d8e922e37ae5736728691 100644 (file)
@@ -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
index e6384b1e8bff245d9ce2152765da81473e8c9d6b..5a8fb741445d0ec93b99076e8384e1d4a641e6ad 100644 (file)
@@ -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))
index e64811fe87c8f803d7608c6a7c86be4a53e1511a..5c27a96af934cd20d1c47fd7059b2ecfce1e6554 100644 (file)
@@ -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);