aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom de Vries <tdevries@suse.de>2020-04-02 17:12:49 +0200
committerTom de Vries <tdevries@suse.de>2020-04-02 17:12:49 +0200
commit880d97770b63eb722d53b3a0ae2f03deae0c9c72 (patch)
tree4d2829de514289d9aa4530cd646da78cb9c4e5fb
parentaa350065a4236d822c7b4a1116d1d92f7820d83e (diff)
downloadgdb-880d97770b63eb722d53b3a0ae2f03deae0c9c72.zip
gdb-880d97770b63eb722d53b3a0ae2f03deae0c9c72.tar.gz
gdb-880d97770b63eb722d53b3a0ae2f03deae0c9c72.tar.bz2
[gdb/testsuite] Don't use O2 for inlining in break-inline-psymtab.exp
In test-case gdb.dwarf2/break-inline-psymtab.exp we use O2 to enable inlining of bar into foo in break-inline-psymtab-2.c. Instead, enforce inlining using __attribute__((always_inline)), to avoid any optimization-related test issues. Tested on x86_64-linux. gdb/testsuite/ChangeLog: 2020-04-02 Tom de Vries <tdevries@suse.de> * gdb.dwarf2/break-inline-psymtab-2.c (bar): Add __attribute__((always_inline)). * gdb.dwarf2/break-inline-psymtab.exp: Don't use -O2.
-rw-r--r--gdb/testsuite/ChangeLog6
-rw-r--r--gdb/testsuite/gdb.dwarf2/break-inline-psymtab-2.c2
-rw-r--r--gdb/testsuite/gdb.dwarf2/break-inline-psymtab.exp3
3 files changed, 8 insertions, 3 deletions
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog
index 9981305..d662727 100644
--- a/gdb/testsuite/ChangeLog
+++ b/gdb/testsuite/ChangeLog
@@ -1,5 +1,11 @@
2020-04-02 Tom de Vries <tdevries@suse.de>
+ * gdb.dwarf2/break-inline-psymtab-2.c (bar): Add
+ __attribute__((always_inline)).
+ * gdb.dwarf2/break-inline-psymtab.exp: Don't use -O2.
+
+2020-04-02 Tom de Vries <tdevries@suse.de>
+
* lib/gdbserver-support.exp (gdbserver_exit): Factor out of ...
(gdbserver_gdb_exit): ... here. Add timeout warning.
* gdb.multi/multi-target.exp (server_spawn_ids): New global var.
diff --git a/gdb/testsuite/gdb.dwarf2/break-inline-psymtab-2.c b/gdb/testsuite/gdb.dwarf2/break-inline-psymtab-2.c
index 38c6933..b7fe485 100644
--- a/gdb/testsuite/gdb.dwarf2/break-inline-psymtab-2.c
+++ b/gdb/testsuite/gdb.dwarf2/break-inline-psymtab-2.c
@@ -19,7 +19,7 @@ extern int foo (void);
int a;
-static inline int
+static inline int __attribute__((always_inline))
bar (void)
{
a = 2;
diff --git a/gdb/testsuite/gdb.dwarf2/break-inline-psymtab.exp b/gdb/testsuite/gdb.dwarf2/break-inline-psymtab.exp
index adbe862..344d7da 100644
--- a/gdb/testsuite/gdb.dwarf2/break-inline-psymtab.exp
+++ b/gdb/testsuite/gdb.dwarf2/break-inline-psymtab.exp
@@ -16,8 +16,7 @@
standard_testfile break-inline-psymtab.c break-inline-psymtab-2.c
set sources [list $srcfile $srcfile2]
-set opts {debug optimize=-O2}
-if { [prepare_for_testing "failed to prepare" ${testfile} $sources $opts] } {
+if { [prepare_for_testing "failed to prepare" ${testfile} $sources] } {
return -1
}