aboutsummaryrefslogtreecommitdiff
path: root/gdb/printcmd.c
diff options
context:
space:
mode:
authorTom Tromey <tom@tromey.com>2023-02-10 10:48:50 -0700
committerTom Tromey <tom@tromey.com>2023-02-13 15:24:27 -0700
commitf28085dfb40901f064bd24a0030d9d73babe161e (patch)
treea0f9be1396f37429c9569b053b68169f4e77e68d /gdb/printcmd.c
parent736355f2e186a6a5275cac26d9486a5cc28f755c (diff)
downloadgdb-f28085dfb40901f064bd24a0030d9d73babe161e.zip
gdb-f28085dfb40901f064bd24a0030d9d73babe161e.tar.gz
gdb-f28085dfb40901f064bd24a0030d9d73babe161e.tar.bz2
Rely on value_ref_ptr::operator->
Simon pointed out some spots were doing val.get()->mumble, where val is a value_ref_ptr. These were introduced by the function-to-method script, replacing older code that passed the result of .get() to a function. Now that value.h is using methods, we can instead rely on operator->. This patch replaces all the newly-introduced instances of this. Approved-By: Simon Marchi <simon.marchi@efficios.com>
Diffstat (limited to 'gdb/printcmd.c')
-rw-r--r--gdb/printcmd.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/gdb/printcmd.c b/gdb/printcmd.c
index 13945ab..df47bcc 100644
--- a/gdb/printcmd.c
+++ b/gdb/printcmd.c
@@ -1934,7 +1934,7 @@ x_command (const char *exp, int from_tty)
/* Make last address examined available to the user as $_. Use
the correct pointer type. */
struct type *pointer_type
- = lookup_pointer_type (last_examine_value.get ()->type ());
+ = lookup_pointer_type (last_examine_value->type ());
set_internalvar (lookup_internalvar ("_"),
value_from_pointer (pointer_type,
last_examine_address));
@@ -1943,7 +1943,7 @@ x_command (const char *exp, int from_tty)
as $__. If the last value has not been fetched from memory
then don't fetch it now; instead mark it by voiding the $__
variable. */
- if (last_examine_value.get ()->lazy ())
+ if (last_examine_value->lazy ())
clear_internalvar (lookup_internalvar ("__"));
else
set_internalvar (lookup_internalvar ("__"), last_examine_value.get ());