[20/30] Use read_var_value overload in return_command

Message ID 20231029-split-objfile-2023-bound-sym-october-v1-20-612531df2734@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
linaro-tcwg-bot/tcwg_gdb_check--master-aarch64 success Testing passed
linaro-tcwg-bot/tcwg_gdb_check--master-arm success Testing passed

Commit Message

Tom Tromey Oct. 29, 2023, 11:23 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 52448ff98a5..0fba09a044c 100644
--- a/gdb/stack.c
+++ b/gdb/stack.c
@@ -2699,7 +2699,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)
@@ -2740,7 +2741,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)