summaryrefslogtreecommitdiff
path: root/gdb/testsuite/gdb.stabs
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.stabs
parentabebb8b041dd3eb136abd41181287992f061bf13 (diff)
downloadbinutils-gdb-e992ef7345b6ff291c424cac2a056ba09102e64a.tar.gz
* 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.stabs')
-rw-r--r--gdb/testsuite/gdb.stabs/gdb11479.c14
1 files changed, 12 insertions, 2 deletions
diff --git a/gdb/testsuite/gdb.stabs/gdb11479.c b/gdb/testsuite/gdb.stabs/gdb11479.c
index 257be5e360a..70ab5d901a3 100644
--- a/gdb/testsuite/gdb.stabs/gdb11479.c
+++ b/gdb/testsuite/gdb.stabs/gdb11479.c
@@ -23,13 +23,17 @@ struct dummy;
enum dummy_enum;
+/* This function prevents the compiler from dropping local variables
+ we need for the test. */
+void *hack (const struct dummy *t, const enum dummy_enum *e);
+
const void *
test (const struct dummy *t)
{
const struct dummy *tt;
enum dummy_enum *e;
tt = t;
- return t;
+ return hack (t, e);
}
void *
@@ -38,7 +42,7 @@ test2 (struct dummy *t)
struct dummy *tt;
const enum dummy_enum *e;
tt = t;
- return t;
+ return hack (t, e);
}
@@ -53,6 +57,12 @@ enum dummy_enum {
enum2
};
+void *
+hack (const struct dummy *t, const enum dummy_enum *e)
+{
+ return (void *) t;
+}
+
int
main ()
{