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

Unified Diff: gdb/testsuite/gdb.python/py-explore.cc

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.python/py-explore.c ('k') | gdb/testsuite/gdb.python/py-explore.exp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gdb/testsuite/gdb.python/py-explore.cc
diff --git a/gdb/testsuite/gdb.python/py-breakpoint.c b/gdb/testsuite/gdb.python/py-explore.cc
similarity index 64%
copy from gdb/testsuite/gdb.python/py-breakpoint.c
copy to gdb/testsuite/gdb.python/py-explore.cc
index d95468adb3c00cec60f5fd716e3e98997a7a89a4..420ba57875e4eb6c62b294be5454ebe828de2918 100644
--- a/gdb/testsuite/gdb.python/py-breakpoint.c
+++ b/gdb/testsuite/gdb.python/py-explore.cc
@@ -1,6 +1,6 @@
/* This testcase is part of GDB, the GNU debugger.
- Copyright 2010-2012 Free Software Foundation, Inc.
+ Copyright 2012 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
@@ -16,31 +16,39 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
+class A {
+ public:
+ virtual ~A() { }
+};
-int result = 0;
+class B : public A {
+ public:
+ virtual ~B() { }
-int multiply (int i)
-{
- return i * i;
-}
-
-int add (int i)
-{
- return i + i;
-}
+ int i;
+ char c;
+};
+typedef int *int_ptr;
-int main (int argc, char *argv[])
+int
+func (const A &a)
{
- int foo = 5;
- int bar = 42;
- int i;
+ int val = 10;
+ int &int_ref = val;
+ int_ptr ptr = &val;
+ int_ptr &int_ptr_ref = ptr;
+ B b;
- for (i = 0; i < 10; i++)
- {
- result += multiply (foo); /* Break at multiply. */
- result += add (bar); /* Break at add. */
- }
+ b.i = 10;
+ b.c = 'a';
- return 0; /* Break at end. */
+ return 0; /* Break here. */
+}
+
+int
+main ()
+{
+ A obj;
+ return func (obj);
}
« no previous file with comments | « gdb/testsuite/gdb.python/py-explore.c ('k') | gdb/testsuite/gdb.python/py-explore.exp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698