* RFA: gdb.base/charset.exp: tighten regexp for ^C
@ 2004-06-04 5:31 Jim Blandy
2004-06-04 21:55 ` Jim Blandy
2004-06-17 21:11 ` Jim Blandy
0 siblings, 2 replies; 6+ messages in thread
From: Jim Blandy @ 2004-06-04 5:31 UTC (permalink / raw)
To: gdb-patches
The problem with the regexp for the clause that sends ^C is that it
matches a prefix of the correct output. If expect sees GDB's output
arrive in small chunks, then that clause can trigger even when GDB is
behaving correctly. This happens on AIX.
I didn't see any discussion in the archives of the sort of situations
this clause was meant to handle. A different approach might be for
the timeout clause to send a ^C the first time around, and then
actually fail the second time around. Then the situation the clause
the patch tweaks was meant to handle (now there's a nice noun clause)
will be caught by the ordinary $gdb_prompt case.
2004-06-03 Jim Blandy <jimb@redhat.com>
* gdb.base/charset.exp: Only send a control-C if we see a new
prompt and incomplete command.
Index: gdb/testsuite/gdb.base/charset.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.base/charset.exp,v
retrieving revision 1.3
diff -c -p -r1.3 charset.exp
*** gdb/testsuite/gdb.base/charset.exp 26 Feb 2004 17:23:23 -0000 1.3
--- gdb/testsuite/gdb.base/charset.exp 4 Jun 2004 04:20:01 -0000
*************** gdb_expect {
*** 140,146 ****
# We got some output that ended with a regular prompt
fail "get valid character sets"
}
! -re "^set charset.*$" {
# We got some other output, send a cntrl-c to gdb to get us back
# to the prompt.
send_gdb "\003"
--- 140,146 ----
# We got some output that ended with a regular prompt
fail "get valid character sets"
}
! -re ".*$gdb_prompt set charset.*$" {
# We got some other output, send a cntrl-c to gdb to get us back
# to the prompt.
send_gdb "\003"
^ permalink raw reply [flat|nested] 6+ messages in thread* Re: RFA: gdb.base/charset.exp: tighten regexp for ^C
2004-06-04 5:31 RFA: gdb.base/charset.exp: tighten regexp for ^C Jim Blandy
@ 2004-06-04 21:55 ` Jim Blandy
2004-06-17 21:11 ` Jim Blandy
1 sibling, 0 replies; 6+ messages in thread
From: Jim Blandy @ 2004-06-04 21:55 UTC (permalink / raw)
To: gdb-patches
Jim Blandy <jimb@redhat.com> writes:
> The problem with the regexp for the clause that sends ^C is that it
> matches a prefix of the correct output. If expect sees GDB's output
> arrive in small chunks, then that clause can trigger even when GDB is
> behaving correctly. This happens on AIX.
>
> I didn't see any discussion in the archives of the sort of situations
> this clause was meant to handle. A different approach might be for
> the timeout clause to send a ^C the first time around, and then
> actually fail the second time around. Then the situation the clause
> the patch tweaks was meant to handle (now there's a nice noun clause)
> will be caught by the ordinary $gdb_prompt case.
Oh --- tested on powerpc-unknown-linux-gnu, powerpc-ibm-aix4.3.3.0,
and i686-pc-linux-gnu.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: RFA: gdb.base/charset.exp: tighten regexp for ^C
2004-06-04 5:31 RFA: gdb.base/charset.exp: tighten regexp for ^C Jim Blandy
2004-06-04 21:55 ` Jim Blandy
@ 2004-06-17 21:11 ` Jim Blandy
1 sibling, 0 replies; 6+ messages in thread
From: Jim Blandy @ 2004-06-17 21:11 UTC (permalink / raw)
To: mec.gnu; +Cc: gdb-patches
Ping? I reported the systems on which I tested it in a followup
message.
http://sources.redhat.com/ml/gdb-patches/2004-06/msg00064.html
Jim Blandy <jimb@redhat.com> writes:
> The problem with the regexp for the clause that sends ^C is that it
> matches a prefix of the correct output. If expect sees GDB's output
> arrive in small chunks, then that clause can trigger even when GDB is
> behaving correctly. This happens on AIX.
>
> I didn't see any discussion in the archives of the sort of situations
> this clause was meant to handle. A different approach might be for
> the timeout clause to send a ^C the first time around, and then
> actually fail the second time around. Then the situation the clause
> the patch tweaks was meant to handle (now there's a nice noun clause)
> will be caught by the ordinary $gdb_prompt case.
>
> 2004-06-03 Jim Blandy <jimb@redhat.com>
>
> * gdb.base/charset.exp: Only send a control-C if we see a new
> prompt and incomplete command.
>
> Index: gdb/testsuite/gdb.base/charset.exp
> ===================================================================
> RCS file: /cvs/src/src/gdb/testsuite/gdb.base/charset.exp,v
> retrieving revision 1.3
> diff -c -p -r1.3 charset.exp
> *** gdb/testsuite/gdb.base/charset.exp 26 Feb 2004 17:23:23 -0000 1.3
> --- gdb/testsuite/gdb.base/charset.exp 4 Jun 2004 04:20:01 -0000
> *************** gdb_expect {
> *** 140,146 ****
> # We got some output that ended with a regular prompt
> fail "get valid character sets"
> }
> ! -re "^set charset.*$" {
> # We got some other output, send a cntrl-c to gdb to get us back
> # to the prompt.
> send_gdb "\003"
> --- 140,146 ----
> # We got some output that ended with a regular prompt
> fail "get valid character sets"
> }
> ! -re ".*$gdb_prompt set charset.*$" {
> # We got some other output, send a cntrl-c to gdb to get us back
> # to the prompt.
> send_gdb "\003"
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: RFA: gdb.base/charset.exp: tighten regexp for ^C
@ 2004-06-17 21:34 Michael Elizabeth Chastain
2004-06-17 22:15 ` Jim Blandy
2004-06-18 23:13 ` Jim Blandy
0 siblings, 2 replies; 6+ messages in thread
From: Michael Elizabeth Chastain @ 2004-06-17 21:34 UTC (permalink / raw)
To: jimb; +Cc: gdb-patches
jimb> Ping? I reported the systems on which I tested it in a followup
jimb> message.
jimb>
jimb> http://sources.redhat.com/ml/gdb-patches/2004-06/msg00064.html
And I replied in
http://sources.redhat.com/ml/gdb-patches/2004-06/msg00091.html
I'm still using this ancient 'mailx' mailer which doesn't thread
messages. I apologize for that. :(
Anyways, I hereby approve this patch.
Michael C
> 2004-06-03 Jim Blandy <jimb@redhat.com>
>
> * gdb.base/charset.exp: Only send a control-C if we see a new
> prompt and incomplete command.
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2004-06-18 23:13 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-06-04 5:31 RFA: gdb.base/charset.exp: tighten regexp for ^C Jim Blandy
2004-06-04 21:55 ` Jim Blandy
2004-06-17 21:11 ` Jim Blandy
2004-06-17 21:34 Michael Elizabeth Chastain
2004-06-17 22:15 ` Jim Blandy
2004-06-18 23:13 ` Jim Blandy
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox