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

Unified Diff: gdb/testsuite/gdb.cp/member-name.cc

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.cp/mb-templates.exp ('k') | gdb/testsuite/gdb.cp/member-name.exp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gdb/testsuite/gdb.cp/member-name.cc
diff --git a/gdb/testsuite/gdb.python/py-type.c b/gdb/testsuite/gdb.cp/member-name.cc
similarity index 56%
copy from gdb/testsuite/gdb.python/py-type.c
copy to gdb/testsuite/gdb.cp/member-name.cc
index bf3944385bfcef79b1e03dcbafcbc00ced50db5c..c30895ae0f94d467abfe32a07f15ac8226c8316a 100644
--- a/gdb/testsuite/gdb.python/py-type.c
+++ b/gdb/testsuite/gdb.cp/member-name.cc
@@ -1,6 +1,6 @@
/* This testcase is part of GDB, the GNU debugger.
- Copyright 2009-2012 Free Software Foundation, Inc.
+ Copyright 2003-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
@@ -15,60 +15,58 @@
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
-struct s
+struct B
{
- int a;
- int b;
+ static int b;
};
-typedef struct s TS;
-TS ts;
+int B::b = 23;
-#ifdef __cplusplus
-struct C
+struct C : public B
{
- int c;
- int d;
-};
+ static int x;
-struct D : C
-{
- int e;
- int f;
-};
+ struct inner
+ {
+ static int z;
+ };
-template<typename T, int I, int C::*MP>
-struct Temargs
-{
+ int y;
+
+ C ()
+ {
+ // First breakpoint here
+ y = x + inner::z;
+ }
+
+ int m ()
+ {
+ // Second breakpoint here
+ return x - y;
+ }
};
-Temargs<D, 23, &C::c> temvar;
+int C::x = 23;
+int C::inner::z = 0;
-#endif
+template<typename T>
+struct Templ
+{
+ static int y;
-enum E
-{ v1, v2, v3
+ int m()
+ {
+ // Third breakpoint here
+ return Templ::y;
+ }
};
-int
-main ()
+template<typename T> int Templ<T>::y = 23;
+
+int main ()
{
- int ar[2] = {1,2};
- struct s st;
-#ifdef __cplusplus
C c;
- c.c = 1;
- c.d = 2;
- D d;
- d.e = 3;
- d.f = 4;
-#endif
- enum E e;
-
- st.a = 3;
- st.b = 5;
-
- e = v2;
-
- return 0; /* break to inspect struct and array. */
+ Templ<int> t;
+
+ return c.m() + t.m();
}
« no previous file with comments | « gdb/testsuite/gdb.cp/mb-templates.exp ('k') | gdb/testsuite/gdb.cp/member-name.exp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698