public inbox for gdb-testers@sourceware.org
help / color / mirror / Atom feed
* Failures on Fedora-i686, branch master
2019-07-08 10:22 [binutils-gdb] Fix breakpoints on file reloads for PIE binaries gdb-buildbot
@ 2019-07-08 10:19 ` gdb-buildbot
2019-07-08 10:45 ` Failures on Fedora-x86_64-native-extended-gdbserver-m64, " gdb-buildbot
2019-07-08 23:00 ` Failures on Fedora-x86_64-m32, " gdb-buildbot
2 siblings, 0 replies; 4+ messages in thread
From: gdb-buildbot @ 2019-07-08 10:19 UTC (permalink / raw)
To: gdb-testers
Buildername:
Fedora-i686
Worker:
fedora-x86-64-3
Full Build URL:
https://gdb-buildbot.osci.io/#builders/18/builds/179
Author:
Alan Hayward <alan.hayward@arm.com>
Commit tested:
ea142fbfc9c1708a83d3532257d6728e1f5c142e
Subject of commit:
Fix breakpoints on file reloads for PIE binaries
Testsuite logs (gdb.sum, gdb.log and others):
https://gdb-buildbot.osci.io/results/Fedora-i686/ea/ea142fbfc9c1708a83d3532257d6728e1f5c142e/
*** Diff to previous build ***
==============================================
new FAIL: gdb.base/catch-syscall.exp: multiple targets: insert catch syscall on syscall 1 -- write on i386:x86-64
new FAIL: gdb.python/py-finish-breakpoint2.exp: check FinishBreakpoint in catch
new FAIL: gdb.python/py-finish-breakpoint2.exp: check finish BP removal
new FAIL: gdb.python/py-finish-breakpoint2.exp: continue to second exception
new FAIL: gdb.python/py-finish-breakpoint2.exp: set FinishBP after the exception
new FAIL: gdb.python/py-format-string.exp: format_string: lang_cpp: a_base_ref with option deref_refs: deref_refs=true
new FAIL: gdb.python/py-format-string.exp: format_string: lang_cpp: a_base_ref with option deref_refs=True, static_members=False
PASS -> KFAIL: gdb.threads/process-dies-while-handling-bp.exp: non_stop=off: cond_bp_target=1: inferior 1 exited
PASS -> KFAIL: gdb.threads/process-dies-while-handling-bp.exp: non_stop=on: cond_bp_target=0: inferior 1 exited
new KFAIL: gdb.xml/tdesc-arch.exp: set tdesc filename tdesc-arch.xml
==============================================
*** Complete list of XFAILs for this builder ***
To obtain the list of XFAIL tests for this builder, go to:
<https://gdb-buildbot.osci.io/results/Fedora-i686/ea/ea142fbfc9c1708a83d3532257d6728e1f5c142e//xfail.gz>
You can also see a pretty-printed version of the list, with more information
about each XFAIL, by going to:
<https://gdb-buildbot.osci.io/results/Fedora-i686/ea/ea142fbfc9c1708a83d3532257d6728e1f5c142e//xfail.table.gz>
^ permalink raw reply [flat|nested] 4+ messages in thread
* [binutils-gdb] Fix breakpoints on file reloads for PIE binaries
@ 2019-07-08 10:22 gdb-buildbot
2019-07-08 10:19 ` Failures on Fedora-i686, branch master gdb-buildbot
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: gdb-buildbot @ 2019-07-08 10:22 UTC (permalink / raw)
To: gdb-testers
*** TEST RESULTS FOR COMMIT ea142fbfc9c1708a83d3532257d6728e1f5c142e ***
commit ea142fbfc9c1708a83d3532257d6728e1f5c142e
Author: Alan Hayward <alan.hayward@arm.com>
AuthorDate: Mon Jul 8 10:00:25 2019 +0100
Commit: Alan Hayward <alan.hayward@arm.com>
CommitDate: Mon Jul 8 10:13:46 2019 +0100
Fix breakpoints on file reloads for PIE binaries
When a binary is built using PIE, reloading the file will cause GDB to error
on restart. For example:
gdb ./a.out
(gdb) break main
(gdb) run
(gdb) file ./a.out
(gdb) continue
Will cause GDB to error with:
Continuing.
Warning:
Cannot insert breakpoint 1.
Cannot access memory at address 0x9e0
Command aborted.
This is due to the symbol offsets not being relocated after reloading the file.
Fix is to ensure solib_create_inferior_hook is called, in the same manner as
infrun.c:follow_exec().
Expand the idempotent test to cover PIE scenarios.
gdb/ChangeLog:
* symfile.c (symbol_file_command): Call solib_create_inferior_hook.
gdb/testsuite/ChangeLog:
* gdb.base/break-idempotent.exp: Test both PIE and non PIE.
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index dfd1041904..218bbf6223 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,7 @@
+2019-08-04 Alan Hayward <alan.hayward@arm.com>
+
+ * symfile.c (symbol_file_command): Call solib_create_inferior_hook.
+
2019-07-04 Tom Tromey <tom@tromey.com>
PR tui/24724:
diff --git a/gdb/symfile.c b/gdb/symfile.c
index 59647bfe9d..dc6bdf3fd4 100644
--- a/gdb/symfile.c
+++ b/gdb/symfile.c
@@ -1672,7 +1672,19 @@ symbol_file_command (const char *args, int from_tty)
validate_readnow_readnever (flags);
+ /* Set SYMFILE_DEFER_BP_RESET because the proper displacement for a PIE
+ (Position Independent Executable) main symbol file will only be
+ computed by the solib_create_inferior_hook below. Without it,
+ breakpoint_re_set would fail to insert the breakpoints with the zero
+ displacement. */
+ add_flags |= SYMFILE_DEFER_BP_RESET;
+
symbol_file_add_main_1 (name, add_flags, flags, offset);
+
+ solib_create_inferior_hook (from_tty);
+
+ /* Now it's safe to re-add the breakpoints. */
+ breakpoint_re_set ();
}
}
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog
index 7631cce62a..a6d6843d96 100644
--- a/gdb/testsuite/ChangeLog
+++ b/gdb/testsuite/ChangeLog
@@ -1,3 +1,7 @@
+2019-07-08 Alan Hayward <alan.hayward@arm.com>
+
+ * gdb.base/break-idempotent.exp: Test both PIE and non PIE.
+
2019-07-04 Pedro Alves <palves@redhat.com>
* lib/gdb.exp (foreach_with_prefix): Don't return early if
diff --git a/gdb/testsuite/gdb.base/break-idempotent.exp b/gdb/testsuite/gdb.base/break-idempotent.exp
index 902a5f818b..96f91c50f9 100644
--- a/gdb/testsuite/gdb.base/break-idempotent.exp
+++ b/gdb/testsuite/gdb.base/break-idempotent.exp
@@ -36,23 +36,6 @@
standard_testfile
-if {[prepare_for_testing "failed to prepare" $testfile $srcfile debug]} {
- return -1
-}
-
-if ![runto_main] then {
- fail "can't run to main"
- return 0
-}
-
-if [is_remote host] {
- set arg [remote_download host $binfile]
- if { $arg == "" } {
- perror "download failed"
- return -1
- }
-}
-
# Force a breakpoint re-set in GDB. Currently this is done by
# reloading symbols with the "file" command.
@@ -62,11 +45,11 @@ proc force_breakpoint_re_set {} {
set test "file \$binfile"
gdb_test_multiple "file $binfile" $test {
-re "Are you sure you want to change the file. .*y or n. $" {
- send_gdb "y\n"
+ send_gdb "y\n" optional
exp_continue
}
-re "Load new symbol table from \".*\".*y or n. $" {
- send_gdb "y\n"
+ send_gdb "y\n" optional
exp_continue
}
-re "Reading symbols from.*$gdb_prompt $" {
@@ -123,7 +106,7 @@ proc set_breakpoint { break_command } {
proc test_break { always_inserted break_command } {
set cmd [lindex [split "$break_command"] 0]
- with_test_prefix "always-inserted $always_inserted: $cmd" {
+ with_test_prefix "$cmd" {
delete_breakpoints
if ![runto_main] then {
@@ -163,20 +146,43 @@ proc test_break { always_inserted break_command } {
}
}
-foreach always_inserted { "off" "on" } {
- test_break $always_inserted "break"
+# The testcase uses the "file" command to force breakpoint re-set in
+# GDB. Test both with and without PIE, as GDB used to mishandle
+# breakpoint re-set when reloading PIEs.
+foreach_with_prefix pie { "nopie" "pie" } {
+
+ set opts {debug}
+ lappend opts $pie
- if {![skip_hw_breakpoint_tests]} {
- test_break $always_inserted "hbreak"
+ set binfile [standard_output_file $testfile-$pie]
+
+ if {[prepare_for_testing "failed to prepare" $binfile $srcfile $opts]} {
+ continue
}
- if {![skip_hw_watchpoint_tests]} {
- test_break $always_inserted "watch"
+ if [is_remote host] {
+ set arg [remote_download host $binfile]
+ if { $arg == "" } {
+ untested "download failed"
+ continue
+ }
}
- if {![skip_hw_watchpoint_access_tests]
- && ![skip_hw_watchpoint_multi_tests]} {
- test_break $always_inserted "rwatch"
- test_break $always_inserted "awatch"
+ foreach_with_prefix always_inserted { "off" "on" } {
+ test_break $always_inserted "break"
+
+ if {![skip_hw_breakpoint_tests]} {
+ test_break $always_inserted "hbreak"
+ }
+
+ if {![skip_hw_watchpoint_tests]} {
+ test_break $always_inserted "watch"
+ }
+
+ if {![skip_hw_watchpoint_access_tests]
+ && ![skip_hw_watchpoint_multi_tests]} {
+ test_break $always_inserted "rwatch"
+ test_break $always_inserted "awatch"
+ }
}
}
^ permalink raw reply [flat|nested] 4+ messages in thread
* Failures on Fedora-x86_64-native-extended-gdbserver-m64, branch master
2019-07-08 10:22 [binutils-gdb] Fix breakpoints on file reloads for PIE binaries gdb-buildbot
2019-07-08 10:19 ` Failures on Fedora-i686, branch master gdb-buildbot
@ 2019-07-08 10:45 ` gdb-buildbot
2019-07-08 23:00 ` Failures on Fedora-x86_64-m32, " gdb-buildbot
2 siblings, 0 replies; 4+ messages in thread
From: gdb-buildbot @ 2019-07-08 10:45 UTC (permalink / raw)
To: gdb-testers
Buildername:
Fedora-x86_64-native-extended-gdbserver-m64
Worker:
fedora-x86-64-1
Full Build URL:
https://gdb-buildbot.osci.io/#builders/2/builds/178
Author:
Alan Hayward <alan.hayward@arm.com>
Commit tested:
ea142fbfc9c1708a83d3532257d6728e1f5c142e
Subject of commit:
Fix breakpoints on file reloads for PIE binaries
Testsuite logs (gdb.sum, gdb.log and others):
https://gdb-buildbot.osci.io/results/Fedora-x86_64-native-extended-gdbserver-m64/ea/ea142fbfc9c1708a83d3532257d6728e1f5c142e/
*** Diff to previous build ***
==============================================
FAIL -> UNRESOLVED: gdb.mi/mi-exec-run.exp: inferior-tty=main: mi=main: force-fail=1: run failure detected
FAIL -> UNRESOLVED: gdb.mi/mi-exec-run.exp: inferior-tty=main: mi=separate: force-fail=1: run failure detected
FAIL -> UNRESOLVED: gdb.mi/mi-exec-run.exp: inferior-tty=separate: mi=main: force-fail=1: run failure detected
FAIL -> UNRESOLVED: gdb.mi/mi-exec-run.exp: inferior-tty=separate: mi=separate: force-fail=1: run failure detected
PASS -> UNRESOLVED: gdb.threads/attach-into-signal.exp: threaded: attach
PASS -> KFAIL: gdb.threads/process-dies-while-handling-bp.exp: non_stop=on: cond_bp_target=1: inferior 1 exited
==============================================
*** Complete list of XFAILs for this builder ***
To obtain the list of XFAIL tests for this builder, go to:
<https://gdb-buildbot.osci.io/results/Fedora-x86_64-native-extended-gdbserver-m64/ea/ea142fbfc9c1708a83d3532257d6728e1f5c142e//xfail.gz>
You can also see a pretty-printed version of the list, with more information
about each XFAIL, by going to:
<https://gdb-buildbot.osci.io/results/Fedora-x86_64-native-extended-gdbserver-m64/ea/ea142fbfc9c1708a83d3532257d6728e1f5c142e//xfail.table.gz>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Failures on Fedora-x86_64-m32, branch master
2019-07-08 10:22 [binutils-gdb] Fix breakpoints on file reloads for PIE binaries gdb-buildbot
2019-07-08 10:19 ` Failures on Fedora-i686, branch master gdb-buildbot
2019-07-08 10:45 ` Failures on Fedora-x86_64-native-extended-gdbserver-m64, " gdb-buildbot
@ 2019-07-08 23:00 ` gdb-buildbot
2 siblings, 0 replies; 4+ messages in thread
From: gdb-buildbot @ 2019-07-08 23:00 UTC (permalink / raw)
To: gdb-testers
Buildername:
Fedora-x86_64-m32
Worker:
fedora-x86-64-4
Full Build URL:
https://gdb-buildbot.osci.io/#builders/17/builds/176
Author:
Alan Hayward <alan.hayward@arm.com>
Commit tested:
ea142fbfc9c1708a83d3532257d6728e1f5c142e
Subject of commit:
Fix breakpoints on file reloads for PIE binaries
Testsuite logs (gdb.sum, gdb.log and others):
https://gdb-buildbot.osci.io/results/Fedora-x86_64-m32/ea/ea142fbfc9c1708a83d3532257d6728e1f5c142e/
*** Diff to previous build ***
==============================================
PASS -> KFAIL: gdb.threads/non-ldr-exit.exp: program exits normally
==============================================
*** Complete list of XFAILs for this builder ***
To obtain the list of XFAIL tests for this builder, go to:
<https://gdb-buildbot.osci.io/results/Fedora-x86_64-m32/ea/ea142fbfc9c1708a83d3532257d6728e1f5c142e//xfail.gz>
You can also see a pretty-printed version of the list, with more information
about each XFAIL, by going to:
<https://gdb-buildbot.osci.io/results/Fedora-x86_64-m32/ea/ea142fbfc9c1708a83d3532257d6728e1f5c142e//xfail.table.gz>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2019-07-08 10:45 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-07-08 10:22 [binutils-gdb] Fix breakpoints on file reloads for PIE binaries gdb-buildbot
2019-07-08 10:19 ` Failures on Fedora-i686, branch master gdb-buildbot
2019-07-08 10:45 ` Failures on Fedora-x86_64-native-extended-gdbserver-m64, " gdb-buildbot
2019-07-08 23:00 ` Failures on Fedora-x86_64-m32, " gdb-buildbot
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).