aboutsummaryrefslogtreecommitdiff
path: root/gdb/rust-lang.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/rust-lang.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/rust-lang.c')
-rw-r--r--gdb/rust-lang.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/gdb/rust-lang.c b/gdb/rust-lang.c
index 3ef8fca..a060720 100644
--- a/gdb/rust-lang.c
+++ b/gdb/rust-lang.c
@@ -130,7 +130,7 @@ rust_underscore_fields (struct type *type)
return false;
for (i = 0; i < type->num_fields (); ++i)
{
- if (!field_is_static (&type->field (i)))
+ if (!type->field (i).is_static ())
{
char buf[20];
@@ -403,7 +403,7 @@ rust_language::val_print_struct
first_field = 1;
for (i = 0; i < type->num_fields (); ++i)
{
- if (field_is_static (&type->field (i)))
+ if (type->field (i).is_static ())
continue;
if (!first_field)
@@ -723,7 +723,7 @@ rust_print_struct_def (struct type *type, const char *varstring,
std::vector<int> fields;
for (int i = 0; i < type->num_fields (); ++i)
{
- if (field_is_static (&type->field (i)))
+ if (type->field (i).is_static ())
continue;
if (is_enum && TYPE_FIELD_ARTIFICIAL (type, i))
continue;
@@ -741,7 +741,7 @@ rust_print_struct_def (struct type *type, const char *varstring,
{
QUIT;
- gdb_assert (!field_is_static (&type->field (i)));
+ gdb_assert (!type->field (i).is_static ());
gdb_assert (! (is_enum && TYPE_FIELD_ARTIFICIAL (type, i)));
if (flags->print_offsets)