diff options
author | Andrew Burgess <andrew.burgess@embecosm.com> | 2018-04-08 11:07:56 +0100 |
---|---|---|
committer | Andrew Burgess <andrew.burgess@embecosm.com> | 2018-07-10 12:46:56 +0100 |
commit | 42ecac1732194293568ab6093c742ca74c1dbdf6 (patch) | |
tree | cdbbcf82cc2545e97eb273ab86db6383264e2206 /gdb/riscv-tdep.c | |
parent | 7153abac62fd8d7f20a307c85e3aa77a020ffc42 (diff) | |
download | gdb-42ecac1732194293568ab6093c742ca74c1dbdf6.zip gdb-42ecac1732194293568ab6093c742ca74c1dbdf6.tar.gz gdb-42ecac1732194293568ab6093c742ca74c1dbdf6.tar.bz2 |
gdb/riscv: Use TYPE_SAFE_NAME
In debug printing, use TYPE_SAFE_NAME instead of replicating the
functionality using TYPE_NAME and a null check.
gdb/ChangeLog:
* riscv-tdep.c (riscv_print_arg_location): Use TYPE_SAFE_NAME.
Diffstat (limited to 'gdb/riscv-tdep.c')
-rw-r--r-- | gdb/riscv-tdep.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/gdb/riscv-tdep.c b/gdb/riscv-tdep.c index 4c68ef7..e2be993 100644 --- a/gdb/riscv-tdep.c +++ b/gdb/riscv-tdep.c @@ -1939,12 +1939,8 @@ riscv_print_arg_location (ui_file *stream, struct gdbarch *gdbarch, struct riscv_arg_info *info, CORE_ADDR sp_refs, CORE_ADDR sp_args) { - const char* type_name = TYPE_NAME (info->type); - if (type_name == nullptr) - type_name = "???"; - fprintf_unfiltered (stream, "type: '%s', length: 0x%x, alignment: 0x%x", - type_name, info->length, info->align); + TYPE_SAFE_NAME (info->type), info->length, info->align); switch (info->argloc[0].loc_type) { case riscv_arg_info::location::in_reg: |