diff options
author | Phil Muldoon <pmuldoon@redhat.com> | 2011-03-14 16:09:55 +0000 |
---|---|---|
committer | Phil Muldoon <pmuldoon@redhat.com> | 2011-03-14 16:09:55 +0000 |
commit | 7371cf6d8db5a0c04550fc95b1acc87857ac348c (patch) | |
tree | 9efe92bd981241731fcdae40a017da24e0c30ed0 /gdb/python/python.c | |
parent | 34e77a920a469734b88c8efc79be94be955b1029 (diff) | |
download | binutils-7371cf6d8db5a0c04550fc95b1acc87857ac348c.zip binutils-7371cf6d8db5a0c04550fc95b1acc87857ac348c.tar.gz binutils-7371cf6d8db5a0c04550fc95b1acc87857ac348c.tar.bz2 |
2011-03-14 Phil Muldoon <pmuldoon@redhat.com>
* gdb.texinfo (Breakpoints In Python): Add description and
example
of Python stop function operation.
2010-03-14 Phil Muldoon <pmuldoon@redhat.com>
* gdb.python/py-breakpoint.exp: Add Python stop operations
tests.
2011-03-14 Phil Muldoon <pmuldoon@redhat.com>
* python/python.h: Declare gdbpy_should_stop and
gdbpy_breakpoint_has_py_cond.
* python/python.c: Add python.h to includes. Remove
python.h from
HAVE_PYTHON definition
(gdbpy_should_stop): New dummy function.
(gdbpy_breakpoint_has_py_cond): New dummy function.
* python/py-breakpoint.c (bppy_init): Rewrite to allow
sub-classing capabilities.
(gdbpy_should_stop): New function.
(gdbpy_breakpoint_has_py_cond): New function.
(local_setattro): New function.
* breakpoint.c (condition_command): Add check for Python
'stop'
operation.
(bpstat_check_breakpoint_conditions): Execute Python
'stop'
operation function as part of stop/continue tests.
Diffstat (limited to 'gdb/python/python.c')
-rw-r--r-- | gdb/python/python.c | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/gdb/python/python.c b/gdb/python/python.c index 3b10d8c..2d7213a 100644 --- a/gdb/python/python.c +++ b/gdb/python/python.c @@ -30,6 +30,7 @@ #include "exceptions.h" #include "event-loop.h" #include "serial.h" +#include "python.h" #include <ctype.h> @@ -39,7 +40,6 @@ static int gdbpy_should_print_stack = 1; #ifdef HAVE_PYTHON -#include "python.h" #include "libiberty.h" #include "cli/cli-decode.h" #include "charset.h" @@ -864,6 +864,22 @@ source_python_script (FILE *stream, const char *file) _("Python scripting is not supported in this copy of GDB.")); } +int +gdbpy_should_stop (struct breakpoint_object *bp_obj) +{ + internal_error (__FILE__, __LINE__, + _("gdbpy_should_stop called when Python scripting is " \ + "not supported.")); +} + +int +gdbpy_breakpoint_has_py_cond (struct breakpoint_object *bp_obj) +{ + internal_error (__FILE__, __LINE__, + _("gdbpy_breakpoint_has_py_cond called when Python " \ + "scripting is not supported.")); +} + #endif /* HAVE_PYTHON */ |