]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
[gdb/testsuite] Add nopie to gdb.base/eh_return.exp
authorTom de Vries <tdevries@suse.de>
Mon, 31 Aug 2020 08:42:01 +0000 (10:42 +0200)
committerTom de Vries <tdevries@suse.de>
Mon, 31 Aug 2020 08:42:01 +0000 (10:42 +0200)
When running test-case gdb.base/eh_return.exp with target board
unix/-fPIE/-pie, we run into:
...
(gdb) break *0x88e^M
Breakpoint 1 at 0x88e: file eh_return.c, line 54.^M
(gdb) PASS: gdb.base/eh_return.exp: setting breakpoint at *0x88e
run ^M
Starting program: eh_return ^M
Warning:^M
Cannot insert breakpoint 1.^M
Cannot access memory at address 0x88e^M
^M
(gdb) FAIL: gdb.base/eh_return.exp: hit breakpoint
...

The problem is that gdb does not support setting breakpoints on unrelocated
addresses.

Fix this by using nopie for the test-case.

Tested on x86_64-linux.

gdb/testsuite/ChangeLog:

2020-08-31  Tom de Vries  <tdevries@suse.de>

* gdb.base/eh_return.exp: Use nopie.

gdb/testsuite/ChangeLog
gdb/testsuite/gdb.base/eh_return.exp

index af4444040b8dc13d112a78b99f49bec8f76cd33d..24da6ad79ba88c771661b72d26c1bfe72b1014ab 100644 (file)
@@ -1,3 +1,7 @@
+2020-08-31  Tom de Vries  <tdevries@suse.de>
+
+       * gdb.base/eh_return.exp: Use nopie.
+
 2020-08-28  Pedro Alves  <pedro@palves.net>
 
        * gdb.base/advance-until-multiple-locations.exp
index e38398ed37c38e07c86a3bd96788be90293f85e9..78a4af4b0c01b241400c8ba3682839387f8979a4 100644 (file)
@@ -18,7 +18,8 @@
 
 standard_testfile
 
-if {[prepare_for_testing "failed to prepare" $testfile $srcfile debug]} {
+if {[prepare_for_testing "failed to prepare" $testfile $srcfile \
+        {debug nopie}]} {
     return -1
 }