aboutsummaryrefslogtreecommitdiff
path: root/gdb/printcmd.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/printcmd.c')
-rw-r--r--gdb/printcmd.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/gdb/printcmd.c b/gdb/printcmd.c
index 6659c5a..d1cf72d 100644
--- a/gdb/printcmd.c
+++ b/gdb/printcmd.c
@@ -1290,7 +1290,9 @@ should_validate_memtags (gdbarch *gdbarch, struct value *value)
return false;
/* We do. Check whether it includes any tags. */
- return target_is_address_tagged (gdbarch, value_as_address (value));
+ struct type *val_type = value->type ();
+ const gdb_byte *data = value->contents ().data ();
+ return target_is_address_tagged (gdbarch, unpack_pointer (val_type, data));
}
/* Helper for parsing arguments for print_command_1. */
@@ -2394,7 +2396,7 @@ printf_c_string (struct ui_file *stream, const char *format,
}
else
{
- CORE_ADDR tem = value_as_address (value);;
+ CORE_ADDR tem = value_as_address (value);
if (tem == 0)
{
@@ -3183,9 +3185,7 @@ memory_tag_check_command (const char *args, int from_tty)
}
}
-void _initialize_printcmd ();
-void
-_initialize_printcmd ()
+INIT_GDB_FILE (printcmd)
{
struct cmd_list_element *c;