Use multiple locations for hardware watchpoints.
authorVladimir Prus <vladimir@codesourcery.com>
Tue, 29 Jan 2008 17:52:47 +0000 (17:52 +0000)
committerVladimir Prus <vladimir@codesourcery.com>
Tue, 29 Jan 2008 17:52:47 +0000 (17:52 +0000)
commita5606eee5ec10851d09a8e2709354c7e0931a99c
tree74396fad6948f39a3d299b61354795949342468e
parent0b3de036ef7812900af73c59dae4a703fce5f2da
Use multiple locations for hardware watchpoints.
This eliminates the need to traverse value chain, doing
various checks, in three different places.

        * breakpoint.h (struct bp_location): New fields
        lengths and watchpoint_type.
        (struct breakpoint): Remove the val_chain field.
        * breakpoint.c (is_hardware_watchpoint): New.
        (free_valchain): Remove.
        (update_watchpoint): New.
        (insert_bp_location): For hardware watchpoint, just
        directly insert it.
        (insert_breakpoints): Call update_watchpoint_locations
        on all watchpoints.  If we have failed to insert
        any location of a hardware watchpoint, remove all inserted
        locations.
        (remove_breakpoint): For hardware watchpoints, directly
        remove location.
        (watchpoints_triggered): Iterate over locations.
        (bpstat_stop_status): Use only first location of
        a resource watchpoint.
        (delete_breakpoint): Don't call free_valchain.
        (print_one_breakpoint): Don't print all
        locations for watchpoints.
        (breakpoint_re_set_one): Use update_watchpoint for
        watchpoints.
gdb/ChangeLog
gdb/breakpoint.c
gdb/breakpoint.h
gdb/testsuite/ChangeLog
gdb/testsuite/gdb.base/watchpoint-solib-shr.c [new file with mode: 0644]
gdb/testsuite/gdb.base/watchpoint-solib.c [new file with mode: 0644]
gdb/testsuite/gdb.base/watchpoint-solib.exp [new file with mode: 0644]