From: Sterling Augustine Date: Wed, 22 Feb 2012 18:20:38 +0000 (+0000) Subject: ChangeLog X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=aeaa24743cab0dbfb320ab5d4539ea3e4ad898b1;p=binutils-gdb.git ChangeLog 2012-02-22 Sterling Augustine PR 13689: * breakpoint.c (watchpoint_exp_is_constant): Add UNOP_CAST to switch. testsuite/ChangeLog 2012-02-22 Sterling Augustine * gdb.base/watchpoint.exp (test_constant_watchpoint): Add test for constant with cast. --- diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 1fa85dbe6e4..8f0e350f447 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,8 @@ +2012-02-22 Sterling Augustine + + PR 13689: + * breakpoint.c (watchpoint_exp_is_constant): Add UNOP_CAST to switch. + 2012-02-22 Gary Benson * dwarf2read.c (dwarf2_read_index): Correct misspelling. diff --git a/gdb/breakpoint.c b/gdb/breakpoint.c index fed62d6be74..37401575e73 100644 --- a/gdb/breakpoint.c +++ b/gdb/breakpoint.c @@ -8831,6 +8831,7 @@ watchpoint_exp_is_const (const struct expression *exp) case UNOP_COMPLEMENT: case UNOP_ADDR: case UNOP_HIGH: + case UNOP_CAST: /* Unary, binary and ternary operators: We have to check their operands. If they are constant, then so is the result of that operation. For instance, if A and B are diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index 9127b183c4c..ab3518ada66 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2012-02-22 Sterling Augustine + + * gdb.base/watchpoint.exp (test_constant_watchpoint): Add test for + constant with cast. + 2012-02-21 Pedro Alves * gdb.threads/watchpoint-fork.exp (test): Use with_test_prefix. diff --git a/gdb/testsuite/gdb.base/watchpoint.exp b/gdb/testsuite/gdb.base/watchpoint.exp index 7200f71edf8..15482fab7c4 100644 --- a/gdb/testsuite/gdb.base/watchpoint.exp +++ b/gdb/testsuite/gdb.base/watchpoint.exp @@ -559,6 +559,8 @@ proc test_watchpoint_and_breakpoint {} { proc test_constant_watchpoint {} { gdb_test "watch 5" "Cannot watch constant value `5'." "number is constant" + gdb_test "watch (int *)5" "Cannot watch constant value `\\(int \\*\\)5'." \ + "number with cast is constant" gdb_test "watch marker1" "Cannot watch constant value `marker1'." \ "marker1 is constant" gdb_test "watch count + 6" ".*atchpoint \[0-9\]+: count \\+ 6"