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] |
On 03/27/2015 12:51 PM, Keith Seitz wrote:
On 03/27/2015 05:36 AM, Antoine Tremblay wrote:diff --git a/gdb/testsuite/gdb.mi/mi-dprintf-pending.exp b/gdb/testsuite/gdb.mi/mi-dprintf-pending.exp new file mode 100644 index 0000000..6185329 --- /dev/null +++ b/gdb/testsuite/gdb.mi/mi-dprintf-pending.exp...+set msg "mi dprintf" +gdb_expect { + -re ".*~\"hello\"" { + pass $msg + } + -re ".*$mi_gdb_prompt$" { + fail $msg + } + timeout { + fail $msg + } +}Pending a previous query about using mi_gdb_test here, I recommend a maintainer approve this patch.
Indeed I had missed that you can call it without a command, my mind must have skipped that line, thanks :)
However there is still a problem forcing me to use gdb_expect I think, namely mi_gdb_test waits for a command prompt like so :
-re "^($string_regex\[\r\n\]+)?($pattern\[\r\n\]+$mi_gdb_prompt\[ \]*)" However dprintf does mean you will get a prompt printed... You will get a prompt only when hitting the breakpoint I placed.This means that if for some reason the breakpoint would not hit, the dprintf test would fail, when it's the breakpoint that should fail.
I could remove mi_expect_stop at the end and assume that breakpoint will not fail but I think it's not right ? also mi-dprintf.exp is using the same mi_run_cmd / gdb_expect / mi_expect_stop ...
What do you think ?
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |