This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH] add -s option to make -break-insert support dprintf
- From: Yao Qi <yao at codesourcery dot com>
- To: Hui Zhu <teawater at gmail dot com>
- Cc: Pedro Alves <palves at redhat dot com>, Eli Zaretskii <eliz at gnu dot org>, Hui Zhu <hui_zhu at mentor dot com>, gdb-patches ml <gdb-patches at sourceware dot org>, Marc Khouzam <marc dot khouzam at ericsson dot com>
- Date: Sat, 20 Apr 2013 16:19:38 +0800
- Subject: Re: [PATCH] add -s option to make -break-insert support dprintf
- References: <515451EA dot 1000200 at mentor dot com> <83y5d7wpvq dot fsf at gnu dot org> <CANFwon23qn_SVjcUWUZ2Z2Y5Euqg8efiwMvXkxTRtA9-2Ttk3Q at mail dot gmail dot com> <516454DA dot 9040109 at redhat dot com> <CANFwon1aDoyCYrsNeUpkmh6ARFJmT8B4JdFqYcc6GLdo=cgqig at mail dot gmail dot com> <51667EDC dot 9070207 at redhat dot com> <CANFwon1_xBW8kcLw__tJV_Lnv5uhVSTycR-4651pYydvaa8rZw at mail dot gmail dot com> <5167F13F dot 6090007 at redhat dot com> <CANFwon0MPymGC12ZUYYy_C+yNCBSOMFK4uK9DdivCAjdcu5N9w at mail dot gmail dot com>
On 04/15/2013 10:57 PM, Hui Zhu wrote:
+ mi_run_cmd
+ set msg "mi 1st dprintf"
+ gdb_expect {
+ -re ".*At foo entry.*arg=1234, g=1234.*" {
Hui,
Probably we need to remove the trailing ".*" above. Then, the rest of
the output will be matched ...
+ pass $msg
+ }
+ -re ".*$mi_gdb_prompt$" {
+ fail $msg
+ }
+ timeout {
+ fail $msg
+ }
+ }
+ mi_expect_stop ".*" ".*" ".*" ".*" ".*" "" "$msg stop"
... here.
+
+ set msg "mi 2nd dprintf"
+ mi_send_resuming_command "exec-continue" "$msg continue"
+ gdb_expect {
+ -re ".*At foo entry.*arg=1235, g=2222.*" {
We need append "$mi_gdb_prompt$" to the end of the pattern above to eat
all the output, otherwise, these output will make troubles to the rest
of the tests.
+ pass $msg
+ }
+ -re ".*$mi_gdb_prompt$" {
+ fail $msg
+ }
+ timeout {
+ fail $msg
+ }
+ }
I can get some fails on my machine, similar to fails that Pedro pointed
out. With these change above, I don't see fails any more.
b.t.w,
+# To make sure set dprintf-style agent get right output.
+mi_gdb_test "pwd" ".*"
This line is odd to me, and looks it only papers over the problem
somewhere else.
--
Yao (éå)