From 825a7d7492a41640c9c5d97e831f05ca95d0a39b Mon Sep 17 00:00:00 2001 From: Simon Marchi Date: Thu, 7 Sep 2023 10:29:26 -0400 Subject: [PATCH] gdb: fix indentation in mi/mi-parse.h Change-Id: Ib841a77a9494648aee9f970141424363664ff6e8 --- gdb/mi/mi-parse.h | 118 +++++++++++++++++++++++----------------------- 1 file changed, 59 insertions(+), 59 deletions(-) diff --git a/gdb/mi/mi-parse.h b/gdb/mi/mi-parse.h index 6bf516cfc57..4a41b305031 100644 --- a/gdb/mi/mi-parse.h +++ b/gdb/mi/mi-parse.h @@ -35,67 +35,67 @@ struct mi_timestamp }; enum mi_command_type - { - MI_COMMAND, CLI_COMMAND - }; +{ + MI_COMMAND, CLI_COMMAND +}; struct mi_parse - { - /* Attempt to parse CMD creating a ``struct mi_parse''. If CMD is - invalid, an exception is thrown. For an MI_COMMAND COMMAND, ARGS - and OP are initialized. Un-initialized fields are zero. *TOKEN is - set to the token, even if an exception is thrown. */ - mi_parse (const char *cmd, std::string *token); - - /* Create an mi_parse object given the command name and a vector - of arguments. Unlike with the other constructor, here the - arguments are treated "as is" -- no escape processing is - done. */ - mi_parse (gdb::unique_xmalloc_ptr command, - std::vector> args); - - ~mi_parse (); - - DISABLE_COPY_AND_ASSIGN (mi_parse); - - /* Split the arguments into argc/argv and store the result. */ - void parse_argv (); - - /* Return the full argument string, as used by commands which are - implemented as CLI commands. */ - const char *args (); - - enum mi_command_type op = MI_COMMAND; - /* This is not std::string because it avoids a copy in the Python - API case. */ - gdb::unique_xmalloc_ptr command; - std::string token; - const struct mi_command *cmd = nullptr; - struct mi_timestamp *cmd_start = nullptr; - char **argv = nullptr; - int argc = 0; - int all = 0; - int thread_group = -1; /* At present, the same as inferior number. */ - int thread = -1; - int frame = -1; - - /* The language that should be used to evaluate the MI command. - Ignored if set to language_unknown. */ - enum language language = language_unknown; - - private: - - /* Helper methods for parsing arguments. Each takes the argument - to be parsed. It will either set a member of this object, or - throw an exception on error. In each case, *ENDP, if non-NULL, - will be updated to just after the argument text. */ - void set_thread_group (const char *arg, char **endp); - void set_thread (const char *arg, char **endp); - void set_frame (const char *arg, char **endp); - void set_language (const char *arg, const char **endp); - - std::string m_args; - }; +{ + /* Attempt to parse CMD creating a ``struct mi_parse''. If CMD is + invalid, an exception is thrown. For an MI_COMMAND COMMAND, ARGS + and OP are initialized. Un-initialized fields are zero. *TOKEN is + set to the token, even if an exception is thrown. */ + mi_parse (const char *cmd, std::string *token); + + /* Create an mi_parse object given the command name and a vector + of arguments. Unlike with the other constructor, here the + arguments are treated "as is" -- no escape processing is + done. */ + mi_parse (gdb::unique_xmalloc_ptr command, + std::vector> args); + + ~mi_parse (); + + DISABLE_COPY_AND_ASSIGN (mi_parse); + + /* Split the arguments into argc/argv and store the result. */ + void parse_argv (); + + /* Return the full argument string, as used by commands which are + implemented as CLI commands. */ + const char *args (); + + enum mi_command_type op = MI_COMMAND; + /* This is not std::string because it avoids a copy in the Python + API case. */ + gdb::unique_xmalloc_ptr command; + std::string token; + const struct mi_command *cmd = nullptr; + struct mi_timestamp *cmd_start = nullptr; + char **argv = nullptr; + int argc = 0; + int all = 0; + int thread_group = -1; /* At present, the same as inferior number. */ + int thread = -1; + int frame = -1; + + /* The language that should be used to evaluate the MI command. + Ignored if set to language_unknown. */ + enum language language = language_unknown; + +private: + + /* Helper methods for parsing arguments. Each takes the argument + to be parsed. It will either set a member of this object, or + throw an exception on error. In each case, *ENDP, if non-NULL, + will be updated to just after the argument text. */ + void set_thread_group (const char *arg, char **endp); + void set_thread (const char *arg, char **endp); + void set_frame (const char *arg, char **endp); + void set_language (const char *arg, const char **endp); + + std::string m_args; +}; /* Parse a string argument into a print_values value. */ -- 2.30.2