aboutsummaryrefslogtreecommitdiff
path: root/gdb/p-lang.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/p-lang.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/p-lang.c')
-rw-r--r--gdb/p-lang.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/gdb/p-lang.c b/gdb/p-lang.c
index 87590c9..613127e 100644
--- a/gdb/p-lang.c
+++ b/gdb/p-lang.c
@@ -104,7 +104,7 @@ pascal_is_string_type (struct type *type,int *length_pos, int *length_size,
if (length_pos)
*length_pos = type->field (0).loc_bitpos () / TARGET_CHAR_BIT;
if (length_size)
- *length_size = TYPE_LENGTH (type->field (0).type ());
+ *length_size = type->field (0).type ()->length ();
if (string_pos)
*string_pos = type->field (1).loc_bitpos () / TARGET_CHAR_BIT;
if (char_type)
@@ -124,7 +124,7 @@ pascal_is_string_type (struct type *type,int *length_pos, int *length_size,
if (length_pos)
*length_pos = type->field (1).loc_bitpos () / TARGET_CHAR_BIT;
if (length_size)
- *length_size = TYPE_LENGTH (type->field (1).type ());
+ *length_size = type->field (1).type ()->length ();
if (string_pos)
*string_pos = type->field (2).loc_bitpos () / TARGET_CHAR_BIT;
/* FIXME: how can I detect wide chars in GPC ?? */
@@ -237,7 +237,7 @@ pascal_language::printstr (struct ui_file *stream, struct type *elttype,
/* Preserve ELTTYPE's original type, just set its LENGTH. */
check_typedef (elttype);
- width = TYPE_LENGTH (elttype);
+ width = elttype->length ();
/* If the string was not truncated due to `set print elements', and
the last byte of it is a null, we don't print that, in traditional C