aboutsummaryrefslogtreecommitdiff
path: root/gdb/infrun.c
diff options
context:
space:
mode:
authorSimon Marchi <simon.marchi@polymtl.ca>2022-09-21 11:05:21 -0400
committerSimon Marchi <simon.marchi@polymtl.ca>2022-09-21 11:05:21 -0400
commitdf86565b31bf12aab6fdceade49169bc6f378b13 (patch)
tree76d5944661919552ce4ea01ac49188e151d72fa7 /gdb/infrun.c
parentb6cdbc9a8173b9e6cc8cfc284caa0efa8129ca02 (diff)
downloadgdb-df86565b31bf12aab6fdceade49169bc6f378b13.zip
gdb-df86565b31bf12aab6fdceade49169bc6f378b13.tar.gz
gdb-df86565b31bf12aab6fdceade49169bc6f378b13.tar.bz2
gdb: remove TYPE_LENGTH
Remove the macro, replace all uses with calls to type::length. Change-Id: Ib9bdc954576860b21190886534c99103d6a47afb
Diffstat (limited to 'gdb/infrun.c')
-rw-r--r--gdb/infrun.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/gdb/infrun.c b/gdb/infrun.c
index 033699b..1957e80 100644
--- a/gdb/infrun.c
+++ b/gdb/infrun.c
@@ -9177,9 +9177,9 @@ siginfo_value_read (struct value *v)
NULL,
value_contents_all_raw (v).data (),
value_offset (v),
- TYPE_LENGTH (value_type (v)));
+ value_type (v)->length ());
- if (transferred != TYPE_LENGTH (value_type (v)))
+ if (transferred != value_type (v)->length ())
error (_("Unable to read siginfo"));
}
@@ -9200,9 +9200,9 @@ siginfo_value_write (struct value *v, struct value *fromval)
NULL,
value_contents_all_raw (fromval).data (),
value_offset (v),
- TYPE_LENGTH (value_type (fromval)));
+ value_type (fromval)->length ());
- if (transferred != TYPE_LENGTH (value_type (fromval)))
+ if (transferred != value_type (fromval)->length ())
error (_("Unable to write siginfo"));
}
@@ -9256,7 +9256,7 @@ public:
if (gdbarch_get_siginfo_type_p (gdbarch))
{
struct type *type = gdbarch_get_siginfo_type (gdbarch);
- size_t len = TYPE_LENGTH (type);
+ size_t len = type->length ();
siginfo_data.reset ((gdb_byte *) xmalloc (len));
@@ -9298,7 +9298,7 @@ public:
/* Errors ignored. */
target_write (current_inferior ()->top_target (),
TARGET_OBJECT_SIGNAL_INFO, NULL,
- m_siginfo_data.get (), 0, TYPE_LENGTH (type));
+ m_siginfo_data.get (), 0, type->length ());
}
/* The inferior can be gone if the user types "print exit(0)"
@@ -9320,7 +9320,7 @@ private:
struct gdbarch *m_siginfo_gdbarch = nullptr;
/* The inferior format depends on SIGINFO_GDBARCH and it has a length of
- TYPE_LENGTH (gdbarch_get_siginfo_type ()). For different gdbarch the
+ gdbarch_get_siginfo_type ()->length (). For different gdbarch the
content would be invalid. */
gdb::unique_xmalloc_ptr<gdb_byte> m_siginfo_data;
};