This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH 10/10] Command line input handling TLC
- From: Simon Marchi <simon dot marchi at ericsson dot com>
- To: Pedro Alves <palves at redhat dot com>, <gdb-patches at sourceware dot org>
- Date: Fri, 19 Feb 2016 11:01:51 -0500
- Subject: Re: [PATCH 10/10] Command line input handling TLC
- Authentication-results: sourceware.org; auth=none
- References: <1455817236-13642-1-git-send-email-palves at redhat dot com> <1455817236-13642-11-git-send-email-palves at redhat dot com>
On 16-02-18 12:40 PM, Pedro Alves wrote:
> I didn't manage to usefully split this further into smaller
> independent pieces, so:
>
> - Use "struct buffer" more.
>
> - Split out the responsability of composing a complete command line
responsibility
> -/* Handle a complete line of input. This is called by the callback
> - mechanism within the readline library. Deal with incomplete
> - commands as well, by saving the partial input in a global
> - buffer. */
> +/* Append RL, an input line returned by readline or one of its
> + emulations, to CMD_LINE_BUFFER. Returns false if more input is
> + expected (input line ends in a backslash), true if we have a whole
> + command line ready to be processed by the command interpreter.
> + Takes ownership of RL. */
>
> -/* NOTE: 1999-04-30 This is the asynchronous version of the
> - command_line_input function; command_line_input will become
> - obsolete once we use the event loop as the default mechanism in
> - GDB. */
> -static void
> -command_line_handler (char *rl)
> +static char *
> +command_line_append_input_line (struct buffer *cmd_line_buffer, char *rl)
The comment seems outdated, the function doesn't return true/false, but NULL
or non-NULL. I suppose it did return true/false in an earlier version of the
patch :).