aboutsummaryrefslogtreecommitdiff
path: root/gdb/ax-gdb.c
diff options
context:
space:
mode:
authorTom Tromey <tom@tromey.com>2023-04-22 12:41:43 -0600
committerTom Tromey <tom@tromey.com>2023-05-01 09:20:37 -0600
commitc819a3380fc1b110b88bc6ab5ef9323dbe7d4753 (patch)
tree05450117dff9b07e36d3ddb7bddf2fd88651c543 /gdb/ax-gdb.c
parent077a1f08485e88f3b234af1dbb8b907b16045e6a (diff)
downloadgdb-c819a3380fc1b110b88bc6ab5ef9323dbe7d4753.zip
gdb-c819a3380fc1b110b88bc6ab5ef9323dbe7d4753.tar.gz
gdb-c819a3380fc1b110b88bc6ab5ef9323dbe7d4753.tar.bz2
Replace field_is_static with a method
This changes field_is_static to be a method on struct field, and updates all the callers. Most of this patch was written by script. Regression tested on x86-64 Fedora 36.
Diffstat (limited to 'gdb/ax-gdb.c')
-rw-r--r--gdb/ax-gdb.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/gdb/ax-gdb.c b/gdb/ax-gdb.c
index 9dda7fe..528f45e 100644
--- a/gdb/ax-gdb.c
+++ b/gdb/ax-gdb.c
@@ -210,7 +210,7 @@ gen_trace_static_fields (struct agent_expr *ax,
for (i = type->num_fields () - 1; i >= nbases; i--)
{
- if (field_is_static (&type->field (i)))
+ if (type->field (i).is_static ())
{
gen_static_field (ax, &value, type, i);
if (value.optimized_out)
@@ -1359,7 +1359,7 @@ gen_struct_ref_recursive (struct agent_expr *ax, struct axs_value *value,
"this") will have been generated already, which will
be unnecessary but not harmful if the static field is
being handled as a global. */
- if (field_is_static (&type->field (i)))
+ if (type->field (i).is_static ())
{
gen_static_field (ax, value, type, i);
if (value->optimized_out)
@@ -1495,7 +1495,7 @@ gen_struct_elt_for_reference (struct agent_expr *ax, struct axs_value *value,
if (t_field_name && strcmp (t_field_name, fieldname) == 0)
{
- if (field_is_static (&t->field (i)))
+ if (t->field (i).is_static ())
{
gen_static_field (ax, value, t, i);
if (value->optimized_out)