[v2,21/31] Use read_var_value overload in return_command

Message ID 20231105-split-objfile-2023-bound-sym-october-v2-21-dbd2d158bbc3@tromey.com
State New
Headers
Series Baby step for objfile splitting |

Checks

Context Check Description
linaro-tcwg-bot/tcwg_gdb_build--master-aarch64 success Testing passed
linaro-tcwg-bot/tcwg_gdb_build--master-arm success Testing passed

Commit Message

Tom Tromey Nov. 5, 2023, 6:11 p.m. UTC
  This changes return_command to use the new read_var_value overload.
---
 gdb/stack.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
  

Patch

diff --git a/gdb/stack.c b/gdb/stack.c
index a2ea7301394..f744baad61a 100644
--- a/gdb/stack.c
+++ b/gdb/stack.c
@@ -2692,7 +2692,8 @@  return_command (const char *retval_exp, int from_tty)
   std::string query_prefix;
 
   thisframe = get_selected_frame ("No selected frame.");
-  thisfun = get_frame_function (thisframe).symbol;
+  block_symbol b_fun = get_frame_function (thisframe);
+  thisfun = b_fun.symbol;
   gdbarch = get_frame_arch (thisframe);
 
   if (get_frame_type (get_current_frame ()) == INLINE_FRAME)
@@ -2733,7 +2734,7 @@  return_command (const char *retval_exp, int from_tty)
 	return_value->fetch_lazy ();
 
       if (thisfun != NULL)
-	function = read_var_value (thisfun, NULL, thisframe);
+	function = read_var_value (b_fun, thisframe);
 
       rv_conv = RETURN_VALUE_REGISTER_CONVENTION;
       if (return_type->code () == TYPE_CODE_VOID)