diff options
author | Tom Tromey <tom@tromey.com> | 2023-02-10 10:48:50 -0700 |
---|---|---|
committer | Tom Tromey <tom@tromey.com> | 2023-02-13 15:24:27 -0700 |
commit | f28085dfb40901f064bd24a0030d9d73babe161e (patch) | |
tree | a0f9be1396f37429c9569b053b68169f4e77e68d /gdb/printcmd.c | |
parent | 736355f2e186a6a5275cac26d9486a5cc28f755c (diff) | |
download | gdb-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.c | 4 |
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 ()); |