This is the mail archive of the
gdb@sources.redhat.com
mailing list for the GDB project.
MI testsuite problem
- From: Bob Rossi <bob at brasko dot net>
- To: GDB <gdb at sources dot redhat dot com>
- Date: Mon, 31 Jan 2005 11:42:46 -0500
- Subject: MI testsuite problem
Hi,
I Think I've found a problem in the MI testsuite. Basically, I've run
runtest with debug mode on for the mi2-basic.exp testcase. This gives me the
log file which I'm pretty sure shows the problem.
The -break-list command is matching the regular expression in
mi-support.exp:mi_gdb_test, which is
-re "(\[\r\n\]*(($pattern)\[\r\n\]+$mi_gdb_prompt\[ \]*$))"
The problem is, the matching string has a leading '201-break-list' that
should not be there. If you run GDB standalone the output is not there.
I think this is a bug that could mask some problems in the MI testsuite.
Does anyone know how this could be happening? It appears as if Expect is
matching the 'send' command in the results. I don't think Expect does
this, but I don't know how else the 'send' command could end up in the
output command. Does anyone else?
Please look at the result below. In particular the 'set expect_out' is
what Expect is saying it matched.
Thanks,
Bob Rossi
send: sending "201-break-list\n" to { exp11 }
expect: does "" (spawn_id exp11) match regular expression "\*\*\* DOSEXIT code.*"? no
"Ending remote debugging.*[(]gdb[)] \r\n[ ]*$"? no
"([\r\n]*((.*\^done,BreakpointTable=\{.*,body=\[\]\})[\r\n]+[(]gdb[)] \r\n[ ]*$))"? no
"(^FOOBAR$)$"? no
"Undefined.* command:.*[(]gdb[)] \r\n[ ]*$"? no
"Ambiguous command.*[(]gdb[)] \r\n[ ]*$"? no
"Program exited with code [0-9]+.*[(]gdb[)] \r\n[ ]*$"? no
"The program is not being run.*[(]gdb[)] \r\n[ ]*$"? no
".*[(]gdb[)] \r\n[ ]*$"? no
"<return>"? no
"\(y or n\) "? no
full_buffer? no
201-break-list
expect: does "201-break-list\r\n" (spawn_id exp11) match regular expression "\*\*\* DOSEXIT code.*"? no
"Ending remote debugging.*[(]gdb[)] \r\n[ ]*$"? no
"([\r\n]*((.*\^done,BreakpointTable=\{.*,body=\[\]\})[\r\n]+[(]gdb[)] \r\n[ ]*$))"? no
"(^FOOBAR$)$"? no
"Undefined.* command:.*[(]gdb[)] \r\n[ ]*$"? no
"Ambiguous command.*[(]gdb[)] \r\n[ ]*$"? no
"Program exited with code [0-9]+.*[(]gdb[)] \r\n[ ]*$"? no
"The program is not being run.*[(]gdb[)] \r\n[ ]*$"? no
".*[(]gdb[)] \r\n[ ]*$"? no
"<return>"? no
"\(y or n\) "? no
full_buffer? no
201^done,BreakpointTable={nr_rows="0",nr_cols="6",hdr=[{width="3",alignment="-1",col_name="number",colhdr="Num"},{width="14",alignment="-1",col_name="type",colhdr="Type"},{width="4",alignment="-1",col_name="disp",colhdr="Disp"},{width="3",alignment="-1",col_name="enabled",colhdr="Enb"},{width="10",alignment="-1",col_name="addr",colhdr="Address"},{width="40",alignment="2",col_name="what",colhdr="What"}],body=[]}
expect: does "201-break-list\r\n201^done,BreakpointTable={nr_rows="0",nr_cols="6",hdr=[{width="3",alignment="-1",col_name="number",colhdr="Num"},{width="14",alignment="-1",col_name="type",colhdr="Type"},{width="4",alignment="-1",col_name="disp",colhdr="Disp"},{width="3",alignment="-1",col_name="enabled",colhdr="Enb"},{width="10",alignment="-1",col_name="addr",colhdr="Address"},{width="40",alignment="2",col_name="what",colhdr="What"}],body=[]}\r\n" (spawn_id exp11) match regular expression "\*\*\* DOSEXIT code.*"? no
"Ending remote debugging.*[(]gdb[)] \r\n[ ]*$"? no
"([\r\n]*((.*\^done,BreakpointTable=\{.*,body=\[\]\})[\r\n]+[(]gdb[)] \r\n[ ]*$))"? no
"(^FOOBAR$)$"? no
"Undefined.* command:.*[(]gdb[)] \r\n[ ]*$"? no
"Ambiguous command.*[(]gdb[)] \r\n[ ]*$"? no
"Program exited with code [0-9]+.*[(]gdb[)] \r\n[ ]*$"? no
"The program is not being run.*[(]gdb[)] \r\n[ ]*$"? no
".*[(]gdb[)] \r\n[ ]*$"? no
"<return>"? no
"\(y or n\) "? no
full_buffer? no
(gdb)
expect: does "201-break-list\r\n201^done,BreakpointTable={nr_rows="0",nr_cols="6",hdr=[{width="3",alignment="-1",col_name="number",colhdr="Num"},{width="14",alignment="-1",col_name="type",colhdr="Type"},{width="4",alignment="-1",col_name="disp",colhdr="Disp"},{width="3",alignment="-1",col_name="enabled",colhdr="Enb"},{width="10",alignment="-1",col_name="addr",colhdr="Address"},{width="40",alignment="2",col_name="what",colhdr="What"}],body=[]}\r\n(gdb) \r\n" (spawn_id exp11) match regular expression "\*\*\* DOSEXIT code.*"? no
"Ending remote debugging.*[(]gdb[)] \r\n[ ]*$"? no
"([\r\n]*((.*\^done,BreakpointTable=\{.*,body=\[\]\})[\r\n]+[(]gdb[)] \r\n[ ]*$))"? yes
expect: set expect_out(0,string) "201-break-list\r\n201^done,BreakpointTable={nr_rows="0",nr_cols="6",hdr=[{width="3",alignment="-1",col_name="number",colhdr="Num"},{width="14",alignment="-1",col_name="type",colhdr="Type"},{width="4",alignment="-1",col_name="disp",colhdr="Disp"},{width="3",alignment="-1",col_name="enabled",colhdr="Enb"},{width="10",alignment="-1",col_name="addr",colhdr="Address"},{width="40",alignment="2",col_name="what",colhdr="What"}],body=[]}\r\n(gdb) \r\n"
expect: set expect_out(1,string) "201-break-list\r\n201^done,BreakpointTable={nr_rows="0",nr_cols="6",hdr=[{width="3",alignment="-1",col_name="number",colhdr="Num"},{width="14",alignment="-1",col_name="type",colhdr="Type"},{width="4",alignment="-1",col_name="disp",colhdr="Disp"},{width="3",alignment="-1",col_name="enabled",colhdr="Enb"},{width="10",alignment="-1",col_name="addr",colhdr="Address"},{width="40",alignment="2",col_name="what",colhdr="What"}],body=[]}\r\n(gdb) \r\n"
expect: set expect_out(2,string) "201-break-list\r\n201^done,BreakpointTable={nr_rows="0",nr_cols="6",hdr=[{width="3",alignment="-1",col_name="number",colhdr="Num"},{width="14",alignment="-1",col_name="type",colhdr="Type"},{width="4",alignment="-1",col_name="disp",colhdr="Disp"},{width="3",alignment="-1",col_name="enabled",colhdr="Enb"},{width="10",alignment="-1",col_name="addr",colhdr="Address"},{width="40",alignment="2",col_name="what",colhdr="What"}],body=[]}\r\n(gdb) \r\n"
expect: set expect_out(3,string) "201-break-list\r\n201^done,BreakpointTable={nr_rows="0",nr_cols="6",hdr=[{width="3",alignment="-1",col_name="number",colhdr="Num"},{width="14",alignment="-1",col_name="type",colhdr="Type"},{width="4",alignment="-1",col_name="disp",colhdr="Disp"},{width="3",alignment="-1",col_name="enabled",colhdr="Enb"},{width="10",alignment="-1",col_name="addr",colhdr="Address"},{width="40",alignment="2",col_name="what",colhdr="What"}],body=[]}"
expect: set expect_out(spawn_id) "exp11"
expect: set expect_out(buffer) "201-break-list\r\n201^done,BreakpointTable={nr_rows="0",nr_cols="6",hdr=[{width="3",alignment="-1",col_name="number",colhdr="Num"},{width="14",alignment="-1",col_name="type",colhdr="Type"},{width="4",alignment="-1",col_name="disp",colhdr="Disp"},{width="3",alignment="-1",col_name="enabled",colhdr="Enb"},{width="10",alignment="-1",col_name="addr",colhdr="Address"},{width="40",alignment="2",col_name="what",colhdr="What"}],body=[]}\r\n(gdb) \r\n"