From: Tom Tromey <tromey@redhat.com>
To: Vladimir Prus <vladimir@codesourcery.com>
Cc: gdb-patches@sources.redhat.com
Subject: Re: [RFA] Implement -break-commands
Date: Mon, 27 Jul 2009 18:49:00 -0000 [thread overview]
Message-ID: <m3bpn6jcz9.fsf@fleche.redhat.com> (raw)
In-Reply-To: <200907271303.13335.vladimir@codesourcery.com> (Vladimir Prus's message of "Mon\, 27 Jul 2009 13\:03\:12 +0400")
>>>>> "Volodya" == Vladimir Prus <vladimir@codesourcery.com> writes:
This all looks reasonable to me. I have a few style nits.
Volodya> -/* Read one line from the input stream. If the command is an "end",
Volodya> - return such an indication to the caller. If PARSE_COMMANDS is true,
Volodya> - strip leading whitespace (trailing whitespace is always stripped)
Volodya> - in the line, attempt to recognize GDB control commands, and also
Volodya> - return an indication if the command is an "else" or a nop.
Volodya> - Otherwise, only "end" is recognized. */
Volodya> -static enum misc_command_type
Volodya> -read_next_line (struct command_line **command, int parse_commands)
Volodya> +char *
Volodya> +read_next_line ()
This should be marked `static' (it is declared that way but it is
clearer to mark the definition as well). I think it needs a header
comment.
Volodya> static enum command_control_type
Volodya> -recurse_read_control_structure (struct command_line *current_cmd)
Volodya> +recurse_read_control_structure (char * (*read_next_line_func) (),
Volodya> + struct command_line *current_cmd)
The header comment should be updated to mention the new argument.
And if you don't mind, please fix the reference to the non-existing
"parent_control" parameter.
Volodya> +extern struct command_line *read_command_lines_1
Volodya> +(char * (*read_next_line_func) (), int parse_commands);
Indentation on the 2nd line.
There's some other little style nits in the patch -- over-bracing in the
second patch, mostly.
Volodya> +void
Volodya> +breakpoint_set_commands (struct breakpoint *b, struct command_line *commands)
Needs a header comment.
Volodya> +static char **mi_command_line_array;
Volodya> +static int mi_command_line_array_cnt;
Volodya> +static int mi_command_line_array_ptr;
[...]
Volodya> + break_command = read_command_lines_1 (mi_read_next_line, 0);
I think this would be cleaner if read_command_lines_1 took a "user_data"
argument and then there were no new globals.
Tom
next prev parent reply other threads:[~2009-07-27 17:39 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-07-27 16:00 Vladimir Prus
2009-07-27 16:08 ` Marc Khouzam
2009-07-27 16:17 ` Vladimir Prus
2009-07-27 18:49 ` Tom Tromey [this message]
2009-07-27 17:38 ` Vladimir Prus
2009-07-29 21:08 ` Tom Tromey
2009-07-30 7:54 ` Vladimir Prus
2009-07-30 16:57 ` Tom Tromey
2009-08-03 12:40 ` Vladimir Prus
2009-07-30 21:22 ` Eli Zaretskii
2009-08-03 12:42 ` Vladimir Prus
2009-08-03 18:22 ` Eli Zaretskii
2009-07-27 18:56 ` Eli Zaretskii
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=m3bpn6jcz9.fsf@fleche.redhat.com \
--to=tromey@redhat.com \
--cc=gdb-patches@sources.redhat.com \
--cc=vladimir@codesourcery.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox