107 struct value *
function =
159 static const char *keywords[] = {
"frame",
"internal", NULL };
162 PyObject *frame_obj = NULL;
167 PyObject *
internal = NULL;
173 &frame_obj, &
internal))
179 if (frame_obj == NULL)
186 PyErr_SetString (PyExc_ValueError,
187 _(
"Invalid ID for the `frame' object."));
194 PyErr_SetString (PyExc_ValueError,
195 _(
"\"FinishBreakpoint\" not " 196 "meaningful in the outermost " 201 PyErr_SetString (PyExc_ValueError,
202 _(
"\"FinishBreakpoint\" cannot " 203 "be set on a dummy frame."));
209 PyErr_SetString (PyExc_ValueError,
210 _(
"Invalid ID for the `frame' object."));
221 if (PyErr_Occurred ())
227 PyErr_SetString (PyExc_ValueError,
228 _(
"No thread currently selected."));
234 internal_bp = PyObject_IsTrue (
internal);
235 if (internal_bp == -1)
237 PyErr_SetString (PyExc_ValueError,
238 _(
"The value of `internal' must be a boolean."));
252 if (
function != NULL)
254 struct type *ret_type =
260 struct value *func_value;
300 location.get (), NULL, thread, NULL,
307 0, 1, internal_bp, 0);
332 PyObject *py_obj = (PyObject *) bp_obj;
339 if (meth_result == NULL)
427 "gdb.Value object representing the return value, if any. \ 428 None otherwise.", NULL },
435 "gdb.FinishBreakpoint",
453 Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
struct gdbarch * target_gdbarch(void)
struct frame_info * frame_find_by_id(struct frame_id id)
int gdb_pymodule_addobject(PyObject *module, const char *name, PyObject *object)
struct value * get_return_value(struct value *function, struct type *value_type)
#define target_has_registers
void bpfinishpy_pre_stop_hook(struct gdbpy_breakpoint_object *bp_obj)
int gdbpy_initialize_finishbreakpoints(void)
CORE_ADDR get_frame_pc(struct frame_info *frame)
struct frame_info * get_current_frame(void)
gdbpy_breakpoint_object * bppy_pending_object
union value::@186 location
struct frame_info * get_prev_frame(struct frame_info *this_frame)
struct type * type_object_to_type(PyObject *obj)
const struct frame_id null_frame_id
int get_frame_pc_if_available(struct frame_info *frame, CORE_ADDR *pc)
static void bpfinishpy_handle_exit(struct inferior *inf)
PyObject * function_value
static gdb_PyGetSetDef finish_breakpoint_object_getset[]
static int bpfinishpy_detect_out_scope_cb(struct breakpoint *b, void *args)
struct observer * observer_attach_inferior_exit(observer_inferior_exit_ftype *f)
static int gdb_PyArg_ParseTupleAndKeywords(PyObject *args, PyObject *kw, const char *format, const char **keywords,...)
static void bpfinishpy_handle_stop(struct bpstats *bs, int print_frame)
#define PyVarObject_HEAD_INIT(type, size)
static const char outofscope_func[]
struct program_space * pspace
static int bpfinishpy_init(PyObject *self, PyObject *args, PyObject *kwargs)
int frame_id_eq(struct frame_id l, struct frame_id r)
gdbpy_breakpoint_object py_bp
enum frame_type get_frame_type(struct frame_info *frame)
struct frame_id get_frame_id(struct frame_info *fi)
#define CATCH(EXCEPTION, MASK)
struct breakpoint * iterate_over_breakpoints(int(*callback)(struct breakpoint *, void *), void *data)
struct value * read_var_value(struct symbol *var, const struct block *var_block, struct frame_info *frame)
struct symbol * find_pc_function(CORE_ADDR pc)
gdbpy_breakpoint_object * py_bp_object
int ptid_to_global_thread_id(ptid_t ptid)
void disable_breakpoint(struct breakpoint *bpt)
#define GDB_PY_SET_HANDLE_EXCEPTION(Exception)
struct gdbarch * get_current_arch(void)
struct gdbarch * python_gdbarch
PyObject * value_to_value_object(struct value *val)
static PyObject * bpfinishpy_get_returnvalue(PyObject *self, void *closure)
std::unique_ptr< event_location, event_location_deleter > event_location_up
struct breakpoint_ops bkpt_breakpoint_ops
event_location_up new_address_location(CORE_ADDR addr, const char *addr_string, int addr_string_len)
struct breakpoint * breakpoint_at
PyTypeObject finish_breakpoint_object_type
PyTypeObject breakpoint_object_type
static void print_frame(struct frame_info *frame, int print_level, enum print_what print_what, int print_args, struct symtab_and_line sal)
const struct language_defn * current_language
#define TYPE_TARGET_TYPE(thistype)
void gdbpy_convert_exception(struct gdb_exception exception)
#define TYPE_CODE(thistype)
void gdbpy_print_stack(void)
int create_breakpoint(struct gdbarch *gdbarch, const struct event_location *location, const char *cond_string, int thread, const char *extra_string, int parse_extra, int tempflag, enum bptype type_wanted, int ignore_count, enum auto_boolean pending_break_support, const struct breakpoint_ops *ops, int from_tty, int enabled, int internal, unsigned flags)
static void bpfinishpy_out_of_scope(struct finish_breakpoint_object *bpfinish_obj)
struct inferior * current_inferior(void)
struct program_space * current_program_space
struct observer * observer_attach_normal_stop(observer_normal_stop_ftype *f)
static void bpfinishpy_dealloc(PyObject *self)
struct type * value_type(const struct value *value)
#define SYMBOL_TYPE(symbol)
struct value * value_object_to_value(PyObject *self)
PyTypeObject finish_breakpoint_object_type CPYCHECKER_TYPE_OBJECT_FOR_TYPEDEF("finish_breakpoint_object")
#define PyObject_CallMethod
struct frame_info * frame_object_to_frame_info(PyObject *obj)
enum enable_state enable_state
void delete_breakpoint(struct breakpoint *bpt)
#define PyObject_HasAttrString(obj, attr)
void bpfinishpy_post_stop_hook(struct gdbpy_breakpoint_object *bp_obj)
PyObject * type_to_type_object(struct type *type)