95 Py_TYPE (self)->tp_free (self);
118 struct symbol *func_symbol =
120 struct value *function =
137 catch (
const gdb_exception &except)
157 catch (
const gdb_exception &except)
169 static const char *keywords[] = {
"frame",
"internal", NULL };
182 &frame_obj, &internal))
188 if (frame_obj == NULL)
195 PyErr_SetString (PyExc_ValueError,
196 _(
"Invalid ID for the `frame' object."));
203 PyErr_SetString (PyExc_ValueError,
204 _(
"\"FinishBreakpoint\" not "
205 "meaningful in the outermost "
210 PyErr_SetString (PyExc_ValueError,
211 _(
"\"FinishBreakpoint\" cannot "
212 "be set on a dummy frame."));
218 catch (
const gdb_exception &except)
224 if (PyErr_Occurred ())
229 PyErr_SetString (PyExc_ValueError,
230 _(
"No thread currently selected."));
238 internal_bp = PyObject_IsTrue (internal);
239 if (internal_bp == -1)
241 PyErr_SetString (PyExc_ValueError,
242 _(
"The value of `internal' must be a boolean."));
256 if (function !=
nullptr)
258 struct type *ret_type =
262 if (ret_type->
code () != TYPE_CODE_VOID)
279 catch (
const gdb_exception_forced_quit &except)
283 catch (
const gdb_exception &except)
310 locspec.get (), NULL, thread, -1, NULL,
false,
317 0, 1, internal_bp, 0);
319 catch (
const gdb_exception &except)
349 if (meth_result == NULL)
391 catch (
const gdb_exception &except)
452 "py-finishbreakpoint");
454 "py-finishbreakpoint");
465 "gdb.Value object representing the return value, if any. \
466None otherwise.", NULL },
472 PyVarObject_HEAD_INIT (NULL, 0)
473 "gdb.FinishBreakpoint",
491 Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
492 "GDB finish breakpoint object",
struct gdbarch * target_gdbarch(void)
struct symbol * find_pc_function(CORE_ADDR pc)
void delete_breakpoint(struct breakpoint *bpt)
int create_breakpoint(struct gdbarch *gdbarch, location_spec *locspec, const char *cond_string, int thread, int inferior, 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)
const struct breakpoint_ops code_breakpoint_ops
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)
void bpfinishpy_post_stop_hook(struct gdbpy_breakpoint_object *bp_obj)
static void bpfinishpy_handle_stop(struct bpstat *bs, int print_frame)
void bpfinishpy_pre_delete_hook(struct gdbpy_breakpoint_object *bp_obj)
static const char outofscope_func[]
static int CPYCHECKER_NEGATIVE_RESULT_SETS_EXCEPTION gdbpy_initialize_finishbreakpoints(void)
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[]
static void bpfinishpy_detect_out_scope_cb(struct breakpoint *b, struct breakpoint *bp_stopped, bool delete_bp)
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 CPYCHECKER_NEGATIVE_RESULT_SETS_EXCEPTION
#define GDBPY_INITIALIZE_FILE(INIT,...)
#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
struct frame_id initiating_frame
gdbpy_breakpoint_object py_bp
PyObject * function_value
struct type * type() const
struct type * target_type() const
int target_has_registers()
void quit_force(int *exit_arg, int from_tty)