aboutsummaryrefslogtreecommitdiff
path: root/gdb/testsuite/gdb.threads
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/testsuite/gdb.threads')
-rw-r--r--gdb/testsuite/gdb.threads/access-mem-running-thread-exit.c7
-rw-r--r--gdb/testsuite/gdb.threads/access-mem-running-thread-exit.exp10
-rw-r--r--gdb/testsuite/gdb.threads/infcall-from-bp-cond-simple.c2
-rw-r--r--gdb/testsuite/gdb.threads/infcall-from-bp-cond-simple.exp4
4 files changed, 16 insertions, 7 deletions
diff --git a/gdb/testsuite/gdb.threads/access-mem-running-thread-exit.c b/gdb/testsuite/gdb.threads/access-mem-running-thread-exit.c
index af05b13..e22bf12 100644
--- a/gdb/testsuite/gdb.threads/access-mem-running-thread-exit.c
+++ b/gdb/testsuite/gdb.threads/access-mem-running-thread-exit.c
@@ -97,6 +97,11 @@ thread_fn (void *arg)
return NULL;
}
+static void
+setup_done (void)
+{
+}
+
int
main (void)
{
@@ -104,6 +109,8 @@ main (void)
global_var++;
+ setup_done ();
+
for (i = 0; i < 4; i++)
{
struct thread_arg *p;
diff --git a/gdb/testsuite/gdb.threads/access-mem-running-thread-exit.exp b/gdb/testsuite/gdb.threads/access-mem-running-thread-exit.exp
index 784f17f..42222c0 100644
--- a/gdb/testsuite/gdb.threads/access-mem-running-thread-exit.exp
+++ b/gdb/testsuite/gdb.threads/access-mem-running-thread-exit.exp
@@ -54,7 +54,7 @@ proc test { non_stop } {
clean_restart ${binfile}
}
- if ![runto_main] {
+ if ![runto setup_done] {
return -1
}
@@ -76,7 +76,7 @@ proc test { non_stop } {
# Start the second inferior.
with_test_prefix "second inferior" {
# With stub targets that do reload on run, if we let the new
- # inferior share inferior 1's connection, runto_main would
+ # inferior share inferior 1's connection, runto would
# fail because GDB is already connected to something, like
# e.g. with --target_board=native-gdbserver:
#
@@ -86,10 +86,10 @@ proc test { non_stop } {
# Already connected to a remote target. Disconnect? (y or n)
#
# Instead, start the inferior with no connection, and let
- # gdb_load/runto_main spawn a new remote connection/gdbserver.
+ # gdb_load/runto spawn a new remote connection/gdbserver.
#
# OTOH, with extended-remote, we must let the new inferior
- # reuse the current connection, so that runto_main below can
+ # reuse the current connection, so that runto below can
# issue the "run" command, and have the inferior run on the
# remote target. If we forced no connection, then "run" would
# either fail if "set auto-connect-native-target" is on, like
@@ -108,7 +108,7 @@ proc test { non_stop } {
gdb_load $binfile
- if ![runto_main] {
+ if ![runto setup_done] {
return -1
}
}
diff --git a/gdb/testsuite/gdb.threads/infcall-from-bp-cond-simple.c b/gdb/testsuite/gdb.threads/infcall-from-bp-cond-simple.c
index 2e23f12..d0707cd 100644
--- a/gdb/testsuite/gdb.threads/infcall-from-bp-cond-simple.c
+++ b/gdb/testsuite/gdb.threads/infcall-from-bp-cond-simple.c
@@ -43,6 +43,7 @@ function_that_segfaults ()
{
int *p = 0;
*p = 1; /* Segfault happens here. */
+ return 0;
}
int
@@ -55,6 +56,7 @@ void *
worker_func (void *arg)
{
int a = 42; /* Breakpoint here. */
+ return NULL;
}
void
diff --git a/gdb/testsuite/gdb.threads/infcall-from-bp-cond-simple.exp b/gdb/testsuite/gdb.threads/infcall-from-bp-cond-simple.exp
index c9508c9..feec37b 100644
--- a/gdb/testsuite/gdb.threads/infcall-from-bp-cond-simple.exp
+++ b/gdb/testsuite/gdb.threads/infcall-from-bp-cond-simple.exp
@@ -79,7 +79,7 @@ proc run_condition_test { message n_expected_hits condition \
gdb_breakpoint \
"${::srcfile}:${::cond_bp_line} if ((++\$n_cond_eval) && (${condition}))"
- # And a breakpoint that we hit when the test is over, this one is
+ # Add a breakpoint that we hit when the test is over, this one is
# not conditional. Only the main thread gets here once all the
# other threads have finished.
gdb_breakpoint "${::srcfile}:${::stop_bp_line}"
@@ -114,7 +114,7 @@ proc run_condition_test { message n_expected_hits condition \
# includes an inferior call), it is still possible to kill the running
# inferior, and then restart the inferior.
#
-# At once point doing this would result in GDB giving an assertion error.
+# At one point doing this would result in GDB giving an assertion error.
proc_with_prefix run_kill_and_restart_test { target_async target_non_stop } {
# This test relies on the 'start' command, which is not possible with
# the plain 'remote' target.