diff options
author | Simon Marchi <simon.marchi@polymtl.ca> | 2022-09-21 11:05:21 -0400 |
---|---|---|
committer | Simon Marchi <simon.marchi@polymtl.ca> | 2022-09-21 11:05:21 -0400 |
commit | df86565b31bf12aab6fdceade49169bc6f378b13 (patch) | |
tree | 76d5944661919552ce4ea01ac49188e151d72fa7 /gdb/guile | |
parent | b6cdbc9a8173b9e6cc8cfc284caa0efa8129ca02 (diff) | |
download | binutils-df86565b31bf12aab6fdceade49169bc6f378b13.zip binutils-df86565b31bf12aab6fdceade49169bc6f378b13.tar.gz binutils-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/guile')
-rw-r--r-- | gdb/guile/scm-math.c | 6 | ||||
-rw-r--r-- | gdb/guile/scm-pretty-print.c | 2 | ||||
-rw-r--r-- | gdb/guile/scm-type.c | 2 | ||||
-rw-r--r-- | gdb/guile/scm-value.c | 4 |
4 files changed, 7 insertions, 7 deletions
diff --git a/gdb/guile/scm-math.c b/gdb/guile/scm-math.c index 914bb5f..022863d 100644 --- a/gdb/guile/scm-math.c +++ b/gdb/guile/scm-math.c @@ -586,7 +586,7 @@ vlscm_integer_fits_p (SCM obj, struct type *type) if (type->is_unsigned ()) { /* If scm_is_unsigned_integer can't work with this type, just punt. */ - if (TYPE_LENGTH (type) > sizeof (uintmax_t)) + if (type->length () > sizeof (uintmax_t)) return 0; ULONGEST max = get_unsigned_type_max (type); @@ -597,7 +597,7 @@ vlscm_integer_fits_p (SCM obj, struct type *type) LONGEST min, max; /* If scm_is_signed_integer can't work with this type, just punt. */ - if (TYPE_LENGTH (type) > sizeof (intmax_t)) + if (type->length () > sizeof (intmax_t)) return 0; get_signed_type_minmax (type, &min, &max); return scm_is_signed_integer (obj, min, max); @@ -681,7 +681,7 @@ vlscm_convert_bytevector (SCM bv, struct type *type, SCM type_scm, make_vector_type (type); } type = check_typedef (type); - if (TYPE_LENGTH (type) != length) + if (type->length () != length) { *except_scmp = gdbscm_make_out_of_range_error (func_name, arg_pos, type_scm, diff --git a/gdb/guile/scm-pretty-print.c b/gdb/guile/scm-pretty-print.c index e2bc198..5e6bb12 100644 --- a/gdb/guile/scm-pretty-print.c +++ b/gdb/guile/scm-pretty-print.c @@ -969,7 +969,7 @@ gdbscm_apply_val_pretty_printer (const struct extension_language_defn *extlang, value_fetch_lazy (value); /* No pretty-printer support for unavailable values. */ - if (!value_bytes_available (value, 0, TYPE_LENGTH (type))) + if (!value_bytes_available (value, 0, type->length ())) return EXT_LANG_RC_NOP; if (!gdb_scheme_initialized) diff --git a/gdb/guile/scm-type.c b/gdb/guile/scm-type.c index 8914307..68a5b91 100644 --- a/gdb/guile/scm-type.c +++ b/gdb/guile/scm-type.c @@ -633,7 +633,7 @@ gdbscm_type_sizeof (SCM self) /* Ignore exceptions. */ - return scm_from_long (TYPE_LENGTH (type)); + return scm_from_long (type->length ()); } /* (type-strip-typedefs <gdb:type>) -> <gdb:type> diff --git a/gdb/guile/scm-value.c b/gdb/guile/scm-value.c index 4417c2d..0107a4b 100644 --- a/gdb/guile/scm-value.c +++ b/gdb/guile/scm-value.c @@ -827,7 +827,7 @@ gdbscm_value_to_bytevector (SCM self) try { type = check_typedef (type); - length = TYPE_LENGTH (type); + length = type->length (); contents = value_contents (value).data (); } catch (const gdb_exception &except) @@ -1104,7 +1104,7 @@ gdbscm_value_to_string (SCM self, SCM rest) gdbscm_dynwind_xfree (buffer_contents); result = scm_from_stringn ((const char *) buffer_contents, - length * TYPE_LENGTH (char_type), + length * char_type->length (), (encoding != NULL && *encoding != '\0' ? encoding : la_encoding), |