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]

Re: [rfc] Fix info spu mailbox command


Hi Joel,

Joel Brobecker schrieb:
+send_gdb "info spu mailbox\n"
+gdb_expect {
+  -re "SPU Outbound Mailbox.*0xc0000000.*SPU Outbound Interrupt Mailbox.*0xc0000000.*$gdb_prompt $"\
+      { xfail "info spu mailbox" }
+  -re "SPU Outbound Mailbox.*0x00000000.*SPU Outbound Interrupt Mailbox.*0x00000000.*$gdb_prompt $"\
+      { pass "info spu mailbox" }
+  timeout { fail "(timeout) info spu mailbox" }
+}

Any reason for not using gdb_test_multiple in this case (instead of send_gdb/gdb_expext)? gdb_test_multiple has been designed to handle this type of test, and as a bonus, you won't have to handle the timeout explicitly.


as far as I see gdb_expect is much more often used compared to gdb_test_multiple. What is the advantage of gdb_test_multiple compared to just send/expect?



-- Markus Deuling GNU Toolchain for Linux on Cell BE deuling@de.ibm.com


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