diff options
author | Tom Tromey <tromey@adacore.com> | 2023-03-20 10:56:55 -0600 |
---|---|---|
committer | Tom Tromey <tromey@adacore.com> | 2023-05-23 10:09:27 -0600 |
commit | fde3f93adb50c9937cd2e1c93561aea2fd167156 (patch) | |
tree | ecf17032c9cacf65b86c6357c46077ca211df68a /gdb/mi/mi-parse.c | |
parent | 7df1df795f7c738f33c0e40d99a95cf9876d6f59 (diff) | |
download | gdb-fde3f93adb50c9937cd2e1c93561aea2fd167156.zip gdb-fde3f93adb50c9937cd2e1c93561aea2fd167156.tar.gz gdb-fde3f93adb50c9937cd2e1c93561aea2fd167156.tar.bz2 |
Introduce "static constructor" for mi_parse
Change the mi_parse function to be a static method of mi_parse. This
lets us remove the 'set_args' setter function.
Diffstat (limited to 'gdb/mi/mi-parse.c')
-rw-r--r-- | gdb/mi/mi-parse.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/gdb/mi/mi-parse.c b/gdb/mi/mi-parse.c index f077eb3..b7c5a8c 100644 --- a/gdb/mi/mi-parse.c +++ b/gdb/mi/mi-parse.c @@ -109,7 +109,7 @@ mi_parse_escape (const char **string_ptr) void mi_parse::parse_argv () { - const char *chp = m_args.get (); + const char *chp = m_args.c_str (); int argc = 0; char **argv = XNEWVEC (char *, argc + 1); @@ -216,7 +216,7 @@ mi_parse::~mi_parse () } std::unique_ptr<struct mi_parse> -mi_parse (const char *cmd, char **token) +mi_parse::make (const char *cmd, char **token) { const char *chp; @@ -345,7 +345,7 @@ mi_parse (const char *cmd, char **token) } /* Save the rest of the arguments for the command. */ - parse->set_args (chp); + parse->m_args = chp; /* Fully parsed, flag as an MI command. */ parse->op = MI_COMMAND; |