aboutsummaryrefslogtreecommitdiff
path: root/gdb/testsuite/gdb.base/relocate.c
diff options
context:
space:
mode:
authorTom Tromey <tromey@redhat.com>2010-07-27 16:58:22 +0000
committerTom Tromey <tromey@redhat.com>2010-07-27 16:58:22 +0000
commite992ef7345b6ff291c424cac2a056ba09102e64a (patch)
treea2492fdf3808caf7129f83a8c386d1da48c8cc63 /gdb/testsuite/gdb.base/relocate.c
parentabebb8b041dd3eb136abd41181287992f061bf13 (diff)
downloadbinutils-e992ef7345b6ff291c424cac2a056ba09102e64a.zip
binutils-e992ef7345b6ff291c424cac2a056ba09102e64a.tar.gz
binutils-e992ef7345b6ff291c424cac2a056ba09102e64a.tar.bz2
* gdb.stabs/gdb11479.c (hack): New function.
(test): Use it. (test2): Use it. * gdb.python/py-inferior.c (int8_search_buf, int16_search_buf) (int32_search_buf, int64_search_buf): No longer static. (x): Remove. * gdb.base/relocate.c (hack): New function.
Diffstat (limited to 'gdb/testsuite/gdb.base/relocate.c')
-rw-r--r--gdb/testsuite/gdb.base/relocate.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/gdb/testsuite/gdb.base/relocate.c b/gdb/testsuite/gdb.base/relocate.c
index edf0191..4415b53 100644
--- a/gdb/testsuite/gdb.base/relocate.c
+++ b/gdb/testsuite/gdb.base/relocate.c
@@ -33,3 +33,10 @@ function_bar ()
{
return 6;
}
+
+/* Make sure the statics are not optimized away. */
+int *
+hack (int arg)
+{
+ return arg ? &static_foo : &static_bar;
+}