diff options
author | Jan Kratochvil <jan.kratochvil@redhat.com> | 2015-05-13 20:47:32 +0200 |
---|---|---|
committer | Jan Kratochvil <jan.kratochvil@redhat.com> | 2015-05-13 20:49:08 +0200 |
commit | 8a6c40311297f60ad13827650fdde13da301b505 (patch) | |
tree | 6637b3cd8faf502557b9f40b3e469bb86180a883 /gdb/inferior.h | |
parent | 109896905babca2d99e13f74bc887acf14cd1ab7 (diff) |
infcall: stop_registers -> register_dummy_frame_dtor
With dummy_frame destructors GDB no longer has to use global stop_registers.
dummy_frame's registers can be now stored associated with their specific
dummy_frame.
gdb/ChangeLog
2015-05-13 Jan Kratochvil <jan.kratochvil@redhat.com>
* infcall.c (struct dummy_frame_context_saver)
(dummy_frame_context_saver_data_free, dummy_frame_context_saver_dtor)
(dummy_frame_context_saver_drop, dummy_frame_context_saver_cleanup)
(dummy_frame_context_saver_get_regs, dummy_frame_context_saver_setup):
New.
(call_function_by_hand_dummy): Move discard_cleanups of
inf_status_cleanup before dummy_frame_push. Call
dummy_frame_context_saver_setup and prepare context_saver_cleanup.
Use dummy_frame_context_saver_get_regs instead of stop_registers.
* infcall.h (struct dummy_frame_context_saver)
(dummy_frame_context_saver_drop, dummy_frame_context_saver_cleanup)
(dummy_frame_context_saver_get_regs, dummy_frame_context_saver_setup):
New declarations.
* infcmd.c: Include infcall.h.
(get_return_value): Add parameter ctx_saver, use it instead of
stop_registers.
(print_return_value): Add parameter ctx_saver, pass it.
(struct finish_command_continuation_args): Add field ctx_saver.
(finish_command_continuation): Update print_return_value caller.
(finish_command_continuation_free_arg): Free also ctx_saver.
(finish_forward): Call dummy_frame_context_saver_setup.
* inferior.h (struct dummy_frame_context_saver): New declaration.
(get_return_value): Add parameter ctx_saver.
* python/py-finishbreakpoint.c (bpfinishpy_pre_stop_hook): Update
get_return_value caller.
Diffstat (limited to 'gdb/inferior.h')
-rw-r--r-- | gdb/inferior.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/gdb/inferior.h b/gdb/inferior.h index 253077733a..0d242fe790 100644 --- a/gdb/inferior.h +++ b/gdb/inferior.h @@ -165,8 +165,10 @@ extern void detach_command (char *, int); extern void notice_new_inferior (ptid_t, int, int); -extern struct value *get_return_value (struct value *function, - struct type *value_type); +struct dummy_frame_context_saver; +extern struct value *get_return_value + (struct value *function, struct type *value_type, + struct dummy_frame_context_saver *ctx_saver); /* Prepare for execution command. TARGET is the target that will run the command. BACKGROUND determines whether this is a foreground |