From: "Maciej W. Rozycki" <macro@codesourcery.com>
To: <gdb-patches@sourceware.org>
Cc: Stan Shebs <stan@codesourcery.com>
Subject: [PATCH] gdb.mi/mi-info-os.exp: Fix cross-debugger testing
Date: Fri, 01 Nov 2013 01:17:00 -0000 [thread overview]
Message-ID: <alpine.DEB.1.10.1311010106300.12843@tp.orcam.me.uk> (raw)
Hi,
A live target is required for `-info-os' to work in non-native
configurations. Here's a fix for gdb.mi/mi-info-os.exp that removes the
following failure:
(gdb)
Expecting: ^(-info-os[
]+)?(.*\^done,OSDataTable=.*[
]+[(]gdb[)]
[ ]*)
-info-os
^error,msg="Don't know how to get OS data. Try \"help target\"."
(gdb)
FAIL: gdb.mi/mi-info-os.exp: -info-os
Tested with mips-linux-gnu (crossed from i686-linux-gnu). OK to apply?
2011-11-01 Maciej W. Rozycki <macro@codesourcery.com>
gdb/testsuite/
* gdb.mi/mi-info-os.exp: Connect to the target in non-native
configurations.
Maciej
gdb-test-mi-info-os.diff
Index: gdb-fsf-trunk-quilt/gdb/testsuite/gdb.mi/mi-info-os.exp
===================================================================
--- gdb-fsf-trunk-quilt.orig/gdb/testsuite/gdb.mi/mi-info-os.exp 2013-11-01 00:52:48.000000000 +0000
+++ gdb-fsf-trunk-quilt/gdb/testsuite/gdb.mi/mi-info-os.exp 2013-11-01 00:56:43.588756235 +0000
@@ -33,6 +33,20 @@ if [mi_gdb_start] {
continue
}
+# In non-native configurations we need to have a live target.
+if { ![isnative] } {
+ standard_testfile basics.c
+
+ if [build_executable "Failed to build $testfile" $testfile $srcfile \
+ debug] {
+ return -1;
+ }
+
+ if {[mi_run_to_main] < 0} {
+ return -1
+ }
+}
+
# Try the argument-less form that lists all the types in a table.
mi_gdb_test "-info-os" ".*\\^done,OSDataTable=.*" "-info-os"
next reply other threads:[~2013-11-01 1:17 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-11-01 1:17 Maciej W. Rozycki [this message]
2013-11-20 19:04 ` [PING][PATCH] " Maciej W. Rozycki
2013-11-20 20:01 ` [PATCH] " Pedro Alves
2013-11-20 21:21 ` Maciej W. Rozycki
2013-11-21 11:47 ` Pedro Alves
2014-01-09 20:53 ` Pedro Alves
2014-01-09 23:05 ` Maciej W. Rozycki
2014-01-10 11:02 ` Pedro Alves
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=alpine.DEB.1.10.1311010106300.12843@tp.orcam.me.uk \
--to=macro@codesourcery.com \
--cc=gdb-patches@sourceware.org \
--cc=stan@codesourcery.com \
/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