mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-05-23 18:26:47 +08:00
2010-04-09 Phil Muldoon <pmuldoon@redhat.com>
Thiago Jung Bauermann <bauerman@br.ibm.com> Tom Tromey <tromey@redhat.com> * breakpoint.c (condition_command): Simplify. Move condition setting code to ... (set_breakpoint_condition): ... here. New function. * breakpoint.h (set_breakpoint_condition): Declare. * Makefile.in (SUBDIR_PYTHON_OBS): Add py-breakpoint. (SUBDIR_PYTHON_SRCS): Likewise. (py-breakpoint.o): New rule. * python/py-breakpoint.c: New file. * python/python-internal.h (gdbpy_breakpoints) (gdbpy_initialize_breakpoints): Declare. (GDB_PY_SET_HANDLE_EXCEPTION) Define. 2010-04-09 Phil Muldoon <pmuldoon@redhat.com> * gdb.python/py-breakpoint.exp: New File. * gdb.python/py-breakpoint.C: Ditto. 2010-04-09 Phil Muldoon <pmuldoon@redhat.com> Thiago Jung Bauermann <bauerman@br.ibm.com> Tom Tromey <tromey@redhat.com> * gdb.texinfo (Breakpoints In Python): New Node.
This commit is contained in:
@ -75,6 +75,7 @@ extern PyTypeObject block_object_type;
|
||||
extern PyTypeObject symbol_object_type;
|
||||
|
||||
PyObject *gdbpy_history (PyObject *self, PyObject *args);
|
||||
PyObject *gdbpy_breakpoints (PyObject *, PyObject *);
|
||||
PyObject *gdbpy_frame_stop_reason_string (PyObject *, PyObject *);
|
||||
PyObject *gdbpy_lookup_symbol (PyObject *self, PyObject *args, PyObject *kw);
|
||||
PyObject *gdbpy_selected_frame (PyObject *self, PyObject *args);
|
||||
@ -82,6 +83,7 @@ PyObject *gdbpy_block_for_pc (PyObject *self, PyObject *args);
|
||||
PyObject *gdbpy_lookup_type (PyObject *self, PyObject *args, PyObject *kw);
|
||||
PyObject *gdbpy_create_lazy_string_object (CORE_ADDR address, long length,
|
||||
const char *encoding, struct type *type);
|
||||
PyObject *gdbpy_get_hook_function (const char *);
|
||||
|
||||
PyObject *symtab_and_line_to_sal_object (struct symtab_and_line sal);
|
||||
PyObject *symtab_to_symtab_object (struct symtab *symtab);
|
||||
@ -111,6 +113,7 @@ void gdbpy_initialize_blocks (void);
|
||||
void gdbpy_initialize_types (void);
|
||||
void gdbpy_initialize_functions (void);
|
||||
void gdbpy_initialize_objfile (void);
|
||||
void gdbpy_initialize_breakpoints (void);
|
||||
void gdbpy_initialize_lazy_string (void);
|
||||
|
||||
struct cleanup *make_cleanup_py_decref (PyObject *py);
|
||||
@ -131,6 +134,18 @@ extern const struct language_defn *python_language;
|
||||
"%s", Exception.message); \
|
||||
} while (0)
|
||||
|
||||
/* Use this after a TRY_EXCEPT to throw the appropriate Python
|
||||
exception. This macro is for use inside setter functions. */
|
||||
#define GDB_PY_SET_HANDLE_EXCEPTION(Exception) \
|
||||
do { \
|
||||
if (Exception.reason < 0) \
|
||||
{ \
|
||||
PyErr_Format (Exception.reason == RETURN_QUIT \
|
||||
? PyExc_KeyboardInterrupt : PyExc_RuntimeError, \
|
||||
"%s", Exception.message); \
|
||||
return -1; \
|
||||
} \
|
||||
} while (0)
|
||||
|
||||
void gdbpy_print_stack (void);
|
||||
|
||||
|
Reference in New Issue
Block a user