diff options
author | Ulrich Weigand <uweigand@de.ibm.com> | 2012-08-01 13:02:41 +0000 |
---|---|---|
committer | Ulrich Weigand <uweigand@de.ibm.com> | 2012-08-01 13:02:41 +0000 |
commit | b62e2b271b25eafdafdb3bafd654bf69b72b6c95 (patch) | |
tree | 95fded1256fb452941824115a0df2f6065967da4 /gdb/gdbserver | |
parent | a967a8512afc86ef0adce0b718de5d86f53153f7 (diff) | |
download | gdb-b62e2b271b25eafdafdb3bafd654bf69b72b6c95.zip gdb-b62e2b271b25eafdafdb3bafd654bf69b72b6c95.tar.gz gdb-b62e2b271b25eafdafdb3bafd654bf69b72b6c95.tar.bz2 |
gdbserver/ChangeLog:
* linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
between unsupported TYPE and unimplementable ADDR/LEN combination.
(arm_insert_point): Act on new return value.
testsuite/ChangeLog:
* gdb.base/watchpoint.exp (test_wide_location_1): Expect software
watchpoints on ARM. When expecting software watchpoints, tolerate
(remote) targets that report unsupported hardware watchpoint only
at continue time.
(test_wide_location_2): Likewise.
Diffstat (limited to 'gdb/gdbserver')
-rw-r--r-- | gdb/gdbserver/ChangeLog | 6 | ||||
-rw-r--r-- | gdb/gdbserver/linux-arm-low.c | 15 |
2 files changed, 14 insertions, 7 deletions
diff --git a/gdb/gdbserver/ChangeLog b/gdb/gdbserver/ChangeLog index 4e40aa9..6a1259b 100644 --- a/gdb/gdbserver/ChangeLog +++ b/gdb/gdbserver/ChangeLog @@ -1,3 +1,9 @@ +2012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org> + + * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish + between unsupported TYPE and unimplementable ADDR/LEN combination. + (arm_insert_point): Act on new return value. + 2012-07-31 Pedro Alves <palves@redhat.com> * server.c (process_point_options): Only skip tokens if we find diff --git a/gdb/gdbserver/linux-arm-low.c b/gdb/gdbserver/linux-arm-low.c index 1037083..2718cec 100644 --- a/gdb/gdbserver/linux-arm-low.c +++ b/gdb/gdbserver/linux-arm-low.c @@ -432,8 +432,9 @@ arm_linux_hw_breakpoint_equal (const struct arm_linux_hw_breakpoint *p1, /* Initialize the hardware breakpoint structure P for a breakpoint or watchpoint at ADDR to LEN. The type of watchpoint is given in TYPE. - Returns -1 if TYPE is unsupported, 0 if TYPE represents a breakpoint, - and 1 if type represents a watchpoint. */ + Returns -1 if TYPE is unsupported, or -2 if the particular combination + of ADDR and LEN cannot be implemented. Otherwise, returns 0 if TYPE + represents a breakpoint and 1 if type represents a watchpoint. */ static int arm_linux_hw_point_initialize (char type, CORE_ADDR addr, int len, struct arm_linux_hw_breakpoint *p) @@ -483,7 +484,7 @@ arm_linux_hw_point_initialize (char type, CORE_ADDR addr, int len, break; default: /* Unsupported. */ - return -1; + return -2; } } else @@ -493,17 +494,17 @@ arm_linux_hw_point_initialize (char type, CORE_ADDR addr, int len, /* Can not set watchpoints for zero or negative lengths. */ if (len <= 0) - return -1; + return -2; /* The current ptrace interface can only handle watchpoints that are a power of 2. */ if ((len & (len - 1)) != 0) - return -1; + return -2; /* Test that the range [ADDR, ADDR + LEN) fits into the largest address range covered by a watchpoint. */ aligned_addr = addr & ~(max_wp_length - 1); if (aligned_addr + max_wp_length < addr + len) - return -1; + return -2; mask = (1 << len) - 1; } @@ -560,7 +561,7 @@ arm_insert_point (char type, CORE_ADDR addr, int len) if (watch < 0) { /* Unsupported. */ - return 1; + return watch == -1 ? 1 : -1; } if (watch) |