aboutsummaryrefslogtreecommitdiff
path: root/gdb/testsuite/gdb.base/watchpoint.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/testsuite/gdb.base/watchpoint.c')
-rw-r--r--gdb/testsuite/gdb.base/watchpoint.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/gdb/testsuite/gdb.base/watchpoint.c b/gdb/testsuite/gdb.base/watchpoint.c
index 50f0a83..88c110f 100644
--- a/gdb/testsuite/gdb.base/watchpoint.c
+++ b/gdb/testsuite/gdb.base/watchpoint.c
@@ -80,7 +80,7 @@ void recurser (int x)
void recurser (x) int x;
#endif
{
- int local_x;
+ int local_x = 0;
if (x > 0)
recurser (x-1);
@@ -232,6 +232,12 @@ int main ()
marker6 ();
recurser (2);
+ /* This invocation is used for watches of a local variable with explicitly
+ specified scope when recursion happens.
+ */
+ marker6 ();
+ recurser (2);
+
marker6 ();
func3 ();