This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [RFA] completer test [was Re: [RFC] Cleanup for make_source_files_completion_list]
- From: Joel Brobecker <brobecker at adacore dot com>
- To: Keith Seitz <keiths at redhat dot com>
- Cc: Sergio Durigan Junior <sergiodj at redhat dot com>, "gdb-patches at sourceware dot org ml" <gdb-patches at sourceware dot org>
- Date: Thu, 16 May 2013 09:30:09 +0400
- Subject: Re: [RFA] completer test [was Re: [RFC] Cleanup for make_source_files_completion_list]
- References: <51895A2F dot 8000504 at redhat dot com> <CADPb22Sj_5Bp+FhoQYk_9vR5c1D3fXsw4gLFu7v+jmDNSaOPFg at mail dot gmail dot com> <5191340B dot 60100 at redhat dot com> <519156F5 dot 5090000 at redhat dot com> <5193C786 dot 4000207 at redhat dot com> <5193E2DC dot 5000200 at redhat dot com> <m3r4h7kh4p dot fsf at redhat dot com> <51941E85 dot 8010104 at redhat dot com>
> > (gdb) complete break filesy
> > break filesym
> > break filesym.c
>
> Is that necessarily "better" than testing what a user would actually
> type? I don't know. gdb.base/completion.exp uses both forms.
I haven't verified yet that the issue you fixed is the same as
the issue I noticed, and put aside for later. But my initial
investigation at the time showed that the problem did not appear
when using the "complete" command, only when using the interactive
form via the "tab" key.
> >Also, ISTR "send_gdb" is deprecated, and one should use
> >"gdb_test_multiple" instead. WDYT?
>
> Is send_gdb deprecated or gdb_expect? Or is their direct use discouraged?
My take on this is that it is very highly discouraged, at least
for gdb_expect, and should only be used when none of the standard
gdb_test et al routines can do the job. The reason behind it is
that using gdb_expect directly, you are missing out on the standard
processing of various known conditions (internal errors, timeouts,
etc).
--
Joel