This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Fix gdb.ada/mi_task_info.exp for remote targets
- From: Pedro Alves <palves at redhat dot com>
- To: GDB Patches <gdb-patches at sourceware dot org>
- Date: Wed, 18 Jan 2012 17:03:12 +0000
- Subject: Fix gdb.ada/mi_task_info.exp for remote targets
Running the mi_task_info.exp test against a local gdbserver, I see:
-ada-task-info
=thread-created,id="3",group-id="i1"
~"[New Thread 27787]\n"
^done,tasks={nr_rows="3",nr_cols="8",hdr=[{width="1",alignment="-1",col_name="current",colhdr=""},{width="3",alignment="1",col_name="id",colhdr="ID"},{width="9",alignment="
1",col_name="task-id",colhdr="TID"},{width="4",alignment="1",col_name="thread-id",colhdr=""},{width="4",alignment="1",col_name="parent-id",colhdr="P-ID"},{width="3",alignme
nt="1",col_name="priority",colhdr="Pri"},{width="22",alignment="-1",col_name="state",colhdr="State"},{width="1",alignment="2",col_name="name",colhdr="Name"}],body=[{id="1",
task-id=" 640010",thread-id="1",priority="48",state="Child Termination Wait",name="main_task"},{id="2",task-id=" 640d20",thread-id="3",parent-id="1",priority="48",state
="Accept or Select Term",name="my_callee"},{current="*",id="3",task-id=" 644400",thread-id="2",parent-id="1",priority="48",state="Runnable",name="my_caller"}]}
(gdb)
FAIL: gdb.ada/mi_task_info.exp: -ada-task-info with no argument
With remote targets, GDB only finds out about new threads when it
requests the thread list, but the test isn't expecting the
=thread-created/New Thread bits, and so fails.
Fixed in obvious way, which is the same way we handle this for -thread-list-ids
and -thread-info.
Checked in.
2012-01-18 Pedro Alves <palves@redhat.com>
* gdb.ada/mi_task_info.exp (-ada-task-info with no argument):
Allow output before ^done.
---
gdb/testsuite/gdb.ada/mi_task_info.exp | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/gdb/testsuite/gdb.ada/mi_task_info.exp b/gdb/testsuite/gdb.ada/mi_task_info.exp
index 42a1f9d..22e3375 100644
--- a/gdb/testsuite/gdb.ada/mi_task_info.exp
+++ b/gdb/testsuite/gdb.ada/mi_task_info.exp
@@ -57,7 +57,7 @@ set task_3 \
# Get the full list of tasks...
mi_gdb_test "-ada-task-info" \
- "\\^done,tasks={nr_rows=\"3\",nr_cols=\"8\",$ada_task_info_hdr,body=\\\[$task_1,$task_2,$task_3\\\]}" \
+ ".*\\^done,tasks={nr_rows=\"3\",nr_cols=\"8\",$ada_task_info_hdr,body=\\\[$task_1,$task_2,$task_3\\\]}" \
"-ada-task-info with no argument"
# Now, only get the info about task 3.
--
Pedro Alves