aboutsummaryrefslogtreecommitdiff
path: root/gdb
diff options
context:
space:
mode:
authorTom Tromey <tromey@redhat.com>2012-06-19 15:47:02 +0000
committerTom Tromey <tromey@redhat.com>2012-06-19 15:47:02 +0000
commite910f0b61f40b0fcbbba3607dbe3e153f45e00d4 (patch)
tree1e0fb08bd9320facac9ce507fd529712e4cc5ef3 /gdb
parent422d65e705c7d6842497a01208ee5668b61cc0ca (diff)
downloadgdb-e910f0b61f40b0fcbbba3607dbe3e153f45e00d4.zip
gdb-e910f0b61f40b0fcbbba3607dbe3e153f45e00d4.tar.gz
gdb-e910f0b61f40b0fcbbba3607dbe3e153f45e00d4.tar.bz2
* gdb.cp/m-static.cc (keepalive): New function.
(gnu_obj_1::method): Use it.
Diffstat (limited to 'gdb')
-rw-r--r--gdb/testsuite/ChangeLog5
-rw-r--r--gdb/testsuite/gdb.cp/m-static.cc3
2 files changed, 8 insertions, 0 deletions
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog
index 595ff66..26e4ce0 100644
--- a/gdb/testsuite/ChangeLog
+++ b/gdb/testsuite/ChangeLog
@@ -1,3 +1,8 @@
+2012-06-19 Tom Tromey <tromey@redhat.com>
+
+ * gdb.cp/m-static.cc (keepalive): New function.
+ (gnu_obj_1::method): Use it.
+
2012-06-18 Doug Evans <dje@google.com>
* gdb.base/info-fun.exp: New file.
diff --git a/gdb/testsuite/gdb.cp/m-static.cc b/gdb/testsuite/gdb.cp/m-static.cc
index 7f997ef..e9dce18 100644
--- a/gdb/testsuite/gdb.cp/m-static.cc
+++ b/gdb/testsuite/gdb.cp/m-static.cc
@@ -2,6 +2,8 @@
enum region { oriental, egyptian, greek, etruscan, roman };
+void keepalive(bool *var) { }
+
// Test one.
class gnu_obj_1
{
@@ -19,6 +21,7 @@ public:
long method ()
{
static bool svar = true;
+ keepalive (&svar);
return key2;
}
};