diff options
author | Lancelot SIX <lancelot.six@amd.com> | 2022-02-02 06:34:12 -0500 |
---|---|---|
committer | Lancelot SIX <lancelot.six@amd.com> | 2022-02-15 09:52:37 +0000 |
commit | e6b3636709a19303859cb886f5212d5092837b27 (patch) | |
tree | b6e2d274a841110224a7c0753180185f635b0419 /gdb/inferior.h | |
parent | 3c4c0a18c8f0af039e65458da5f53811e9e43754 (diff) | |
download | fsf-binutils-gdb-e6b3636709a19303859cb886f5212d5092837b27.zip fsf-binutils-gdb-e6b3636709a19303859cb886f5212d5092837b27.tar.gz fsf-binutils-gdb-e6b3636709a19303859cb886f5212d5092837b27.tar.bz2 |
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 <simon.marchi@polymtl.ca>
Diffstat (limited to 'gdb/inferior.h')
-rw-r--r-- | gdb/inferior.h | 10 |
1 files changed, 8 insertions, 2 deletions
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 |