diff options
author | Hui Zhu <teawater@gmail.com> | 2013-07-19 07:26:46 +0000 |
---|---|---|
committer | Hui Zhu <teawater@gmail.com> | 2013-07-19 07:26:46 +0000 |
commit | fa8769722155b2454d902457995acbac7b967af0 (patch) | |
tree | 0003d126740c1c59e6642faa1554a0d56471d621 /gdb/testsuite | |
parent | 0857ec573551de84198cf7d5c7e0c91bf5f2b58f (diff) | |
download | gdb-fa8769722155b2454d902457995acbac7b967af0.zip gdb-fa8769722155b2454d902457995acbac7b967af0.tar.gz gdb-fa8769722155b2454d902457995acbac7b967af0.tar.bz2 |
2013-07-19 Hui Zhu <hui@codesourcery.com>
PR gdb/15692
* mi/mi-cmd-break.c (mi_argv_to_format): Handle double quotes.
2013-07-19 Hui Zhu <hui@codesourcery.com>
PR gdb/15692
* gdb.mi/mi-dprintf.exp: Add double quotes test.
Diffstat (limited to 'gdb/testsuite')
-rw-r--r-- | gdb/testsuite/ChangeLog | 5 | ||||
-rw-r--r-- | gdb/testsuite/gdb.mi/mi-dprintf.exp | 12 |
2 files changed, 14 insertions, 3 deletions
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index 77658ad..0056b2a 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2013-07-19 Hui Zhu <hui@codesourcery.com> + + PR gdb/15692 + * gdb.mi/mi-dprintf.exp: Add double quotes test. + 2013-07-19 Yao Qi <yao@codesourcery.com> * gdb.trace/read-memory.exp (test_from_remote): Update test. diff --git a/gdb/testsuite/gdb.mi/mi-dprintf.exp b/gdb/testsuite/gdb.mi/mi-dprintf.exp index 3509963..812f149 100644 --- a/gdb/testsuite/gdb.mi/mi-dprintf.exp +++ b/gdb/testsuite/gdb.mi/mi-dprintf.exp @@ -48,7 +48,7 @@ mi_gdb_test "3-dprintf-insert 29" \ mi_gdb_test "-break-insert main" ".*" "mi insert breakpoint main" mi_delete_breakpoints -mi_gdb_test "4-dprintf-insert foo \"At foo entry\\n\"" \ +mi_gdb_test "4-dprintf-insert foo \"\\\"foobarbazqux\\\" At foo entry\\n\"" \ "4\\^done,bkpt=\{number=\".*\",type=\"dprintf\".*func=\"foo\",file=\".*mi-dprintf.c\",fullname=\".*mi-dprintf.c\",line=\".*\".*" "mi insert dprintf foo" mi_gdb_test "5-dprintf-insert $dp_location1 \"arg=%d, g=%d\\n\" arg g" \ @@ -65,10 +65,16 @@ proc mi_continue_dprintf {args} { with_test_prefix $args { global mi_gdb_prompt + if { $args == "call" || $args == "fprintf" } { + set foobarbazqux "\"foobarbazqux\"" + } else { + set foobarbazqux "\\\\\"foobarbazqux\\\\\"" + } + mi_run_cmd set msg "mi 1st dprintf" gdb_expect { - -re ".*At foo entry.*arg=1234, g=1234" { + -re ".*$foobarbazqux At foo entry.*arg=1234, g=1234" { pass $msg } -re ".*$mi_gdb_prompt$" { @@ -83,7 +89,7 @@ proc mi_continue_dprintf {args} { set msg "mi 2nd dprintf" mi_send_resuming_command "exec-continue" "$msg continue" gdb_expect { - -re ".*At foo entry.*arg=1235, g=2222" { + -re ".*$foobarbazqux At foo entry.*arg=1235, g=2222" { pass $msg } -re ".*$mi_gdb_prompt$" { |