GDB (xrefs)
Defines | Functions | Variables
/home/stan/gdb/src/gdb/infcall.c File Reference
#include "defs.h"
#include "breakpoint.h"
#include "tracepoint.h"
#include "target.h"
#include "regcache.h"
#include "inferior.h"
#include "gdb_assert.h"
#include "block.h"
#include "gdbcore.h"
#include "language.h"
#include "objfiles.h"
#include "gdbcmd.h"
#include "command.h"
#include "gdb_string.h"
#include "infcall.h"
#include "dummy-frame.h"
#include "ada-lang.h"
#include "gdbthread.h"
#include "exceptions.h"

Go to the source code of this file.

Defines

#define RAW_FUNCTION_ADDRESS_FORMAT   "at 0x%s"
#define RAW_FUNCTION_ADDRESS_SIZE

Functions

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 valuevalue_arg_coerce (struct gdbarch *gdbarch, struct value *arg, struct type *param_type, int is_prototyped, CORE_ADDR *sp)
static struct typefind_function_return_type (CORE_ADDR pc)
CORE_ADDR find_function_addr (struct value *function, struct type **retval_type)
static CORE_ADDR push_dummy_code (struct gdbarch *gdbarch, CORE_ADDR sp, CORE_ADDR funaddr, struct value **args, int nargs, struct type *value_type, CORE_ADDR *real_pc, CORE_ADDR *bp_addr, struct regcache *regcache)
static const char * get_function_name (CORE_ADDR funaddr, char *buf, int buf_size)
static struct gdb_exception run_inferior_call (struct thread_info *call_thread, CORE_ADDR real_pc)
static void cleanup_delete_std_terminate_breakpoint (void *ignore)
struct valuecall_function_by_hand (struct value *function, int nargs, struct value **args)
void _initialize_infcall (void)

Variables

static int coerce_float_to_double_p = 1
static int unwind_on_signal_p = 0
static int unwind_on_terminating_exception_p = 1

Define Documentation

#define RAW_FUNCTION_ADDRESS_FORMAT   "at 0x%s"

Definition at line 42 of file infcall.c.

Referenced by get_function_name().

Value:
(sizeof (RAW_FUNCTION_ADDRESS_FORMAT) \
                                   + 2 * sizeof (CORE_ADDR))

Definition at line 43 of file infcall.c.

Referenced by call_function_by_hand().


Function Documentation

void _initialize_infcall ( void  )
struct value* call_function_by_hand ( struct value function,
int  nargs,
struct value **  args 
) [read]

Definition at line 462 of file infcall.c.

References _, allocate_value(), AT_ENTRY_POINT, bp_call_dummy, builtin_type::builtin_int, builtin_type(), builtin_type::builtin_void, check_typedef(), CHECK_TYPEDEF, cleanup_delete_std_terminate_breakpoint(), current_program_space, discard_cleanups(), discard_infcall_control_state(), disp_del, breakpoint::disposition, do_cleanups(), dummy_frame_pop(), dummy_frame_push(), entry_point_address(), gdb_exception::error, error(), EXEC_REVERSE, execution_direction, find_function_addr(), find_pc_overlay(), frame_id_build(), gdb_assert, 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(), gdbarch_return_value(), get_current_frame(), get_current_regcache(), get_frame_arch(), get_frame_sp(), get_function_name(), get_regcache_aspace(), get_traceframe_number(), inferior_ptid, inferior_thread(), init_sal(), internal_error(), language_pass_by_reference(), lookup_pointer_type(), make_cleanup(), make_cleanup_regcache_xfree(), make_cleanup_restore_infcall_control_state(), make_cleanup_restore_infcall_suspend_state(), memcpy(), gdb_exception::message, name, noprocess(), null_cleanup(), ON_STACK, symtab_and_line::pc, symtab_and_line::pspace, thread_info::ptid, ptid_equal(), push_dummy_code(), RAW_FUNCTION_ADDRESS_SIZE, read_value_memory(), gdb_exception::reason, regcache_cpy_no_passthrough(), regcache_xmalloc(), breakpoint::related_breakpoint, restore_infcall_control_state(), RETURN_ERROR, RETURN_QUIT, RETURN_VALUE_ABI_PRESERVES_ADDRESS, RETURN_VALUE_ABI_RETURNS_ADDRESS, RETURN_VALUE_REGISTER_CONVENTION, RETURN_VALUE_STRUCT_CONVENTION, 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(), sp, STOP_NONE, stop_registers, stop_stack_dummy, STOP_STACK_DUMMY, STOP_STD_TERMINATE, stopped_by_random_signal, target_has_execution, throw_error(), throw_exception(), TYPE_CODE, TYPE_CODE_METHOD, TYPE_CODE_PTR, TYPE_CODE_VOID, TYPE_FIELD_TYPE, TYPE_LENGTH, TYPE_NFIELDS, TYPE_PROTOTYPED, TYPE_TARGET_TYPE, unwind_on_signal_p, unwind_on_terminating_exception_p, using_struct_return(), value_addr(), value_arg_coerce(), value_contents_raw(), value_from_pointer(), value_type(), write_memory(), xfree(), and xmalloc().

Referenced by call_target_sbrk(), checkpoint_command(), elf_gnu_ifunc_resolve_addr(), evaluate_subexp_standard(), flush_ea_cache(), inferior_call_waitpid(), lookup_child_selector(), lookup_objc_class(), print_object_command(), value_allocate_space_in_inferior(), value_nsstring(), value_x_binop(), and value_x_unop().

static void cleanup_delete_std_terminate_breakpoint ( void *  ignore) [static]

Definition at line 438 of file infcall.c.

References delete_std_terminate_breakpoint().

Referenced by call_function_by_hand().

CORE_ADDR find_function_addr ( struct value function,
struct type **  retval_type 
)
static struct type* find_function_return_type ( CORE_ADDR  pc) [static, read]

Definition at line 232 of file infcall.c.

References BLOCK_START, find_pc_function(), SYMBOL_BLOCK_VALUE, SYMBOL_TYPE, and TYPE_TARGET_TYPE.

Referenced by find_function_addr().

static const char* get_function_name ( CORE_ADDR  funaddr,
char *  buf,
int  buf_size 
) [static]
static CORE_ADDR push_dummy_code ( struct gdbarch gdbarch,
CORE_ADDR  sp,
CORE_ADDR  funaddr,
struct value **  args,
int  nargs,
struct type value_type,
CORE_ADDR real_pc,
CORE_ADDR bp_addr,
struct regcache regcache 
) [static]
static struct gdb_exception run_inferior_call ( struct thread_info call_thread,
CORE_ADDR  real_pc 
) [static, read]
static void show_coerce_float_to_double_p ( struct ui_file file,
int  from_tty,
struct cmd_list_element c,
const char *  value 
) [static]

Definition at line 75 of file infcall.c.

References _, and fprintf_filtered().

static void show_unwind_on_signal_p ( struct ui_file file,
int  from_tty,
struct cmd_list_element c,
const char *  value 
) [static]

Definition at line 93 of file infcall.c.

References _, and fprintf_filtered().

static void show_unwind_on_terminating_exception_p ( struct ui_file file,
int  from_tty,
struct cmd_list_element c,
const char *  value 
) [static]

Definition at line 117 of file infcall.c.

References _, and fprintf_filtered().

static struct value* value_arg_coerce ( struct gdbarch gdbarch,
struct value arg,
struct type param_type,
int  is_prototyped,
CORE_ADDR sp 
) [static, read]

Variable Documentation

Definition at line 73 of file infcall.c.

Referenced by value_arg_coerce().

int unwind_on_signal_p = 0 [static]

Definition at line 91 of file infcall.c.

Referenced by call_function_by_hand().

Definition at line 114 of file infcall.c.

Referenced by call_function_by_hand().

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Defines