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

Unified Diff: gdb/testsuite/gdb.python/py-prettyprint.c

Issue 124383005: GDB 7.6.50 (Closed) Base URL: http://git.chromium.org/native_client/nacl-gdb.git@upstream
Patch Set: Created 6 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.python/py-pp-maint.py ('k') | gdb/testsuite/gdb.python/py-prettyprint.exp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gdb/testsuite/gdb.python/py-prettyprint.c
diff --git a/gdb/testsuite/gdb.python/py-prettyprint.c b/gdb/testsuite/gdb.python/py-prettyprint.c
index b1a12b12fb20712e294aaf9533c799e73fa02909..ce1d154997b42eb3133a1828cc29a0f517ccb61d 100644
--- a/gdb/testsuite/gdb.python/py-prettyprint.c
+++ b/gdb/testsuite/gdb.python/py-prettyprint.c
@@ -1,6 +1,6 @@
/* This testcase is part of GDB, the GNU debugger.
- Copyright 2008-2012 Free Software Foundation, Inc.
+ Copyright 2008-2013 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -196,6 +196,13 @@ add_item (zzz_type *c, int val)
++c->len;
}
+void
+set_item(zzz_type *c, int i, int val)
+{
+ if (i < c->len)
+ c->elements[i] = val;
+}
+
void init_s(struct s *s, int a)
{
s->a = a;
@@ -239,6 +246,15 @@ eval_sub (void)
eval1.x++; /* eval-break */
}
+static void
+bug_14741()
+{
+ zzz_type c = make_container ("bug_14741");
+ add_item (&c, 71);
+ set_item(&c, 0, 42); /* breakpoint bug 14741 */
+ set_item(&c, 0, 5);
+}
+
int
main ()
{
@@ -332,5 +348,6 @@ main ()
eval_sub ();
- return 0; /* break to inspect struct and union */
+ bug_14741(); /* break to inspect struct and union */
+ return 0;
}
« no previous file with comments | « gdb/testsuite/gdb.python/py-pp-maint.py ('k') | gdb/testsuite/gdb.python/py-prettyprint.exp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698