aboutsummaryrefslogtreecommitdiff
path: root/gdb/testsuite/lib
diff options
context:
space:
mode:
authorDaniel Jacobowitz <drow@false.org>2007-07-02 21:29:28 +0000
committerDaniel Jacobowitz <drow@false.org>2007-07-02 21:29:28 +0000
commitb0f4b84b5c44685c7880e9e3e013314590662a17 (patch)
tree0071037729bf478008a8a49a212f72c8b6e18caf /gdb/testsuite/lib
parent9bbf65bb0848c4ea2887cdd4ca39561249ef11f5 (diff)
downloadgdb-b0f4b84b5c44685c7880e9e3e013314590662a17.zip
gdb-b0f4b84b5c44685c7880e9e3e013314590662a17.tar.gz
gdb-b0f4b84b5c44685c7880e9e3e013314590662a17.tar.bz2
* infrun.c (inferior_ignoring_startup_exec_events): Delete.
(start_remote): Use STOP_QUIETLY_REMOTE. (handle_inferior_event): Do not condition TARGET_WAITKIND_LOADED support on a SOLIB_ADD definition. Update breakpoints_inserted. Update to match shared library event breakpoint support. Only resume if appropriate. Handle STOP_QUIETLY_REMOTE. (normal_stop): Handle TARGET_WAITKIND_LOADED. * fork-child.c (startup_inferior): Do not set inferior_ignoring_startup_exec_events * inferior.h (inferior_ignoring_startup_exec_events): Delete declaration. (enum stop_kind): Improve documentation. Add STOP_QUIETLY_REMOTE. * config/gdbserver.exp (gdb_reconnect): New. * gdb.base/so-disc-shr.c, gdb.base/solib-disc.c, gdb.base/solib-disc.exp: New files. * lib/gdb.exp (gdb_test_multiple): Allow tests to match "Ending remote debugging". (gdb_compile): Add shlib_load flag. * lib/gdbserver-support.exp (gdbserver_run): Save the protocol and port. (gdbserver_reconnect): New.
Diffstat (limited to 'gdb/testsuite/lib')
-rw-r--r--gdb/testsuite/lib/gdb.exp17
-rw-r--r--gdb/testsuite/lib/gdbserver-support.exp18
2 files changed, 29 insertions, 6 deletions
diff --git a/gdb/testsuite/lib/gdb.exp b/gdb/testsuite/lib/gdb.exp
index d17185d..c87e488 100644
--- a/gdb/testsuite/lib/gdb.exp
+++ b/gdb/testsuite/lib/gdb.exp
@@ -671,6 +671,9 @@ proc gdb_test_multiple { command message user_code } {
gdb_suppress_entire_file "GDB died";
set result -1;
}
+ }
+ append code $processed_code
+ append code {
-re "Ending remote debugging.*$gdb_prompt $" {
if ![isnative] then {
warning "Can`t communicate to remote target."
@@ -679,9 +682,6 @@ proc gdb_test_multiple { command message user_code } {
gdb_start
set result -1
}
- }
- append code $processed_code
- append code {
-re "Undefined\[a-z\]* command:.*$gdb_prompt $" {
perror "Undefined command \"$command\"."
fail "$message"
@@ -1543,6 +1543,17 @@ proc gdb_compile {source dest type options} {
lappend options "additional_flags=-rpath ${objdir}/${subdir}"
}
}
+ } elseif { $opt == "shlib_load" } {
+ if { ([istarget "*-*-mingw*"]
+ || [istarget *-*-cygwin*]
+ || [istarget *-*-pe*]
+ || [istarget arm*-*-symbianelf*]
+ || [istarget hppa*-*-hpux*])} {
+ # Do not need anything.
+ } else {
+ lappend new_options "libs=-ldl"
+ lappend new_options "additional_flags=-Wl,-rpath,\\\$ORIGIN"
+ }
} else {
lappend new_options $opt
}
diff --git a/gdb/testsuite/lib/gdbserver-support.exp b/gdb/testsuite/lib/gdbserver-support.exp
index 4d8f049..afe36ee 100644
--- a/gdb/testsuite/lib/gdbserver-support.exp
+++ b/gdb/testsuite/lib/gdbserver-support.exp
@@ -236,6 +236,9 @@ proc gdbserver_spawn { child_args } {
# to it. Return 0 on success, or non-zero on failure.
proc gdbserver_run { child_args } {
+ global gdbserver_protocol
+ global gdbserver_gdbport
+
# Kill anything running before we try to start gdbserver, in case
# we are sharing a serial connection.
global gdb_prompt
@@ -252,8 +255,17 @@ proc gdbserver_run { child_args } {
}
set res [gdbserver_spawn $child_args]
- set protocol [lindex $res 0]
- set gdbport [lindex $res 1]
+ set gdbserver_protocol [lindex $res 0]
+ set gdbserver_gdbport [lindex $res 1]
+
+ return [gdb_target_cmd $gdbserver_protocol $gdbserver_gdbport]
+}
+
+# Reconnect to the previous gdbserver session.
+
+proc gdbserver_reconnect { } {
+ global gdbserver_protocol
+ global gdbserver_gdbport
- return [gdb_target_cmd $protocol $gdbport]
+ return [gdb_target_cmd $gdbserver_protocol $gdbserver_gdbport]
}