aboutsummaryrefslogtreecommitdiff
path: root/gdb/python/py-micmd.c
diff options
context:
space:
mode:
authorTom Tromey <tromey@adacore.com>2023-06-09 10:35:20 -0600
committerTom Tromey <tromey@adacore.com>2023-06-20 06:23:30 -0600
commit8ca8b801ed4d786b11dc7e29093b904850e8a406 (patch)
tree12b8e2fa4e13a710a1e99222bafa1459e59cfb8b /gdb/python/py-micmd.c
parent550194db388374be9aa8ca3a998523807c8080ae (diff)
downloadgdb-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.c2
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 ());