From: Simon Marchi <simon.marchi@ericsson.com>
To: <gdb-patches@sourceware.org>
Cc: Simon Marchi <simon.marchi@ericsson.com>
Subject: [PATCH 4/4] Test different follow-exec-mode settings in gdb.multi/multi-arch-exec.exp
Date: Sun, 27 Aug 2017 10:16:00 -0000 [thread overview]
Message-ID: <1503828934-26404-5-git-send-email-simon.marchi@ericsson.com> (raw)
In-Reply-To: <1503828934-26404-1-git-send-email-simon.marchi@ericsson.com>
Using follow-exec-mode "new" takes a different code path than "same", so
it's interesting to test this path in combination with a change in
architecture of the inferior. This test fails if you remove the
previous patch.
gdb/testsuite/ChangeLog:
* gdb.multi/multi-arch-exec.exp: Test with different
"follow-exec-mode" settings.
(do_test): New procedure.
---
gdb/testsuite/gdb.multi/multi-arch-exec.exp | 25 ++++++++++++++++++-------
1 file changed, 18 insertions(+), 7 deletions(-)
diff --git a/gdb/testsuite/gdb.multi/multi-arch-exec.exp b/gdb/testsuite/gdb.multi/multi-arch-exec.exp
index ed98532..3053345 100644
--- a/gdb/testsuite/gdb.multi/multi-arch-exec.exp
+++ b/gdb/testsuite/gdb.multi/multi-arch-exec.exp
@@ -76,12 +76,23 @@ if { [prepare_for_testing "failed to prepare" ${exec2} "${srcfile2}" \
return -1
}
-clean_restart ${exec1}
-if ![runto_main] then {
- fail "couldn't run to main"
- return -1
+proc do_test { mode } {
+ global exec1
+
+ clean_restart ${exec1}
+ if ![runto_main] then {
+ fail "couldn't run to main"
+ return -1
+ }
+
+ gdb_test_no_output "set follow-exec-mode $mode"
+
+ # Test that GDB updates the target description / arch successfuly
+ # after the exec.
+ gdb_test "continue" "Breakpoint 1, main.*" "continue across exec that changes architecture"
+ gdb_test "info inferior"
}
-# Test that GDB updates the target description / arch successfuly
-# after the exec.
-gdb_test "continue" "Breakpoint 1, main.*" "continue across exec that changes architecture"
+foreach follow_exec_mode {"same" "new"} {
+ do_test $follow_exec_mode
+}
--
2.7.4
next prev parent reply other threads:[~2017-08-27 10:16 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-10-18 11:10 Check for truncated registers in process_g_packet Lionel Flandrin
2016-10-18 15:50 ` Simon Marchi
2016-10-18 16:07 ` Lionel Flandrin
2016-10-27 15:23 ` Lionel Flandrin
2016-11-08 10:37 ` Pedro Alves
2017-08-25 10:53 ` Yao Qi
2017-08-25 21:05 ` Simon Marchi
2017-08-25 22:55 ` Simon Marchi
2017-08-27 10:16 ` [PATCH 0/4] Try to fix the gdb.multi/multi-arch-exec.exp failure Simon Marchi
2017-08-27 10:16 ` [PATCH 3/4] Add thread after updating gdbarch when exec'ing Simon Marchi
2017-09-05 10:37 ` Yao Qi
2017-09-05 15:30 ` Simon Marchi
2017-09-05 15:44 ` Simon Marchi
2017-08-27 10:16 ` [PATCH 2/4] Read stop_pc after updating the " Simon Marchi
2017-09-05 10:12 ` Yao Qi
2017-08-27 10:16 ` [PATCH 1/4] Improve "'g' reply is is to long" error message Simon Marchi
2017-09-05 9:49 ` Yao Qi
2017-08-27 10:16 ` Simon Marchi [this message]
2017-09-05 10:40 ` [PATCH 4/4] Test different follow-exec-mode settings in gdb.multi/multi-arch-exec.exp Yao Qi
2017-09-05 15:40 ` Simon Marchi
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1503828934-26404-5-git-send-email-simon.marchi@ericsson.com \
--to=simon.marchi@ericsson.com \
--cc=gdb-patches@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox