]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blobdiff - gdb/testsuite/gdb.python/py-value.c
Update years in copyright notice for the GDB files.
[thirdparty/binutils-gdb.git] / gdb / testsuite / gdb.python / py-value.c
index 7481bd528104138bb6d4018936c5bafae940042d..0c94e64aa0662cfc43999da5ba64f8479a01a988 100644 (file)
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2008, 2009, 2010 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
@@ -40,6 +40,16 @@ typedef struct s *PTR;
 enum e evalue = TWO;
 
 #ifdef __cplusplus
+
+struct Base {
+  virtual int x() { return 5; }
+};
+
+struct Derived : public Base {
+};
+
+Base *base = new Derived ();
+
 void ptr_ref(int*& rptr_int)
 {
   return; /* break to inspect pointer by reference. */
@@ -56,6 +66,8 @@ int func2 (int arg1, int arg2)
   return arg1 + arg2;
 }
 
+char **save_argv;
+
 int
 main (int argc, char *argv[])
 {
@@ -84,5 +96,6 @@ main (int argc, char *argv[])
   ptr_ref(ptr_i);
 #endif
 
-  return 0;      /* break to inspect struct and union */
+  save_argv = argv;      /* break to inspect struct and union */
+  return 0;
 }