aboutsummaryrefslogtreecommitdiff
path: root/gdb/testsuite
diff options
context:
space:
mode:
authorSimon Marchi <simon.marchi@efficios.com>2020-08-24 15:49:46 -0400
committerSimon Marchi <simon.marchi@polymtl.ca>2020-08-24 15:49:47 -0400
commit1eb8556f5a8b5712e765b9615f7c18ffb50253b6 (patch)
treed6e4f5f9ad743e848f7bcd4bf1e144fbf3bb72c9 /gdb/testsuite
parent0f55320bc46869b87c54d3432fb344f785f07b33 (diff)
downloadgdb-1eb8556f5a8b5712e765b9615f7c18ffb50253b6.zip
gdb-1eb8556f5a8b5712e765b9615f7c18ffb50253b6.tar.gz
gdb-1eb8556f5a8b5712e765b9615f7c18ffb50253b6.tar.bz2
gdb: add infrun_debug_printf macro
Introduce this macro to print debug statements in the infrun.c file, same idea as what was done in 9327494e0eeb ("gdb: add linux_nat_debug_printf macro"). Although in this case, there are places outside infrun.c that print debug statements if debug_infrun is set. So the macro has to be declared in the header file, so that it can be used in these other files. Note one special case. In stop_all_threads, I've used an explicit if (debug_infrun) infrun_debug_printf_1 ("stop_all_threads", "done"); for the message in the SCOPE_EXIT. Otherwise, the message appears like this: [infrun] operator(): done Until we find a better solution for extracting a meaningful function name for lambda functions, I think it's fine to handle these special cases manually, they are quite rare. Some tests need to be updated, because they rely on some infrun debug statements. gdb/ChangeLog: * infrun.h (infrun_debug_printf_1): New function declaration. (infrun_debug_printf): New macro. * infrun.c (infrun_debug_printf_1): Use infrun_debug_printf throughout. (infrun_debug_printf): New function. * breakpoint.c (should_be_inserted): Use infrun_debug_printf. (handle_jit_event): Likewise. gdb/testsuite/ChangeLog: * gdb.base/gdb-sigterm.exp (do_test): Update expected regexp. * gdb.threads/signal-while-stepping-over-bp-other-thread.exp: Likewise. * gdb.threads/stepi-random-signal.exp: Likewise. Change-Id: I66433c8a9caa64c8525ab57c593022b9d1956d5c
Diffstat (limited to 'gdb/testsuite')
-rw-r--r--gdb/testsuite/ChangeLog7
-rw-r--r--gdb/testsuite/gdb.base/gdb-sigterm.exp4
-rw-r--r--gdb/testsuite/gdb.threads/signal-while-stepping-over-bp-other-thread.exp2
-rw-r--r--gdb/testsuite/gdb.threads/stepi-random-signal.exp2
4 files changed, 11 insertions, 4 deletions
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog
index 7976dd7..61a37ab 100644
--- a/gdb/testsuite/ChangeLog
+++ b/gdb/testsuite/ChangeLog
@@ -1,3 +1,10 @@
+2020-08-24 Simon Marchi <simon.marchi@efficios.com>
+
+ * gdb.base/gdb-sigterm.exp (do_test): Update expected regexp.
+ * gdb.threads/signal-while-stepping-over-bp-other-thread.exp:
+ Likewise.
+ * gdb.threads/stepi-random-signal.exp: Likewise.
+
2020-08-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
* gdb.base/print-file-var.exp: Fix typo "breapoint".
diff --git a/gdb/testsuite/gdb.base/gdb-sigterm.exp b/gdb/testsuite/gdb.base/gdb-sigterm.exp
index 4f1f809..d4c31df 100644
--- a/gdb/testsuite/gdb.base/gdb-sigterm.exp
+++ b/gdb/testsuite/gdb.base/gdb-sigterm.exp
@@ -53,7 +53,7 @@ proc do_test { pass } {
set test "run a bit #$pass"
set abort 1
gdb_test_multiple "step" $test {
- -re "infrun: stepping inside range" {
+ -re {\[infrun\] process_event_stop_test: stepping inside range} {
# Suppress pass $test
verbose -log "$pf_prefix $test: ran"
set abort 0
@@ -78,7 +78,7 @@ proc do_test { pass } {
verbose -log "$pf_prefix $test: got eof"
set abort 0
}
- -re "infrun: stepping inside range" {
+ -re "infrun: process_event_stop_test: stepping inside range" {
incr stepping
exp_continue
}
diff --git a/gdb/testsuite/gdb.threads/signal-while-stepping-over-bp-other-thread.exp b/gdb/testsuite/gdb.threads/signal-while-stepping-over-bp-other-thread.exp
index e3aa083..6a95081 100644
--- a/gdb/testsuite/gdb.threads/signal-while-stepping-over-bp-other-thread.exp
+++ b/gdb/testsuite/gdb.threads/signal-while-stepping-over-bp-other-thread.exp
@@ -104,7 +104,7 @@ gdb_test "set debug infrun 1"
set test "step"
gdb_test_sequence $test $test {
"need to step-over"
- "resume \\(step=1"
+ "resume_1: step=1,"
"signal arrived while stepping over breakpoint"
"stepped to a different line"
"callme"
diff --git a/gdb/testsuite/gdb.threads/stepi-random-signal.exp b/gdb/testsuite/gdb.threads/stepi-random-signal.exp
index c2722a2..fa20f38 100644
--- a/gdb/testsuite/gdb.threads/stepi-random-signal.exp
+++ b/gdb/testsuite/gdb.threads/stepi-random-signal.exp
@@ -87,7 +87,7 @@ set seen 0
set test "stepi"
if {[gdb_test_multiple "stepi" "$test" {
- -re "infrun: random signal" {
+ -re "infrun: handle_signal_stop: random signal" {
set seen 1
exp_continue
}