36#include "gdbsupport/common-utils.h"
54#define BPLOCPY_REQUIRE_VALID(Breakpoint, Location) \
56 if ((Breakpoint)->bp != (Location)->bp_loc->owner) \
57 return PyErr_Format (PyExc_RuntimeError, \
58 _("Breakpoint location is invalid.")); \
63#define BPLOCPY_SET_REQUIRE_VALID(Breakpoint, Location) \
65 if ((Breakpoint)->bp != (Location)->bp_loc->owner) \
67 PyErr_Format (PyExc_RuntimeError, \
68 _("Breakpoint location is invalid.")); \
88#define pybp_debug_printf(fmt, ...) \
89 debug_prefixed_printf_cond (pybp_debug, "py-breakpoint", fmt, ##__VA_ARGS__)
93#define PYBP_SCOPED_DEBUG_ENTER_EXIT \
94 scoped_debug_enter_exit (pybp_debug, "py-breakpoint")
132 {
"WP_READ", hw_read},
133 {
"WP_WRITE", hw_write},
134 {
"WP_ACCESS", hw_access},
184 if (newvalue == NULL)
186 PyErr_SetString (PyExc_TypeError,
187 _(
"Cannot delete `enabled' attribute."));
191 else if (! PyBool_Check (newvalue))
193 PyErr_SetString (PyExc_TypeError,
194 _(
"The value of `enabled' must be a boolean."));
198 cmp = PyObject_IsTrue (newvalue);
209 catch (
const gdb_exception &except)
226 if (newvalue == NULL)
228 PyErr_SetString (PyExc_TypeError,
229 _(
"Cannot delete `silent' attribute."));
232 else if (! PyBool_Check (newvalue))
234 PyErr_SetString (PyExc_TypeError,
235 _(
"The value of `silent' must be a boolean."));
239 cmp = PyObject_IsTrue (newvalue);
257 if (newvalue == NULL)
259 PyErr_SetString (PyExc_TypeError,
260 _(
"Cannot delete `thread' attribute."));
263 else if (PyLong_Check (newvalue))
270 PyErr_SetString (PyExc_RuntimeError,
271 _(
"Invalid thread ID."));
275 if (self_bp->
bp->
task != -1)
277 PyErr_SetString (PyExc_RuntimeError,
278 _(
"Cannot set both task and thread attributes."));
282 else if (newvalue == Py_None)
286 PyErr_SetString (PyExc_TypeError,
287 _(
"The value of `thread' must be an integer or None."));
293 PyErr_SetString (PyExc_RuntimeError,
294 _(
"Cannot have both 'thread' and 'inferior' "
295 "conditions on a breakpoint"));
314 if (newvalue == NULL)
316 PyErr_SetString (PyExc_TypeError,
317 _(
"Cannot delete 'inferior' attribute."));
320 else if (PyLong_Check (newvalue))
327 PyErr_SetString (PyExc_RuntimeError,
328 _(
"Invalid inferior ID."));
332 else if (newvalue == Py_None)
336 PyErr_SetString (PyExc_TypeError,
337 _(
"The value of 'inferior' must be an integer or None."));
344 PyErr_SetString (PyExc_RuntimeError,
345 _(
"Cannot set 'inferior' attribute on a gdb.Breakpoint "
350 if (self_bp->
bp->
thread != -1 &&
id != -1)
352 PyErr_SetString (PyExc_RuntimeError,
353 _(
"Cannot have both 'thread' and 'inferior' conditions "
358 if (self_bp->
bp->
task != -1 &&
id != -1)
360 PyErr_SetString (PyExc_RuntimeError,
361 _(
"Cannot have both 'task' and 'inferior' conditions "
381 if (newvalue == NULL)
383 PyErr_SetString (PyExc_TypeError,
384 _(
"Cannot delete `task' attribute."));
387 else if (PyLong_Check (newvalue))
396 catch (
const gdb_exception &except)
403 PyErr_SetString (PyExc_RuntimeError,
404 _(
"Invalid task ID."));
410 PyErr_SetString (PyExc_RuntimeError,
411 _(
"Cannot set both task and thread attributes."));
415 else if (newvalue == Py_None)
419 PyErr_SetString (PyExc_TypeError,
420 _(
"The value of `task' must be an integer or None."));
445 catch (
const gdb_exception &except)
463 if (newvalue == NULL)
465 PyErr_SetString (PyExc_TypeError,
466 _(
"Cannot delete `ignore_count' attribute."));
469 else if (!PyLong_Check (newvalue))
471 PyErr_SetString (PyExc_TypeError,
472 _(
"The value of `ignore_count' must be an integer."));
486 catch (
const gdb_exception &except)
502 if (newvalue == NULL)
504 PyErr_SetString (PyExc_TypeError,
505 _(
"Cannot delete `hit_count' attribute."));
517 PyErr_SetString (PyExc_AttributeError,
518 _(
"The value of `hit_count' must be zero."));
540 const char *str = obj->
bp->
locspec->to_string ();
558 watchpoint *wp = gdb::checked_static_cast<watchpoint *> (obj->
bp);
589 gdb::unique_xmalloc_ptr<char> exp_holder;
590 const char *exp = NULL;
592 struct gdb_exception except;
596 if (newvalue == NULL)
598 PyErr_SetString (PyExc_TypeError,
599 _(
"Cannot delete `condition' attribute."));
602 else if (newvalue == Py_None)
607 if (exp_holder == NULL)
609 exp = exp_holder.get ();
616 catch (gdb_exception &ex)
618 except = std::move (ex);
645 catch (
const gdb_exception &except)
660 struct gdb_exception except;
664 gdb::unique_xmalloc_ptr<char> commands
666 if (commands ==
nullptr)
672 char *save_ptr =
nullptr;
674 = [&] (std::string &buffer)
676 const char *result = strtok_r (first ? commands.get () :
nullptr,
685 catch (gdb_exception &ex)
687 except = std::move (ex);
803 if (self_bp->
bp->
task == -1)
848 if (py_bploc ==
nullptr)
855 py_bploc->owner = self_bp;
856 py_bploc->bp_loc = ref.release ();
857 if (PyList_Append (list.get (), (
PyObject *) py_bploc.get ()) != 0)
860 return list.release ();
868 char *function,
char *label,
875 if (source != NULL || function != NULL || label != NULL || line != NULL)
877 PyErr_SetString (PyExc_RuntimeError,
878 _(
"Breakpoints specified with spec cannot "
879 "have source, function, label or line defined."));
889 PyErr_SetString (PyExc_RuntimeError,
890 _(
"Watchpoints cannot be set by explicit "
891 "location parameters."));
897 if (source == NULL && function == NULL && label == NULL
900 PyErr_SetString (PyExc_RuntimeError,
901 _(
"Neither spec nor explicit location set."));
906 if (source != NULL && function == NULL && label == NULL
909 PyErr_SetString (PyExc_RuntimeError,
910 _(
"Specifying a source must also include a "
911 "line, label or function."));
923 static const char *keywords[] = {
"spec",
"type",
"wp_class",
"internal",
924 "temporary",
"source",
"function",
925 "label",
"line",
"qualified", NULL };
926 const char *spec = NULL;
928 int access_type = hw_write;
933 int temporary_bp = 0;
934 gdb::unique_xmalloc_ptr<char> line;
937 char *function = NULL;
941 &spec, &
type, &access_type,
944 &function, &label, &lineobj,
951 if (PyLong_Check (lineobj))
952 line = xstrprintf (
"%ld", PyLong_AsLong (lineobj));
953 else if (PyUnicode_Check (lineobj))
957 PyErr_SetString (PyExc_RuntimeError,
958 _(
"Line keyword should be an integer or a string. "));
965 internal_bp = PyObject_IsTrue (internal);
966 if (internal_bp == -1)
970 if (temporary != NULL)
972 temporary_bp = PyObject_IsTrue (temporary);
973 if (temporary_bp == -1)
994 = (qualified != NULL && PyObject_IsTrue (qualified)
1000 gdb::unique_xmalloc_ptr<char>
1001 copy_holder (xstrdup (skip_spaces (spec)));
1002 const char *copy = copy_holder.get ();
1006 func_name_match_type);
1010 std::unique_ptr<explicit_location_spec> explicit_loc
1013 explicit_loc->source_filename
1014 = source !=
nullptr ? xstrdup (source) :
nullptr;
1015 explicit_loc->function_name
1016 = function !=
nullptr ? xstrdup (function) :
nullptr;
1017 explicit_loc->label_name
1018 = label !=
nullptr ? xstrdup (label) :
nullptr;
1021 explicit_loc->line_offset
1024 explicit_loc->func_name_match_type = func_name_match_type;
1026 locspec.reset (explicit_loc.release ());
1033 locspec.get (), NULL, -1, -1, NULL,
false,
1039 0, 1, internal_bp, 0);
1044 spec = skip_spaces (spec);
1046 if (access_type == hw_write)
1048 else if (access_type == hw_access)
1050 else if (access_type == hw_read)
1053 error(_(
"Cannot understand watchpoint access type."));
1057 error (_(
"BP_CATCHPOINT not supported"));
1059 error(_(
"Do not understand breakpoint type to set."));
1062 catch (
const gdb_exception &except)
1079 if (
bp->bp ==
nullptr)
1080 return PyUnicode_FromFormat (
"<%s (invalid)>", Py_TYPE (self)->tp_name);
1082 std::string str =
" ";
1083 if (
bp->bp->thread != -1)
1084 str += string_printf (
"thread=%d ",
bp->bp->thread);
1085 if (
bp->bp->task > 0)
1086 str += string_printf (
"task=%d ",
bp->bp->task);
1087 if (
bp->bp->enable_count > 0)
1088 str += string_printf (
"enable_count=%d ",
bp->bp->enable_count);
1091 return PyUnicode_FromFormat (
"<%s%s number=%d hits=%d%s>",
1092 Py_TYPE (self)->tp_name,
1094 ?
"" :
" disabled"),
bp->bp->number,
1095 bp->bp->hit_count, str.c_str ());
1115 return PyList_Append (list,
bp) == 0;
1144 return PyTuple_New (0);
1156 return PyList_AsTuple (list.get ());
1182 if (PyObject_HasAttrString (py_bp,
stop_func))
1189 int evaluate = PyObject_IsTrue (result.get ());
1227 return PyObject_HasAttrString (py_bp,
stop_func);
1285 PyErr_SetString (PyExc_RuntimeError,
1286 _(
"Error while creating breakpoint from GDB."));
1316 if (bp_obj->is_finish_bp)
1434 if (strcmp (attr.get (),
stop_func) == 0)
1440 if (extlang == NULL)
1442 if (extlang != NULL)
1444 std::string error_text
1445 = string_printf (_(
"Only one stop condition allowed. There is"
1446 " currently a %s stop condition defined for"
1447 " this breakpoint."),
1449 PyErr_SetString (PyExc_RuntimeError, error_text.c_str ());
1454 return PyObject_GenericSetAttr (self,
name, v);
1459 "Boolean telling whether the breakpoint is enabled.", NULL },
1461 "Boolean telling whether the breakpoint is silent.", NULL },
1463 "Thread ID for the breakpoint.\n\
1464If the value is a thread ID (integer), then this is a thread-specific breakpoint.\n\
1465If the value is None, then this breakpoint is not thread-specific.\n\
1466No other type of value can be used.", NULL },
1468 "Inferior ID for the breakpoint.\n\
1469If the value is an inferior ID (integer), then this is an inferior-specific\n\
1470breakpoint. If the value is None, then this breakpoint is not\n\
1471inferior-specific. No other type of value can be used.", NULL },
1473 "Thread ID for the breakpoint.\n\
1474If the value is a task ID (integer), then this is an Ada task-specific breakpoint.\n\
1475If the value is None, then this breakpoint is not task-specific.\n\
1476No other type of value can be used.", NULL },
1478 "Number of times this breakpoint should be automatically continued.",
1481 "Breakpoint's number assigned by GDB.", NULL },
1483 "Number of times the breakpoint has been hit.\n\
1484Can be set to zero to clear the count. No other value is valid\n\
1485when setting this property.", NULL },
1487 "Location of the breakpoint, as specified by the user.", NULL},
1489 "Expression of the breakpoint, as specified by the user.", NULL},
1491 "Condition of the breakpoint, as specified by the user,\
1492or None if no condition set."},
1494 "Commands of the breakpoint, as specified by the user."},
1496 "Type of breakpoint."},
1498 "Whether the breakpoint is visible to the user."},
1500 "Whether this breakpoint is a temporary breakpoint."},
1502 "Whether this breakpoint is a pending breakpoint."},
1504 "Get locations where this breakpoint was set"},
1511 "Return true if this breakpoint is valid, false if not." },
1513 "Delete the underlying GDB breakpoint." },
1519 PyVarObject_HEAD_INIT (NULL, 0)
1538 Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
1539 "GDB breakpoint object",
1564 _(
"Set Python breakpoint debugging."),
1565 _(
"Show Python breakpoint debugging."),
1566 _(
"When on, Python breakpoint debugging is enabled."),
1584 if (newvalue ==
nullptr)
1586 PyErr_SetString (PyExc_TypeError,
1587 _(
"Cannot delete 'enabled' attribute."));
1590 else if (!PyBool_Check (newvalue))
1592 PyErr_SetString (PyExc_TypeError,
1593 _(
"The value of 'enabled' must be a boolean."));
1597 int cmp = PyObject_IsTrue (newvalue);
1605 catch (
const gdb_exception &except)
1621 if (self->bp_loc->enabled)
1647 Py_INCREF (self->owner);
1660 if (self->bp_loc->symtab)
1668 if (filename ==
nullptr)
1671 if (line ==
nullptr)
1673 if (PyTuple_SetItem (tup.get (), 0, filename.release ()) == -1
1674 || PyTuple_SetItem (tup.get (), 1, line.release ()) == -1)
1676 return tup.release ();
1690 const auto fn_name = self->bp_loc->function_name.get ();
1691 if (fn_name !=
nullptr)
1703 if (list ==
nullptr)
1707 if (
inf->pspace == self->bp_loc->pspace)
1712 if (PyList_Append (list.get (), num.release ()) != 0)
1716 return list.release ();
1725 const auto symtab = self->bp_loc->symtab;
1730 return fullname.release ();
1742 Py_XDECREF (self->owner);
1743 Py_TYPE (py_self)->tp_free (py_self);
1752 if (self->owner ==
nullptr || self->owner->bp ==
nullptr
1753 || self->owner->bp != self->bp_loc->owner)
1754 return PyUnicode_FromFormat (
"<%s (invalid)>", Py_TYPE (self)->tp_name);
1756 const auto enabled = self->bp_loc->enabled ?
"enabled" :
"disabled";
1758 std::string str (enabled);
1760 str += string_printf (
" address=%s",
1761 paddress (self->bp_loc->owner->gdbarch,
1762 self->bp_loc->address));
1764 if (self->bp_loc->requested_address != self->bp_loc->address)
1765 str += string_printf (
" requested_address=%s",
1766 paddress (self->bp_loc->owner->gdbarch,
1767 self->bp_loc->requested_address));
1768 if (self->bp_loc->symtab !=
nullptr)
1769 str += string_printf (
" source=%s:%d", self->bp_loc->symtab->filename,
1770 self->bp_loc->line_number);
1772 const auto fn_name = self->bp_loc->function_name.get ();
1773 if (fn_name !=
nullptr)
1779 return PyUnicode_FromFormat (
"<%s %s>", Py_TYPE (self)->tp_name,
1787 "Boolean telling whether the breakpoint is enabled.", NULL },
1789 "Get the breakpoint owner object", NULL },
1791 "Get address of where this location was set", NULL},
1793 "Get file and line number of where this location was set", NULL},
1795 "Get function of where this location was set", NULL },
1797 "Get fullname of where this location was set", NULL },
1799 "Get thread groups where this location is in", NULL },
1805 PyVarObject_HEAD_INIT (NULL, 0)
1806 "gdb.BreakpointLocation",
1825 "GDB breakpoint location object",
void enable_breakpoint(struct breakpoint *bpt)
void delete_breakpoint(struct breakpoint *bpt)
void enable_disable_bp_location(bp_location *loc, bool enable)
void breakpoint_set_thread(struct breakpoint *b, int thread)
void breakpoint_set_inferior(struct breakpoint *b, int inferior)
struct breakpoint * get_breakpoint(int num)
void watch_command_wrapper(const char *arg, int from_tty, bool internal)
void rwatch_command_wrapper(const char *arg, int from_tty, bool internal)
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)
bool is_watchpoint(const struct breakpoint *bpt)
void awatch_command_wrapper(const char *arg, int from_tty, bool internal)
struct command_line * breakpoint_commands(struct breakpoint *b)
void breakpoint_set_silent(struct breakpoint *b, int silent)
void disable_breakpoint(struct breakpoint *bpt)
void breakpoint_set_task(struct breakpoint *b, int task)
void breakpoint_set_commands(struct breakpoint *b, counted_command_line &&commands)
void set_ignore_count(int bptnum, int count, int from_tty)
void set_breakpoint_condition(struct breakpoint *b, const char *exp, int from_tty, bool force)
int user_breakpoint_p(struct breakpoint *b)
int pending_breakpoint_p(struct breakpoint *b)
const struct breakpoint_ops * breakpoint_ops_for_location_spec(const location_spec *locspec, bool is_tracepoint)
breakpoint_range all_breakpoints()
gdb::ref_ptr< bp_location, bp_location_ref_policy > bp_location_ref_ptr
static struct gdbarch * get_gdbarch()
const char * c_str() const
struct cmd_list_element * showdebuglist
struct cmd_list_element * setdebuglist
set_show_commands add_setshow_boolean_cmd(const char *name, enum command_class theclass, bool *var, const char *set_doc, const char *show_doc, const char *help_doc, cmd_func_ftype *set_func, show_value_ftype *show_func, struct cmd_list_element **set_list, struct cmd_list_element **show_list)
counted_command_line read_command_lines_1(read_next_line_ftype read_next_line_func, int parse_commands, gdb::function_view< void(const char *)> validator)
void print_command_lines(struct ui_out *uiout, struct command_line *cmd, unsigned int depth)
std::shared_ptr< command_line > counted_command_line
const struct extension_language_defn * get_breakpoint_cond_ext_lang(struct breakpoint *b, enum extension_language skip_lang)
const struct extension_language_defn * get_ext_lang_defn(enum extension_language lang)
const char * ext_lang_capitalized_name(const struct extension_language_defn *extlang)
int valid_global_thread_id(int global_id)
bool valid_global_inferior_id(int id)
all_inferiors_range all_inferiors(process_stratum_target *proc_target=nullptr)
const struct language_defn * current_language
struct line_offset linespec_parse_line_offset(const char *string)
location_spec_up string_to_location_spec(const char **stringp, const struct language_defn *language, symbol_name_match_type match_type)
std::unique_ptr< location_spec > location_spec_up
observable< struct breakpoint * > breakpoint_created
observable< struct breakpoint * > breakpoint_modified
observable< struct breakpoint * > breakpoint_deleted
PyObject * gdbpy_breakpoints(PyObject *self, PyObject *args)
static int bppy_init_validate_args(const char *spec, char *source, char *function, char *label, char *line, enum bptype type)
static void show_pybp_debug(struct ui_file *file, int from_tty, struct cmd_list_element *c, const char *value)
bool gdbpy_breakpoint_init_breakpoint_type()
static int CPYCHECKER_NEGATIVE_RESULT_SETS_EXCEPTION gdbpy_initialize_breakpoints(void)
PyTypeObject breakpoint_object_type
void _initialize_py_breakpoint()
static gdb_PyGetSetDef bp_location_object_getset[]
static int CPYCHECKER_NEGATIVE_RESULT_SETS_EXCEPTION gdbpy_initialize_breakpoint_locations()
static int bppy_set_inferior(PyObject *self, PyObject *newvalue, void *closure)
static void gdbpy_breakpoint_deleted(struct breakpoint *b)
#define BPLOCPY_SET_REQUIRE_VALID(Breakpoint, Location)
static void gdbpy_breakpoint_created(struct breakpoint *bp)
static int bplocpy_set_enabled(PyObject *py_self, PyObject *newvalue, void *closure)
#define PYBP_SCOPED_DEBUG_ENTER_EXIT
static int bppy_set_hit_count(PyObject *self, PyObject *newvalue, void *closure)
static PyObject * bplocpy_get_owner(PyObject *py_self, void *closure)
static PyObject * bppy_get_task(PyObject *self, void *closure)
static void gdbpy_breakpoint_modified(struct breakpoint *b)
static int bppy_set_ignore_count(PyObject *self, PyObject *newvalue, void *closure)
static PyObject * bppy_get_condition(PyObject *self, void *closure)
PyTypeObject breakpoint_location_object_type
static int bppy_set_commands(PyObject *self, PyObject *newvalue, void *closure)
static bool build_bp_list(struct breakpoint *b, PyObject *list)
static PyObject * bppy_repr(PyObject *self)
static PyObject * bppy_get_type(PyObject *self, void *closure)
static PyObject * bppy_get_hit_count(PyObject *self, void *closure)
static int bppy_set_silent(PyObject *self, PyObject *newvalue, void *closure)
static PyObject * bppy_delete_breakpoint(PyObject *self, PyObject *args)
static struct pybp_code pybp_codes[]
int gdbpy_breakpoint_has_cond(const struct extension_language_defn *extlang, struct breakpoint *b)
enum ext_lang_bp_stop gdbpy_breakpoint_cond_says_stop(const struct extension_language_defn *extlang, struct breakpoint *b)
static PyObject * bppy_get_location(PyObject *self, void *closure)
gdbpy_breakpoint_object * bppy_pending_object
static PyObject * bplocpy_repr(PyObject *py_self)
static int bppy_init(PyObject *self, PyObject *args, PyObject *kwargs)
static int bppy_set_task(PyObject *self, PyObject *newvalue, void *closure)
static PyObject * bppy_get_silent(PyObject *self, void *closure)
static gdb_PyGetSetDef breakpoint_object_getset[]
static int bppy_set_enabled(PyObject *self, PyObject *newvalue, void *closure)
static PyObject * bplocpy_get_source_location(PyObject *py_self, void *closure)
static int local_setattro(PyObject *self, PyObject *name, PyObject *v)
static PyObject * bppy_get_temporary(PyObject *self, void *closure)
static void bplocpy_dealloc(PyObject *py_self)
static PyObject * bplocpy_get_function(PyObject *py_self, void *closure)
static PyObject * bppy_get_thread(PyObject *self, void *closure)
static PyObject * bppy_get_pending(PyObject *self, void *closure)
static PyObject * bplocpy_get_thread_groups(PyObject *py_self, void *closure)
static int bppy_set_thread(PyObject *self, PyObject *newvalue, void *closure)
static PyObject * bppy_get_enabled(PyObject *self, void *closure)
static PyObject * bppy_get_locations(PyObject *self, void *closure)
static PyObject * bplocpy_get_address(PyObject *py_self, void *closure)
static PyObject * bppy_get_commands(PyObject *self, void *closure)
static PyObject * bplocpy_get_enabled(PyObject *py_self, void *closure)
static PyMethodDef breakpoint_object_methods[]
#define pybp_debug_printf(fmt,...)
static PyObject * bppy_is_valid(PyObject *self, PyObject *args)
static const char stop_func[]
#define BPLOCPY_REQUIRE_VALID(Breakpoint, Location)
static PyObject * bppy_get_number(PyObject *self, void *closure)
static int bppy_set_condition(PyObject *self, PyObject *newvalue, void *closure)
static PyObject * bppy_get_ignore_count(PyObject *self, void *closure)
static PyObject * bppy_get_inferior(PyObject *self, void *closure)
static PyObject * bppy_get_expression(PyObject *self, void *closure)
static struct pybp_code pybp_watch_types[]
static PyObject * bplocpy_get_fullname(PyObject *py_self, void *closure)
static PyObject * bppy_get_visibility(PyObject *self, void *closure)
int evpy_emit_event(PyObject *event, eventregistry_object *registry)
events_object gdb_py_events
bool evregpy_no_listeners_p(eventregistry_object *registry)
void bpfinishpy_post_stop_hook(struct gdbpy_breakpoint_object *bp_obj)
void bpfinishpy_pre_delete_hook(struct gdbpy_breakpoint_object *bp_obj)
void bpfinishpy_pre_stop_hook(struct gdbpy_breakpoint_object *bp_obj)
gdb::ref_ptr< T, gdbpy_ref_policy< T > > gdbpy_ref
gdbpy_ref host_string_to_python_string(const char *str)
gdbpy_ref gdb_py_object_from_longest(LONGEST l)
void gdbpy_convert_exception(const struct gdb_exception &exception)
int gdb_py_int_as_long(PyObject *obj, long *result)
int gdb_pymodule_addobject(PyObject *module, const char *name, PyObject *object)
gdb::unique_xmalloc_ptr< char > python_string_to_host_string(PyObject *obj)
gdbpy_ref gdb_py_object_from_ulongest(ULONGEST l)
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)
#define BPPY_SET_REQUIRE_VALID(Breakpoint)
#define BPPY_REQUIRE_VALID(Breakpoint)
#define GDB_PY_HANDLE_EXCEPTION(Exception)
static int gdb_PyArg_ParseTupleAndKeywords(PyObject *args, PyObject *kw, const char *format, const char **keywords,...)
counted_command_line commands
gdb::unique_xmalloc_ptr< char > cond_string
gdbpy_breakpoint_object * py_bp_object
enum enable_state enable_state
gdbpy_breakpoint_object * owner
PyObject_HEAD bp_location * bp_loc
gdb::unique_xmalloc_ptr< char > exp_string
const char * paddress(struct gdbarch *gdbarch, CORE_ADDR addr)
void gdb_printf(struct ui_file *stream, const char *format,...)