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

Change-Id: Ica9bc4a48f34750ec82ec86c298d3ecece81bcbd

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

index beeee65fe435a7d865f96828c594c8e96c1a326d..8e391a00ed08ef5c609037b91e3952f09e16fda7 100644 (file)
@@ -1440,7 +1440,7 @@ gen_static_field (struct agent_expr *ax, struct axs_value *value,
 {
   if (type->field (fieldno).loc_kind () == FIELD_LOC_KIND_PHYSADDR)
     {
-      ax_const_l (ax, TYPE_FIELD_STATIC_PHYSADDR (type, fieldno));
+      ax_const_l (ax, type->field (fieldno).loc_physaddr ());
       value->kind = axs_lvalue_memory;
       value->type = type->field (fieldno).type ();
       value->optimized_out = 0;
index 31634a9ca9241314598ed341309eb15ad87332d4..cd389c8d473000519bee46adc3aba5305db6640b 100644 (file)
@@ -603,7 +603,7 @@ compile_cplus_convert_struct_or_union_members
            {
            case FIELD_LOC_KIND_PHYSADDR:
              {
-               physaddr = TYPE_FIELD_STATIC_PHYSADDR (type, i);
+               physaddr = type->field (i).loc_physaddr ();
 
                instance->plugin ().build_decl
                  ("field physaddr", field_name,
index 9dd76920421680e4556d8e922e37ae5736728691..752148965097b776cf5088234b1544d9ba57c9f1 100644 (file)
@@ -5569,7 +5569,7 @@ copy_type_recursive (struct objfile *objfile,
              break;
            case FIELD_LOC_KIND_PHYSADDR:
              new_type->field (i).set_loc_physaddr
-               (TYPE_FIELD_STATIC_PHYSADDR (type, i));
+               (type->field (i).loc_physaddr ());
              break;
            case FIELD_LOC_KIND_PHYSNAME:
              new_type->field (i).set_loc_physname
index 5a8fb741445d0ec93b99076e8384e1d4a641e6ad..1f5dc657b1c9fa72f8b5bfa5dca2bed65f26aaa1 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_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))
 #define TYPE_FIELD_BITSIZE(thistype, n) FIELD_BITSIZE((thistype)->field (n))
index 5c27a96af934cd20d1c47fd7059b2ecfce1e6554..998bec321a2b0e566b0dba2c0d9fbf2d14535c17 100644 (file)
@@ -2956,7 +2956,7 @@ value_static_field (struct type *type, int fieldno)
     {
     case FIELD_LOC_KIND_PHYSADDR:
       retval = value_at_lazy (type->field (fieldno).type (),
-                             TYPE_FIELD_STATIC_PHYSADDR (type, fieldno));
+                             type->field (fieldno).loc_physaddr ());
       break;
     case FIELD_LOC_KIND_PHYSNAME:
     {