forked from Imagelibrary/binutils-gdb
Export "finish" return value to Python
This patch changes the Python "stop" event emission code to also add the function return value, if it is known. This happens when the stop comes from a "finish" command and when the value can be fetched. The test is in the next patch. Reviewed-By: Eli Zaretskii <eliz@gnu.org>
This commit is contained in:
17
gdb/infcmd.c
17
gdb/infcmd.c
@@ -1484,23 +1484,6 @@ get_return_value (struct symbol *func_symbol, struct value *function)
|
||||
return value;
|
||||
}
|
||||
|
||||
/* The captured function return value/type and its position in the
|
||||
value history. */
|
||||
|
||||
struct return_value_info
|
||||
{
|
||||
/* The captured return value. May be NULL if we weren't able to
|
||||
retrieve it. See get_return_value. */
|
||||
struct value *value;
|
||||
|
||||
/* The return type. In some cases, we'll not be able extract the
|
||||
return value, but we always know the type. */
|
||||
struct type *type;
|
||||
|
||||
/* If we captured a value, this is the value history index. */
|
||||
int value_history_index;
|
||||
};
|
||||
|
||||
/* Helper for print_return_value. */
|
||||
|
||||
static void
|
||||
|
||||
Reference in New Issue
Block a user