diff options
author | Gary Benson <gbenson@redhat.com> | 2016-02-24 11:31:58 +0000 |
---|---|---|
committer | Gary Benson <gbenson@redhat.com> | 2016-02-24 11:31:58 +0000 |
commit | bf74e428bca61022bd5cdf6bf28789a184748b4d (patch) | |
tree | d31114c6d16ec7349e2e73201da00507891be4f0 /gdb/testsuite | |
parent | 6735952f7c0f5f1f69a94c2d92c26e452a196da6 (diff) | |
download | gdb-bf74e428bca61022bd5cdf6bf28789a184748b4d.zip gdb-bf74e428bca61022bd5cdf6bf28789a184748b4d.tar.gz gdb-bf74e428bca61022bd5cdf6bf28789a184748b4d.tar.bz2 |
Fix logic in exec_file_locate_attach
This commit fixes an error in exec_file_locate_attach where
the main executable could be loaded from outside the sysroot
if a nonempty, non-"target:" sysroot was set but the discovered
executable filename did not exist in that sysroot and did exist
on the main filesystem.
gdb/ChangeLog:
* exec.c (exec_file_locate_attach): Do not attempt to
locate main executable locally if not found in sysroot.
gdb/testsuite/ChangeLog:
* gdb.base/attach-pie-noexec.exp: Do not expect an error
message on attach.
Diffstat (limited to 'gdb/testsuite')
-rw-r--r-- | gdb/testsuite/ChangeLog | 5 | ||||
-rw-r--r-- | gdb/testsuite/gdb.base/attach-pie-noexec.exp | 2 |
2 files changed, 6 insertions, 1 deletions
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index 54dcfd6..1dcbe79 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2016-02-24 Gary Benson <gbenson@redhat.com> + + * gdb.base/attach-pie-noexec.exp: Do not expect an error + message on attach. + 2016-02-23 Doug Evans <dje@google.com> * gdb.base/skip.c (test_skip): New function. diff --git a/gdb/testsuite/gdb.base/attach-pie-noexec.exp b/gdb/testsuite/gdb.base/attach-pie-noexec.exp index f3e693a..1a51049 100644 --- a/gdb/testsuite/gdb.base/attach-pie-noexec.exp +++ b/gdb/testsuite/gdb.base/attach-pie-noexec.exp @@ -60,7 +60,7 @@ set testpid [spawn_id_get_pid $test_spawn_id] gdb_start file delete -- $binfile -gdb_test "attach $testpid" "Attaching to process $testpid\r\n.*: No such file or directory\\." "attach" +gdb_test "attach $testpid" "Attaching to process $testpid\r\n.*" "attach" gdb_test "set architecture $arch" "The target architecture is assumed to be $arch" gdb_test "info shared" "From\[ \t\]+To\[ \t\]+Syms Read\[ \t\]+Shared Object Library\r\n0x.*" |