90 Py_TYPE (self)->tp_free (self);
111 struct symbol *func_symbol =
113 struct value *function =
130 catch (
const gdb_exception &except)
150 catch (
const gdb_exception &except)
162 static const char *keywords[] = {
"frame",
"internal", NULL };
165 PyObject *frame_obj = NULL;
170 PyObject *internal = NULL;
175 &frame_obj, &internal))
181 if (frame_obj == NULL)
188 PyErr_SetString (PyExc_ValueError,
189 _(
"Invalid ID for the `frame' object."));
196 PyErr_SetString (PyExc_ValueError,
197 _(
"\"FinishBreakpoint\" not "
198 "meaningful in the outermost "
203 PyErr_SetString (PyExc_ValueError,
204 _(
"\"FinishBreakpoint\" cannot "
205 "be set on a dummy frame."));
211 catch (
const gdb_exception &except)
217 if (PyErr_Occurred ())
222 PyErr_SetString (PyExc_ValueError,
223 _(
"No thread currently selected."));
231 internal_bp = PyObject_IsTrue (internal);
232 if (internal_bp == -1)
234 PyErr_SetString (PyExc_ValueError,
235 _(
"The value of `internal' must be a boolean."));
249 if (function !=
nullptr)
251 struct type *ret_type =
255 if (ret_type->
code () != TYPE_CODE_VOID)
270 catch (
const gdb_exception &except)
297 locspec.get (), NULL, thread, NULL,
false,
304 0, 1, internal_bp, 0);
306 catch (
const gdb_exception &except)
328 PyObject *py_obj = (PyObject *) bp_obj;
335 if (meth_result == NULL)
368 catch (
const gdb_exception &except)
417 "py-finishbreakpoint");
419 "py-finishbreakpoint");
426 "gdb.Value object representing the return value, if any. \
427None otherwise.", NULL },
433 PyVarObject_HEAD_INIT (NULL, 0)
434 "gdb.FinishBreakpoint",
452 Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
453 "GDB finish breakpoint object",
struct gdbarch * target_gdbarch(void)
struct symbol * find_pc_function(CORE_ADDR pc)
void delete_breakpoint(struct breakpoint *bpt)
const struct breakpoint_ops code_breakpoint_ops
int create_breakpoint(struct gdbarch *gdbarch, location_spec *locspec, const char *cond_string, int thread, const char *extra_string, bool force_condition, 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)
void disable_breakpoint(struct breakpoint *bpt)
breakpoint_safe_range all_breakpoints_safe()
static struct gdbarch * get_gdbarch()
struct program_space * pspace
struct value * read_var_value(struct symbol *var, const struct block *var_block, frame_info_ptr frame)
CORE_ADDR get_frame_pc(frame_info_ptr frame)
enum frame_type get_frame_type(frame_info_ptr frame)
bool get_frame_pc_if_available(frame_info_ptr frame, CORE_ADDR *pc)
frame_info_ptr frame_find_by_id(struct frame_id id)
frame_info_ptr get_current_frame(void)
struct frame_id get_frame_id(frame_info_ptr fi)
frame_info_ptr get_prev_frame(frame_info_ptr this_frame)
struct thread_info * inferior_thread(void)
struct type * check_typedef(struct type *type)
struct value * get_return_value(struct symbol *func_symbol, struct value *function)
struct inferior * current_inferior(void)
location_spec_up new_address_location_spec(CORE_ADDR addr, const char *addr_string, int addr_string_len)
std::unique_ptr< location_spec > location_spec_up
observable< struct inferior * > inferior_exit
observable< struct bpstat *, int > normal_stop
struct program_space * current_program_space
bool gdbpy_breakpoint_init_breakpoint_type()
PyTypeObject breakpoint_object_type
gdbpy_breakpoint_object * bppy_pending_object
PyTypeObject finish_breakpoint_object_type
static int bpfinishpy_init(PyObject *self, PyObject *args, PyObject *kwargs)
static void bpfinishpy_detect_out_scope_cb(struct breakpoint *b, struct breakpoint *bp_stopped)
void bpfinishpy_post_stop_hook(struct gdbpy_breakpoint_object *bp_obj)
static void bpfinishpy_handle_stop(struct bpstat *bs, int print_frame)
static const char outofscope_func[]
static void bpfinishpy_handle_exit(struct inferior *inf)
static void bpfinishpy_out_of_scope(struct finish_breakpoint_object *bpfinish_obj)
static void bpfinishpy_dealloc(PyObject *self)
static PyObject * bpfinishpy_get_returnvalue(PyObject *self, void *closure)
void bpfinishpy_pre_stop_hook(struct gdbpy_breakpoint_object *bp_obj)
static gdb_PyGetSetDef finish_breakpoint_object_getset[]
int gdbpy_initialize_finishbreakpoints(void)
frame_info_ptr frame_object_to_frame_info(PyObject *obj)
gdb::ref_ptr< T, gdbpy_ref_policy< T > > gdbpy_ref
struct symbol * symbol_object_to_symbol(PyObject *obj)
PyObject * symbol_to_symbol_object(struct symbol *sym)
void gdbpy_convert_exception(const struct gdb_exception &exception)
int gdb_pymodule_addobject(PyObject *module, const char *name, PyObject *object)
PyObject * value_to_value_object(struct value *val)
struct value * value_object_to_value(PyObject *self)
void gdbpy_print_stack(void)
#define PyObject_CallMethod
#define CPYCHECKER_TYPE_OBJECT_FOR_TYPEDEF(ARG)
#define GDB_PY_SET_HANDLE_EXCEPTION(Exception)
static int gdb_PyArg_ParseTupleAndKeywords(PyObject *args, PyObject *kw, const char *format, const char **keywords,...)
static void print_frame(const frame_print_options &opts, frame_info_ptr frame, int print_level, enum print_what print_what, int print_args, struct symtab_and_line sal)
struct breakpoint * breakpoint_at
gdbpy_breakpoint_object * py_bp_object
enum enable_state enable_state
gdbpy_breakpoint_object py_bp
PyObject * function_value
struct type * type() const
struct type * target_type() const
int target_has_registers()