aboutsummaryrefslogtreecommitdiff
path: root/gdb/python/python-internal.h
diff options
context:
space:
mode:
authorPhil Muldoon <pmuldoon@redhat.com>2010-04-09 09:41:43 +0000
committerPhil Muldoon <pmuldoon@redhat.com>2010-04-09 09:41:43 +0000
commitadc368187c7bc29c3c227cf986dd021973ce6eaf (patch)
treec01aaab1fc72d2ea058c1be7c717317312a38b81 /gdb/python/python-internal.h
parente760a81b7959d2d3474f12622be217ff218f5e06 (diff)
downloadgdb-adc368187c7bc29c3c227cf986dd021973ce6eaf.zip
gdb-adc368187c7bc29c3c227cf986dd021973ce6eaf.tar.gz
gdb-adc368187c7bc29c3c227cf986dd021973ce6eaf.tar.bz2
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.
Diffstat (limited to 'gdb/python/python-internal.h')
-rw-r--r--gdb/python/python-internal.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/gdb/python/python-internal.h b/gdb/python/python-internal.h
index e8fcfa9..98d2b3f 100644
--- a/gdb/python/python-internal.h
+++ b/gdb/python/python-internal.h
@@ -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);