diff options
author | Pedro Alves <palves@redhat.com> | 2011-07-25 11:23:03 +0000 |
---|---|---|
committer | Pedro Alves <palves@redhat.com> | 2011-07-25 11:23:03 +0000 |
commit | 3a5c3e2258c6ebafc2c53ee006c59314bb95de92 (patch) | |
tree | 8b72f3abe0084c33069e0b7fbf6f1fbd99060b9c /gdb/python | |
parent | 2060206eaf1f2784e57b350612dc6901504b526f (diff) | |
download | gdb-3a5c3e2258c6ebafc2c53ee006c59314bb95de92.zip gdb-3a5c3e2258c6ebafc2c53ee006c59314bb95de92.tar.gz gdb-3a5c3e2258c6ebafc2c53ee006c59314bb95de92.tar.bz2 |
2011-07-25 Pedro Alves <pedro@codesourcery.com>
gdb/
* breakpoint.h (struct breakpoint): Move ops as first field. Move
exp_string, exp_string_reparse, exp, exp_valid_block, cond_exp,
cond_exp_valid_block, val, val_valid, watchpoint_frame,
watchpoint_thread, watchpoint_triggered ...
(struct watchpoint): ... to this new struct.
(is_watchpoint): Declare.
(install_breakpoint): Add new `internal' parameter.
* breakpoint.c (is_watchpoint): Delete declaration.
(set_breakpoint_condition): Handle watchpoints.
(is_watchpoint): Make public.
(watchpoint_in_thread_scope): Change parameter type to struct
watchpoint.
(watchpoint_del_at_next_stop): Change parameter type to struct
watchpoint. Remove assertion. Adjust.
(update_watchpoint): Ditto.
(insert_breakpoints, breakpoint_init_inferior)
(watchpoints_triggered, watchpoint_check)
(bpstat_check_watchpoint, bpstat_check_breakpoint_conditions)
(bpstat_stop_status, print_one_breakpoint_location)
(print_one_breakpoint_location, watchpoint_locations_match): Cast
to struct watchpoint as necessary, and adjust.
(install_breakpoint): Add `internal' argument. If true, don't
mention the new breakpoint. Use set_breakpoint_number.
(create_fork_vfork_event_catchpoint)
(create_syscall_event_catchpoint): Adjust.
(dtor_watchpoint): New.
(re_set_watchpoint, insert_watchpoint, remove_watchpoint)
(breakpoint_hit_watchpoint, resources_needed_watchpoint)
(print_it_watchpoint, print_mention_watchpoint)
(print_recreate_watchpoint, insert_masked_watchpoint)
(remove_masked_watchpoint, resources_needed_masked_watchpoint)
(print_one_detail_masked_watchpoint)
(print_mention_masked_watchpoint)
(print_recreate_masked_watchpoint): Cast to struct watchpoint as
necessary, and adjust.
(watch_command_1): Allocate and initialize a struct watchpoint
instead of a struct breakpoint. Use install_breakpoint.
(catch_exec_command_1): Adjust.
(base_breakpoint_dtor): Delete accesses to watchpoint specific
fields.
(delete_breakpoint, enable_breakpoint_disp)
(invalidate_bp_value_on_memory_change): Cast to struct watchpoint
as necessary, and adjust.
(initialize_breakpoint_ops): Install dtor_watchpoint as
watchpoints' dtor method.
* ada-lang.c (create_ada_exception_catchpoint): Adjust.
* python/py-breakpoint.c (bppy_get_expression): Use is_watchpoint.
to struct watchpoint as necessary, and adjust.
Diffstat (limited to 'gdb/python')
-rw-r--r-- | gdb/python/py-breakpoint.c | 10 |
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 = ""; |