This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[patch] gdb.server/ext-run.exp: "info os processes" requires xml support.


Hi.

I will check this in tomorrow if there are no objections.
Tested on amd64-linux (with and without xml support).

2010-01-07  Doug Evans  <dje@google.com>

	* gdb.server/ext-run.exp: "info os processes" requires xml support.

Index: gdb.server/ext-run.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.server/ext-run.exp,v
retrieving revision 1.6
diff -u -p -r1.6 ext-run.exp
--- gdb.server/ext-run.exp	1 Jan 2010 07:32:06 -0000	1.6
+++ gdb.server/ext-run.exp	7 Jan 2010 23:28:30 -0000
@@ -31,12 +31,16 @@ if  { [gdb_compile "${srcdir}/${subdir}/
     return -1
 }
 
+# Start with a fresh gdb, gdb_skip_xml_test must be called while gdb
+# is not running.
+
 gdb_exit
+set do_xml_test [expr ![gdb_skip_xml_test]]
 gdb_start
 gdb_load $binfile
 gdb_reinitialize_dir $srcdir/$subdir
 
 set target_exec [gdbserver_download]
 gdbserver_start_extended
 
 gdb_test "set remote exec-file $target_exec" "" "set remote exec-file"
@@ -46,7 +50,10 @@ gdb_test "run" "Breakpoint.* main .*" "c
 
 if { [istarget *-*-linux*] } {
     # On Linux, gdbserver can also report the list of processes.
-    gdb_test "info os processes" ".*pid +user +command.*1 +root +\[/a-z\]*init.*" "get process list"
+    # But only if xml support is compiled in.
+    if { $do_xml_test } {
+	gdb_test "info os processes" ".*pid +user +command.*1 +root +\[/a-z\]*init.*" "get process list"
+    }
 }
 
 gdb_test "kill" "" "kill" "Kill the program being debugged.*" "y"


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]