This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Add completer to commands 'target {core/tfile/exec}'


On Fri, Mar 29, 2013 at 8:22 AM, Yao Qi <yao@codesourcery.com> wrote:
> On 03/28/2013 11:14 PM, Pedro Alves wrote:
>>>      (add_target_with_completer): ... it.  New.  Call set_cmd_completer if
>>> >    parameter completer is not NULL.
>> s/it./this./.  "New." looks stale here.  Did you mean "New parameter"?
>>
>
> "New" is not needed here.  Removed.  Patch below is committed.  Thanks
> for the review.
>
> --
> Yao (éå)
>
> gdb:
>
> 2013-03-29  Yao Qi  <yao@codesourcery.com>
>
>         * corelow.c: Include "completer.h".
>         (_initialize_corelow): Call add_target_with_completer with
>         argument 'filename_completer'.
>         * tracepoint.c: Likewise.
>         * exec.c (_initialize_exec): Likewise.
>         * target.c (add_target): Rename to ...
>         (add_target_with_completer): ... this.  Call set_cmd_completer
>         if parameter completer is not NULL.
>         (add_target): New.
>         * target.h: Include "command.h".
>         (add_target_with_completer): Declare it.
>
> gdb/testsuite:
>
> 2013-03-29  Yao Qi  <yao@codesourcery.com>
>
>         * gdb.base/completion.exp: Test completion of commands
>         "target core", "target tfile" and "target exec".
>         * gdb.trace/tfile.exp: Test completion of command
>         "target tfile".
> [...]
> diff --git a/gdb/testsuite/gdb.trace/tfile.exp b/gdb/testsuite/gdb.trace/tfile.exp
> index e8a778d..3b720cc 100644
> --- a/gdb/testsuite/gdb.trace/tfile.exp
> +++ b/gdb/testsuite/gdb.trace/tfile.exp
> @@ -128,3 +128,8 @@ gdb_test \
>  gdb_test "interpreter-exec mi \"-trace-status\"" \
>      "\\^done,supported=\"file\",trace-file=\".*basic.tf\",running=\"0\",stop-reason=\"request\",frames=\"${decimal}\",frames-created=\"${decimal}\",buffer-size=\"${decimal}\",buffer-free=\"${decimal}\",disconnected=\".*\",circular=\".*\",user-name=\"\",notes=\"\",start-time=\".*\",stop-time=\".*\"" \
>      "-trace-status"
> +
> +# Test completion works well.
> +
> +gdb_test "target tfile basic\t" "Assuming tracepoint.*" \
> +    "complete-command 'target tfile'"

Hi.  This test is failing for me because I have another file that
begins with "basic".
Can you change this to use "tfile-basic" instead of "basic?


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]