aboutsummaryrefslogtreecommitdiff
path: root/gdb/valprint.c
diff options
context:
space:
mode:
authorSimon Marchi <simon.marchi@polymtl.ca>2021-01-28 10:12:10 -0500
committerSimon Marchi <simon.marchi@polymtl.ca>2021-01-28 10:12:10 -0500
commit8ee511afd84972c2019518725295440b3d2676bc (patch)
tree80875b064bc5fd0a182bda2c123be6aade583907 /gdb/valprint.c
parent6ac373717c28cc2befebd1e926dc5fcf39dda39f (diff)
downloadgdb-8ee511afd84972c2019518725295440b3d2676bc.zip
gdb-8ee511afd84972c2019518725295440b3d2676bc.tar.gz
gdb-8ee511afd84972c2019518725295440b3d2676bc.tar.bz2
gdb: rename get_type_arch to type::arch
... and update all users. gdb/ChangeLog: * gdbtypes.h (get_type_arch): Rename to... (struct type) <arch>: ... this, update all users. Change-Id: I0e3ef938a0afe798ac0da74a9976bbd1d082fc6f
Diffstat (limited to 'gdb/valprint.c')
-rw-r--r--gdb/valprint.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/gdb/valprint.c b/gdb/valprint.c
index 2c3541e..340a329 100644
--- a/gdb/valprint.c
+++ b/gdb/valprint.c
@@ -408,7 +408,7 @@ print_unpacked_pointer (struct type *type, struct type *elttype,
CORE_ADDR address, struct ui_file *stream,
const struct value_print_options *options)
{
- struct gdbarch *gdbarch = get_type_arch (type);
+ struct gdbarch *gdbarch = type->arch ();
if (elttype->code () == TYPE_CODE_FUNC)
{
@@ -483,7 +483,7 @@ static void
print_ref_address (struct type *type, const gdb_byte *address_buffer,
int embedded_offset, struct ui_file *stream)
{
- struct gdbarch *gdbarch = get_type_arch (type);
+ struct gdbarch *gdbarch = type->arch ();
if (address_buffer != NULL)
{
@@ -673,7 +673,7 @@ generic_val_print_enum (struct type *type,
const struct value_print_options *options)
{
LONGEST val;
- struct gdbarch *gdbarch = get_type_arch (type);
+ struct gdbarch *gdbarch = type->arch ();
int unit_size = gdbarch_addressable_memory_unit_size (gdbarch);
gdb_assert (!options->format);
@@ -694,7 +694,7 @@ generic_val_print_func (struct type *type,
struct value *original_value,
const struct value_print_options *options)
{
- struct gdbarch *gdbarch = get_type_arch (type);
+ struct gdbarch *gdbarch = type->arch ();
gdb_assert (!options->format);
@@ -1182,7 +1182,7 @@ val_print_type_code_flags (struct type *type, struct value *original_value,
+ embedded_offset);
ULONGEST val = unpack_long (type, valaddr);
int field, nfields = type->num_fields ();
- struct gdbarch *gdbarch = get_type_arch (type);
+ struct gdbarch *gdbarch = type->arch ();
struct type *bool_type = builtin_type (gdbarch)->builtin_bool;
fputs_filtered ("[", stream);
@@ -2713,7 +2713,7 @@ val_print_string (struct type *elttype, const char *encoding,
unsigned int fetchlimit; /* Maximum number of chars to print. */
int bytes_read;
gdb::unique_xmalloc_ptr<gdb_byte> buffer; /* Dynamically growable fetch buffer. */
- struct gdbarch *gdbarch = get_type_arch (elttype);
+ struct gdbarch *gdbarch = elttype->arch ();
enum bfd_endian byte_order = type_byte_order (elttype);
int width = TYPE_LENGTH (elttype);