diff options
author | Tom Tromey <tromey@adacore.com> | 2023-06-09 10:35:20 -0600 |
---|---|---|
committer | Tom Tromey <tromey@adacore.com> | 2023-06-20 06:23:30 -0600 |
commit | 8ca8b801ed4d786b11dc7e29093b904850e8a406 (patch) | |
tree | 12b8e2fa4e13a710a1e99222bafa1459e59cfb8b /gdb/python/py-micmd.c | |
parent | 550194db388374be9aa8ca3a998523807c8080ae (diff) | |
download | gdb-8ca8b801ed4d786b11dc7e29093b904850e8a406.zip gdb-8ca8b801ed4d786b11dc7e29093b904850e8a406.tar.gz gdb-8ca8b801ed4d786b11dc7e29093b904850e8a406.tar.bz2 |
Use unique_xmalloc_ptr for mi_parse::command
This changes mi_parse::command to be a unique_xmalloc_ptr and fixes up
all the uses. This avoids some manual memory management. std::string
is not used here due to how the Python API works -- this approach
avoids an extra copy there.
Reviewed-by: Keith Seitz <keiths@redhat.com>
Diffstat (limited to 'gdb/python/py-micmd.c')
-rw-r--r-- | gdb/python/py-micmd.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/gdb/python/py-micmd.c b/gdb/python/py-micmd.c index 7027210..01fc606 100644 --- a/gdb/python/py-micmd.c +++ b/gdb/python/py-micmd.c @@ -358,7 +358,7 @@ mi_command_py::invoke (struct mi_parse *parse) const parse->parse_argv (); if (parse->argv == nullptr) - error (_("Problem parsing arguments: %s %s"), parse->command, + error (_("Problem parsing arguments: %s %s"), parse->command.get (), parse->args ()); |