aboutsummaryrefslogtreecommitdiff
path: root/gdb/python
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/python')
-rw-r--r--gdb/python/py-breakpoint.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/gdb/python/py-breakpoint.c b/gdb/python/py-breakpoint.c
index c278cac..448c95d 100644
--- a/gdb/python/py-breakpoint.c
+++ b/gdb/python/py-breakpoint.c
@@ -399,16 +399,16 @@ bppy_get_expression (PyObject *self, void *closure)
{
char *str;
breakpoint_object *obj = (breakpoint_object *) self;
+ struct watchpoint *wp;
BPPY_REQUIRE_VALID (obj);
- if (obj->bp->type != bp_watchpoint
- && obj->bp->type != bp_hardware_watchpoint
- && obj->bp->type != bp_read_watchpoint
- && obj->bp->type != bp_access_watchpoint)
+ if (!is_watchpoint (obj->bp))
Py_RETURN_NONE;
- str = obj->bp->exp_string;
+ wp = (struct watchpoint *) obj->bp;
+
+ str = wp->exp_string;
if (! str)
str = "";