* RFA: cd before completing
@ 2001-12-04 9:14 Jim Blandy
2001-12-04 10:15 ` Daniel Jacobowitz
` (2 more replies)
0 siblings, 3 replies; 7+ messages in thread
From: Jim Blandy @ 2001-12-04 9:14 UTC (permalink / raw)
To: gdb-patches
2001-12-04 Jim Blandy <jimb@redhat.com>
* gdb.base/completion.exp: Rather than completing very long
filenames, which can make the readline library produce output we
don't recognize, cd to the directory first, and then complete
using nice, short relative paths.
*** gdb/testsuite/gdb.base/completion.exp.orig Tue Dec 4 12:12:05 2001
--- gdb/testsuite/gdb.base/completion.exp Tue Dec 4 12:13:36 2001
***************
*** 585,618 ****
timeout { fail "(timeout) complete (2) 'p no_var_by_this_name-'" }
}
! send_gdb "file ${objdir}/Make\t"
sleep 1
gdb_expect {
! -re "file ${objdir}/Makefile.*$"\
{ send_gdb "\n"
gdb_expect {
-re "\r\nA program is being debugged already\\. Kill it\\? \\(y or n\\) $"\
{ send_gdb "n\n"
gdb_expect {
-re "\r\nProgram not killed\\.\r\n$gdb_prompt $"\
! { pass "complete 'file Make'"}
! -re ".*$gdb_prompt $" { fail "complete 'file Make'"}
! timeout {fail "(timeout) complete 'file Make'"}
}
}
! -re ".*$gdb_prompt $" { fail "complete 'file Make'"}
! timeout {fail "(timeout) complete 'file Make'"}
}
}
! -re ".*$gdb_prompt $" { fail "complete 'file Make'" }
! timeout { fail "(timeout) complete 'file Make'" }
}
! send_gdb "file ${srcdir}/gdb.base/compl\t"
sleep 1
gdb_expect {
! -re "^file ${srcdir}/gdb.base/completion\\.exp $"\
{ send_gdb "\n"
gdb_expect {
-re "\r\nA program is being debugged already\\. Kill it\\? \\(y or n\\) $"
--- 585,623 ----
timeout { fail "(timeout) complete (2) 'p no_var_by_this_name-'" }
}
! # Rather than completing very long filenames, which can make the
! # readline library produce output we don't recognize, cd to the
! # directory first, and then complete using nice, short relative paths.
! gdb_test "cd ${objdir}" "Working directory ${objdir}.*" "cd to \${objdir}"
! send_gdb "file ./Make\t"
sleep 1
gdb_expect {
! -re "file ./Makefile.*$"\
{ send_gdb "\n"
gdb_expect {
-re "\r\nA program is being debugged already\\. Kill it\\? \\(y or n\\) $"\
{ send_gdb "n\n"
gdb_expect {
-re "\r\nProgram not killed\\.\r\n$gdb_prompt $"\
! { pass "complete 'file ./Make'"}
! -re ".*$gdb_prompt $" { fail "complete 'file ./Make'"}
! timeout {fail "(timeout) complete 'file ./Make'"}
}
}
! -re ".*$gdb_prompt $" { fail "complete 'file ./Make'"}
! timeout {fail "(timeout) complete 'file ./Make'"}
}
}
! -re ".*$gdb_prompt $" { fail "complete 'file ./Make'" }
! timeout { fail "(timeout) complete 'file ./Make'" }
}
! gdb_test "cd ${srcdir}" "Working directory ${srcdir}.*" "cd to \${srcdir}"
! send_gdb "file ./gdb.base/compl\t"
sleep 1
gdb_expect {
! -re "^file ./gdb.base/completion\\.exp $"\
{ send_gdb "\n"
gdb_expect {
-re "\r\nA program is being debugged already\\. Kill it\\? \\(y or n\\) $"
***************
*** 620,636 ****
{ send_gdb "n\n"
gdb_expect {
-re "\r\nProgram not killed\\.\r\n$gdb_prompt $"\
! { pass "complete 'file gdb.base/compl'"}
! -re ".*$gdb_prompt $" { fail "complete 'file gdb.base/compl'"}
! timeout {fail "(timeout) complete 'file gdb.base/compl'"}
}
}
! -re ".*$gdb_prompt $" { fail "complete 'file gdb.base/compl'"}
! timeout {fail "(timeout) complete 'file gdb.base/compl'"}
}
}
! -re ".*$gdb_prompt $" { fail "complete 'file gdb.base/compl'" }
! timeout { fail "(timeout) complete 'file gdb.base/compl'" }
}
send_gdb "info func mark\t"
--- 625,641 ----
{ send_gdb "n\n"
gdb_expect {
-re "\r\nProgram not killed\\.\r\n$gdb_prompt $"\
! { pass "complete 'file ./gdb.base/compl'"}
! -re ".*$gdb_prompt $" { fail "complete 'file ./gdb.base/compl'"}
! timeout {fail "(timeout) complete 'file ./gdb.base/compl'"}
}
}
! -re ".*$gdb_prompt $" { fail "complete 'file ./gdb.base/compl'"}
! timeout {fail "(timeout) complete 'file ./gdb.base/compl'"}
}
}
! -re ".*$gdb_prompt $" { fail "complete 'file ./gdb.base/compl'" }
! timeout { fail "(timeout) complete 'file ./gdb.base/compl'" }
}
send_gdb "info func mark\t"
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: RFA: cd before completing
2001-12-04 9:14 RFA: cd before completing Jim Blandy
@ 2001-12-04 10:15 ` Daniel Jacobowitz
2001-12-04 14:51 ` Jim Blandy
2001-12-13 12:15 ` Kevin Buettner
2001-12-17 15:00 ` Jim Blandy
2 siblings, 1 reply; 7+ messages in thread
From: Daniel Jacobowitz @ 2001-12-04 10:15 UTC (permalink / raw)
To: gdb-patches
On Tue, Dec 04, 2001 at 12:15:57PM -0500, Jim Blandy wrote:
>
> 2001-12-04 Jim Blandy <jimb@redhat.com>
>
> * gdb.base/completion.exp: Rather than completing very long
> filenames, which can make the readline library produce output we
> don't recognize, cd to the directory first, and then complete
> using nice, short relative paths.
What does it produce that we don't recognize - some kind of line
wrapping?
(Please include a comment to that effect when this is approved).
--
Daniel Jacobowitz Carnegie Mellon University
MontaVista Software Debian GNU/Linux Developer
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: RFA: cd before completing
2001-12-04 10:15 ` Daniel Jacobowitz
@ 2001-12-04 14:51 ` Jim Blandy
2001-12-04 14:57 ` Daniel Jacobowitz
0 siblings, 1 reply; 7+ messages in thread
From: Jim Blandy @ 2001-12-04 14:51 UTC (permalink / raw)
To: Daniel Jacobowitz; +Cc: gdb-patches
Daniel Jacobowitz <drow@mvista.com> writes:
> On Tue, Dec 04, 2001 at 12:15:57PM -0500, Jim Blandy wrote:
> > 2001-12-04 Jim Blandy <jimb@redhat.com>
> >
> > * gdb.base/completion.exp: Rather than completing very long
> > filenames, which can make the readline library produce output we
> > don't recognize, cd to the directory first, and then complete
> > using nice, short relative paths.
>
> What does it produce that we don't recognize - some kind of line
> wrapping?
>
> (Please include a comment to that effect when this is approved).
Is this better?
! # The following tests used to simply try to complete `${objdir}/Make',
! # and so on. The problem is that ${objdir} can be very long; the
! # completed filename may be more than eighty characters wide. When
! # this happens, readline tries to manage things, producing output that
! # may make sense on the screen, but is rather hard for our script to
! # recognize.
! #
! # In the case that motivated this change, the (gdb) prompt occupied
! # the leftmost six columns, and `${objdump}/' was seventy-four
! # characters long --- eighty in all. After printing the slash,
! # readline emitted a space, a carriage return, and then `Makefile'
! # (the tab character being received as input after `Make'.
! #
! # Basically, you have to let readline do whatever it's going to do to
! # make the screen look right. If it happens to use a different
! # strategy on Tuesdays to get the cursor in the right place, that's
! # not something the testsuite should care about.
! #
! # So, we avoid long lines. We `cd' to ${objdir} first, and then do
! # the completion relative to the current directory.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: RFA: cd before completing
2001-12-04 14:51 ` Jim Blandy
@ 2001-12-04 14:57 ` Daniel Jacobowitz
0 siblings, 0 replies; 7+ messages in thread
From: Daniel Jacobowitz @ 2001-12-04 14:57 UTC (permalink / raw)
To: Jim Blandy; +Cc: gdb-patches
On Tue, Dec 04, 2001 at 05:52:37PM -0500, Jim Blandy wrote:
>
> Daniel Jacobowitz <drow@mvista.com> writes:
> > On Tue, Dec 04, 2001 at 12:15:57PM -0500, Jim Blandy wrote:
> > > 2001-12-04 Jim Blandy <jimb@redhat.com>
> > >
> > > * gdb.base/completion.exp: Rather than completing very long
> > > filenames, which can make the readline library produce output we
> > > don't recognize, cd to the directory first, and then complete
> > > using nice, short relative paths.
> >
> > What does it produce that we don't recognize - some kind of line
> > wrapping?
> >
> > (Please include a comment to that effect when this is approved).
>
>
> Is this better?
Thanks! That makes much more sense.
--
Daniel Jacobowitz Carnegie Mellon University
MontaVista Software Debian GNU/Linux Developer
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: RFA: cd before completing
2001-12-04 9:14 RFA: cd before completing Jim Blandy
2001-12-04 10:15 ` Daniel Jacobowitz
@ 2001-12-13 12:15 ` Kevin Buettner
2001-12-16 12:31 ` Jim Blandy
2001-12-17 15:00 ` Jim Blandy
2 siblings, 1 reply; 7+ messages in thread
From: Kevin Buettner @ 2001-12-13 12:15 UTC (permalink / raw)
To: Jim Blandy, gdb-patches
On Dec 4, 12:15pm, Jim Blandy wrote:
> 2001-12-04 Jim Blandy <jimb@redhat.com>
>
> * gdb.base/completion.exp: Rather than completing very long
> filenames, which can make the readline library produce output we
> don't recognize, cd to the directory first, and then complete
> using nice, short relative paths.
Jim,
Have you committed this patch yet? I see the above entry in the
ChangeLog file, but I can't find the actual changes in
completion.exp...
Kevin
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: RFA: cd before completing
2001-12-13 12:15 ` Kevin Buettner
@ 2001-12-16 12:31 ` Jim Blandy
0 siblings, 0 replies; 7+ messages in thread
From: Jim Blandy @ 2001-12-16 12:31 UTC (permalink / raw)
To: Kevin Buettner; +Cc: gdb-patches
Kevin Buettner <kevinb@redhat.com> writes:
> On Dec 4, 12:15pm, Jim Blandy wrote:
>
> > 2001-12-04 Jim Blandy <jimb@redhat.com>
> >
> > * gdb.base/completion.exp: Rather than completing very long
> > filenames, which can make the readline library produce output we
> > don't recognize, cd to the directory first, and then complete
> > using nice, short relative paths.
>
> Have you committed this patch yet? I see the above entry in the
> ChangeLog file, but I can't find the actual changes in
> completion.exp...
I may have committed that by accident. I'm not sure it's been
approved yet. Either way, I'll straighten it out.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: RFA: cd before completing
2001-12-04 9:14 RFA: cd before completing Jim Blandy
2001-12-04 10:15 ` Daniel Jacobowitz
2001-12-13 12:15 ` Kevin Buettner
@ 2001-12-17 15:00 ` Jim Blandy
2 siblings, 0 replies; 7+ messages in thread
From: Jim Blandy @ 2001-12-17 15:00 UTC (permalink / raw)
To: gdb-patches
I've committed this patch.
Jim Blandy <jimb@cygnus.com> writes:
>
> 2001-12-04 Jim Blandy <jimb@redhat.com>
>
> * gdb.base/completion.exp: Rather than completing very long
> filenames, which can make the readline library produce output we
> don't recognize, cd to the directory first, and then complete
> using nice, short relative paths.
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2001-12-17 23:00 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-12-04 9:14 RFA: cd before completing Jim Blandy
2001-12-04 10:15 ` Daniel Jacobowitz
2001-12-04 14:51 ` Jim Blandy
2001-12-04 14:57 ` Daniel Jacobowitz
2001-12-13 12:15 ` Kevin Buettner
2001-12-16 12:31 ` Jim Blandy
2001-12-17 15:00 ` Jim Blandy
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox