GDB (xrefs)
|
#include "defs.h"
#include "infcall.h"
#include "breakpoint.h"
#include "tracepoint.h"
#include "target.h"
#include "regcache.h"
#include "inferior.h"
#include "infrun.h"
#include "block.h"
#include "gdbcore.h"
#include "language.h"
#include "objfiles.h"
#include "gdbcmd.h"
#include "command.h"
#include "dummy-frame.h"
#include "ada-lang.h"
#include "f-lang.h"
#include "gdbthread.h"
#include "event-top.h"
#include "observable.h"
#include "top.h"
#include "ui.h"
#include "interps.h"
#include "thread-fsm.h"
#include <algorithm>
#include "gdbsupport/scope-exit.h"
#include <list>
Go to the source code of this file.
Classes | |
struct | call_return_meta_info |
struct | call_thread_fsm |
struct | destructor_info |
Macros | |
#define | infcall_debug_printf(fmt, ...) debug_prefixed_printf_cond (debug_infcall, "infcall", fmt, ##__VA_ARGS__) |
#define | INFCALL_SCOPED_DEBUG_ENTER_EXIT scoped_debug_enter_exit (debug_infcall, "infcall") |
#define | INFCALL_SCOPED_DEBUG_START_END(fmt, ...) scoped_debug_start_end (debug_infrun, "infcall", fmt, ##__VA_ARGS__) |
#define | RAW_FUNCTION_ADDRESS_FORMAT "at 0x%s" |
#define | RAW_FUNCTION_ADDRESS_SIZE |
Functions | |
static void | show_debug_infcall (struct ui_file *file, int from_tty, struct cmd_list_element *c, const char *value) |
static void | show_may_call_functions_p (struct ui_file *file, int from_tty, struct cmd_list_element *c, const char *value) |
static void | show_coerce_float_to_double_p (struct ui_file *file, int from_tty, struct cmd_list_element *c, const char *value) |
static void | show_unwind_on_signal_p (struct ui_file *file, int from_tty, struct cmd_list_element *c, const char *value) |
static void | show_unwind_on_terminating_exception_p (struct ui_file *file, int from_tty, struct cmd_list_element *c, const char *value) |
static struct value * | value_arg_coerce (struct gdbarch *gdbarch, struct value *arg, struct type *param_type, int is_prototyped) |
CORE_ADDR | find_function_addr (struct value *function, struct type **retval_type, struct type **function_type) |
static CORE_ADDR | push_dummy_code (struct gdbarch *gdbarch, CORE_ADDR sp, CORE_ADDR funaddr, gdb::array_view< value * > args, struct type *value_type, CORE_ADDR *real_pc, CORE_ADDR *bp_addr, struct regcache *regcache) |
void | error_call_unknown_return_type (const char *func_name) |
static const char * | get_function_name (CORE_ADDR funaddr, char *buf, int buf_size) |
static struct value * | get_call_return_value (struct call_return_meta_info *ri) |
static struct gdb_exception | run_inferior_call (std::unique_ptr< call_thread_fsm > sm, struct thread_info *call_thread, CORE_ADDR real_pc) |
static CORE_ADDR | reserve_stack_space (const type *values_type, CORE_ADDR &sp) |
static void | call_destructors (const std::list< destructor_info > &dtors_to_invoke, struct type *default_return_type) |
struct value * | call_function_by_hand (struct value *function, type *default_return_type, gdb::array_view< value * > args) |
struct value * | call_function_by_hand_dummy (struct value *function, type *default_return_type, gdb::array_view< value * > args, dummy_frame_dtor_ftype *dummy_dtor, void *dummy_dtor_data) |
void | _initialize_infcall () |
Variables | |
static bool | debug_infcall = false |
static bool | may_call_functions_p = true |
static bool | coerce_float_to_double_p = true |
static bool | unwind_on_signal_p = false |
static bool | unwind_on_terminating_exception_p = true |
#define infcall_debug_printf | ( | fmt, | |
... ) debug_prefixed_printf_cond (debug_infcall, "infcall", fmt, ##__VA_ARGS__) |
Definition at line 54 of file infcall.c.
Referenced by call_function_by_hand_dummy(), run_inferior_call(), and call_thread_fsm::should_notify_stop().
#define INFCALL_SCOPED_DEBUG_ENTER_EXIT scoped_debug_enter_exit (debug_infcall, "infcall") |
Definition at line 59 of file infcall.c.
Referenced by call_function_by_hand_dummy(), run_inferior_call(), call_thread_fsm::should_notify_stop(), and call_thread_fsm::should_stop().
#define INFCALL_SCOPED_DEBUG_START_END | ( | fmt, | |
... ) scoped_debug_start_end (debug_infrun, "infcall", fmt, ##__VA_ARGS__) |
#define RAW_FUNCTION_ADDRESS_FORMAT "at 0x%s" |
Definition at line 78 of file infcall.c.
Referenced by get_function_name().
#define RAW_FUNCTION_ADDRESS_SIZE |
Definition at line 79 of file infcall.c.
Referenced by call_function_by_hand_dummy().
void _initialize_infcall | ( | ) |
Definition at line 1641 of file infcall.c.
Referenced by initialize_all_files().
|
static |
Definition at line 811 of file infcall.c.
References call_function_by_hand().
Referenced by call_function_by_hand_dummy().
struct value * call_function_by_hand | ( | struct value * | function, |
type * | default_return_type, | ||
gdb::array_view< value * > | args ) |
Definition at line 824 of file infcall.c.
References call_function_by_hand_dummy().
Referenced by call_destructors(), call_function_by_hand_dummy(), call_target_sbrk(), checkpoint_command(), elf_gnu_ifunc_resolve_addr(), eval_op_objc_msgcall(), expr::ada_funcall_operation::evaluate(), expr::rust_structop::evaluate_funcall(), evaluate_subexp_do_call(), gdbscm_value_call(), inferior_call_waitpid(), linux_infcall_mmap(), linux_infcall_munmap(), lookup_child_selector(), lookup_objc_class(), print_object_command(), valpy_call(), value_allocate_space_in_inferior(), value_nsstring(), value_x_binop(), and value_x_unop().
struct value * call_function_by_hand_dummy | ( | struct value * | function, |
type * | default_return_type, | ||
gdb::array_view< value * > | args, | ||
dummy_frame_dtor_ftype * | dummy_dtor, | ||
void * | dummy_dtor_data ) |
Definition at line 851 of file infcall.c.
References value::address, AT_ENTRY_POINT, bp_call_dummy, builtin_type(), builtin_type::builtin_void, call_destructors(), call_function_by_hand(), call_thread_fsm::call_thread_fsm(), check_typedef(), class_or_union_p(), type::code(), command_interp(), current_program_space, current_ui, delete_std_terminate_breakpoint(), discard_infcall_control_state(), disp_del, breakpoint::disposition, dummy_frame_pop(), dummy_frame_push(), entry_point_address(), EVAL_NORMAL, EXEC_REVERSE, execution_direction, type::field(), field_name(), find_function_addr(), find_function_in_inferior(), find_overload_match(), find_pc_overlay(), frame_id_build(), gdbarch_breakpoint_from_pc(), gdbarch_call_dummy_location(), gdbarch_frame_align(), gdbarch_frame_align_p(), gdbarch_frame_red_zone_size(), gdbarch_inner_than(), gdbarch_push_dummy_call(), gdbarch_push_dummy_call_p(), gdbarch_return_in_first_hidden_param_p(), get_current_frame(), get_current_regcache(), get_frame_arch(), get_frame_sp(), get_function_name(), get_last_thread_stack_temporary(), get_traceframe_number(), infcall_debug_printf, INFCALL_SCOPED_DEBUG_ENTER_EXIT, gdb::observers::inferior_call_post, gdb::observers::inferior_call_pre, inferior_ptid, inferior_thread(), is_nocall_function(), type::is_prototyped(), type::is_stub(), language_pass_by_reference(), type::length(), lookup_pointer_type(), may_call_functions_p, maybe_remove_breakpoints(), METHOD, name, type::name(), noprocess(), type::num_fields(), ON_STACK, symtab_and_line::pc, symtab_and_line::pspace, push_dummy_code(), push_thread_stack_temporary(), RAW_FUNCTION_ADDRESS_SIZE, register_dummy_frame_dtor(), breakpoint::related_breakpoint, reserve_stack_space(), restore_infcall_control_state(), return_method_hidden_param, return_method_normal, return_method_struct, call_thread_fsm::return_value, run_inferior_call(), save_infcall_control_state(), save_infcall_suspend_state(), symtab_and_line::section, set_longjmp_breakpoint_for_call_dummy(), set_momentary_breakpoint(), set_std_terminate_breakpoint(), STOP_NONE, stop_stack_dummy, STOP_STD_TERMINATE, stopped_by_random_signal, target_has_execution(), type::target_type(), THREAD_EXITED, thread_stack_temporaries_enabled_p(), thread_state_string(), field::type(), value::type(), TYPE_FN_FIELD_PHYSNAME, TYPE_FN_FIELDLIST1, TYPE_FN_FIELDLIST_NAME, TYPE_NFN_FIELDS, unwind_on_signal_p, unwind_on_terminating_exception_p, using_struct_return(), value_arg_coerce(), value_from_contents_and_address(), value_from_pointer(), and write_memory().
Referenced by call_function_by_hand(), and compile_object_run().
void error_call_unknown_return_type | ( | const char * | func_name | ) |
Definition at line 395 of file infcall.c.
Referenced by expr::ada_funcall_operation::evaluate(), and evaluate_subexp_do_call().
CORE_ADDR find_function_addr | ( | struct value * | function, |
struct type ** | retval_type, | ||
struct type ** | function_type ) |
Definition at line 278 of file infcall.c.
References value::address, type::arch(), check_typedef(), type::code(), current_inferior(), find_function_type(), find_gnu_ifunc_target_type(), gdbarch_convert_from_func_ptr_addr(), gdbarch_deprecated_function_start_offset(), gnu_ifunc_resolve_addr, type::is_gnu_ifunc(), type::length(), value::lval(), lval_memory, type::target_type(), value::type(), value_addr(), value_as_address(), and value_as_long().
Referenced by alpha_push_dummy_call(), call_function_by_hand_dummy(), eval_op_objc_msgcall(), frv_push_dummy_call(), i386_thiscall_push_dummy_call(), ia64_push_dummy_call(), mips_eabi_push_dummy_call(), mips_n32n64_push_dummy_call(), mips_o32_push_dummy_call(), mips_o32_return_value(), mips_o64_push_dummy_call(), mips_o64_return_value(), mn10300_push_dummy_call(), ppc64_sysv_abi_push_dummy_call(), rs6000_push_dummy_call(), and value_ind().
|
static |
Definition at line 463 of file infcall.c.
References value::allocate(), class_or_union_p(), type::code(), value::force_lval(), call_return_meta_info::function, call_return_meta_info::gdbarch, gdbarch_return_value_as_value(), get_current_regcache(), inferior_thread(), push_thread_stack_temporary(), call_return_meta_info::struct_addr, call_return_meta_info::struct_return_p, thread_stack_temporaries_enabled_p(), value_at_non_lval(), value_from_contents_and_address(), and call_return_meta_info::value_type.
Referenced by call_thread_fsm::should_stop().
|
static |
Definition at line 413 of file infcall.c.
References find_pc_function(), lookup_minimal_symbol_by_pc(), bound_minimal_symbol::minsym, general_symbol_info::print_name(), and RAW_FUNCTION_ADDRESS_FORMAT.
Referenced by call_function_by_hand_dummy().
|
static |
Definition at line 377 of file infcall.c.
References gdbarch_push_dummy_code(), and gdbarch_push_dummy_code_p().
Referenced by call_function_by_hand_dummy(), and set_gdbarch_push_dummy_code().
|
static |
Definition at line 764 of file infcall.c.
References gdbarch_frame_align(), gdbarch_frame_align_p(), gdbarch_inner_than(), get_current_frame(), get_frame_arch(), and type::length().
Referenced by call_function_by_hand_dummy().
|
static |
Definition at line 632 of file infcall.c.
References all_non_exited_threads(), ui::async, async_disable_stdin(), async_enable_stdin(), breakpoint_auto_delete(), clear_proceed_status(), current_ui, disable_watchpoints_before_interactive_call_start(), enable_watchpoints_after_interactive_call_stop(), finish_thread_state(), infcall_debug_printf, INFCALL_SCOPED_DEBUG_ENTER_EXIT, inferior_ptid, infrun_debug_show_threads(), proceed(), PROMPT_BLOCKED, ui::prompt_state, STOP_STACK_DUMMY, stop_stack_dummy, THREAD_EXITED, THREAD_RUNNING, ui::unregister_file_handler(), user_visible_resume_ptid(), and wait_sync_command_done().
Referenced by call_function_by_hand_dummy().
|
static |
Definition at line 121 of file infcall.c.
References gdb_printf().
|
static |
Definition at line 70 of file infcall.c.
References gdb_printf().
|
static |
Definition at line 90 of file infcall.c.
References gdb_printf().
|
static |
Definition at line 139 of file infcall.c.
References gdb_printf().
|
static |
Definition at line 163 of file infcall.c.
References gdb_printf().
|
static |
Definition at line 181 of file infcall.c.
References ada_convert_actual(), builtin_type::builtin_double, builtin_type::builtin_int, builtin_type::builtin_long_double, builtin_type(), language_defn::c_style_arrays_p(), check_typedef(), type::code(), coerce_float_to_double_p, current_language, fortran_preserve_arg_pointer(), type::is_vector(), language_defn::la_language, language_ada, language_fortran, type::length(), lookup_pointer_type(), type::target_type(), value::type(), TYPE_CODE_UNDEF, TYPE_IS_REFERENCE, value_cast(), value_cast_pointers(), value_coerce_to_target(), and value_ref().
Referenced by call_function_by_hand_dummy().
|
static |
Definition at line 119 of file infcall.c.
Referenced by value_arg_coerce().
|
static |
Definition at line 88 of file infcall.c.
Referenced by call_function_by_hand_dummy().
|
static |
Definition at line 137 of file infcall.c.
Referenced by call_function_by_hand_dummy(), and call_thread_fsm::should_notify_stop().
|
static |
Definition at line 160 of file infcall.c.
Referenced by call_function_by_hand_dummy(), and call_thread_fsm::should_notify_stop().