Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* [PATCH] gdb.mi/mi-info-os.exp: Fix cross-debugger testing
@ 2013-11-01  1:17 Maciej W. Rozycki
  2013-11-20 19:04 ` [PING][PATCH] " Maciej W. Rozycki
  2013-11-20 20:01 ` [PATCH] " Pedro Alves
  0 siblings, 2 replies; 8+ messages in thread
From: Maciej W. Rozycki @ 2013-11-01  1:17 UTC (permalink / raw)
  To: gdb-patches; +Cc: Stan Shebs

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"


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2014-01-10 11:02 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-11-01  1:17 [PATCH] gdb.mi/mi-info-os.exp: Fix cross-debugger testing Maciej W. Rozycki
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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox