From e6b3636709a19303859cb886f5212d5092837b27 Mon Sep 17 00:00:00 2001 From: Lancelot SIX Date: Wed, 2 Feb 2022 06:34:12 -0500 Subject: gdb: add a symbol* argument to get_return_value Add an argument to the get_return_value function to indicate the symbol of the function the debuggee is returning from. This will be used by the following patch. Since the function return type can be deduced from the symbol remove the value_type argument which becomes redundant. No user visible change after this patch. Tested on x86_64-linux. Change-Id: Idf1279f1f7199f5022738a6679e0fa63fbd22edc Co-authored-by: Simon Marchi --- gdb/inferior.h | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'gdb/inferior.h') diff --git a/gdb/inferior.h b/gdb/inferior.h index ec0fb6e..45de3c2 100644 --- a/gdb/inferior.h +++ b/gdb/inferior.h @@ -219,8 +219,14 @@ extern void detach_command (const char *, int); extern void notice_new_inferior (struct thread_info *, bool, int); -extern struct value *get_return_value (struct value *function, - struct type *value_type); +/* Return the value of the result of a function at the end of a 'finish' + command/BP. If the result's value cannot be retrieved, return NULL. + + FUNC_SYMBOL is the symbol of the function being returned from. FUNCTION is + a value containing the address of the function. */ + +extern struct value *get_return_value (struct symbol *func_symbol, + struct value *function); /* Prepare for execution command. TARGET is the target that will run the command. BACKGROUND determines whether this is a foreground -- cgit v1.1