Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3022)

Unified Diff: gdb/testsuite/gdb.base/watchpoint.c

Issue 11969036: Merge GDB 7.5.1 (Closed) Base URL: http://git.chromium.org/native_client/nacl-gdb.git@master
Patch Set: Created 7 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « gdb/testsuite/gdb.base/watch_thread_num.exp ('k') | gdb/testsuite/gdb.base/watchpoint.exp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gdb/testsuite/gdb.base/watchpoint.c
diff --git a/gdb/testsuite/gdb.base/watchpoint.c b/gdb/testsuite/gdb.base/watchpoint.c
index 9ef92539288795943659fe13f7ee59731920b021..e887f99aebbc244110a0329ef09391b9ae935b62 100644
--- a/gdb/testsuite/gdb.base/watchpoint.c
+++ b/gdb/testsuite/gdb.base/watchpoint.c
@@ -42,6 +42,18 @@ int doread = 0;
char *global_ptr;
char **global_ptr_ptr;
+struct foo2
+{
+ int val[2];
+};
+struct foo2 foo2;
+
+struct foo4
+{
+ int val[4];
+};
+struct foo4 foo4;
+
void marker1 ()
{
}
@@ -68,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);
@@ -78,9 +90,10 @@ void recurser (x) int x;
void
func2 ()
{
- int local_a;
+ int local_a = 0;
static int static_b;
+ /* func2 breakpoint here */
ival5++;
local_a = ival5;
static_b = local_a;
@@ -137,12 +150,24 @@ func5 ()
val = 27;
}
+void
+func6 (void)
+{
+ /* func6 breakpoint here */
+ foo2.val[1] = 0;
+ foo2.val[1] = 11;
+}
+
+void
+func7 (void)
+{
+ /* func7 breakpoint here */
+ foo4.val[3] = 0;
+ foo4.val[3] = 33;
+}
+
int main ()
{
-#ifdef usestubs
- set_debug_traps();
- breakpoint();
-#endif
struct1.val = 1;
struct2.val = 2;
ptr1 = &struct1;
@@ -208,6 +233,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 ();
@@ -216,5 +247,9 @@ int main ()
func5 ();
+ func6 ();
+
+ func7 ();
+
return 0;
}
« no previous file with comments | « gdb/testsuite/gdb.base/watch_thread_num.exp ('k') | gdb/testsuite/gdb.base/watchpoint.exp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698