aboutsummaryrefslogtreecommitdiff
path: root/gdb/python/python.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/python/python.c')
-rw-r--r--gdb/python/python.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/gdb/python/python.c b/gdb/python/python.c
index 451c5bd..264f7c8 100644
--- a/gdb/python/python.c
+++ b/gdb/python/python.c
@@ -1924,11 +1924,11 @@ namespace selftests {
static void
test_python ()
{
-#define CMD execute_command_to_string ("python print(5)", 0, true);
+#define CMD(S) execute_command_to_string (S, "python print(5)", 0, true)
std::string output;
- output = CMD;
+ CMD (output);
SELF_CHECK (output == "5\n");
output.clear ();
@@ -1937,7 +1937,7 @@ test_python ()
= make_scoped_restore (&gdb_python_initialized, 0);
try
{
- output = CMD;
+ CMD (output);
}
catch (const gdb_exception &e)
{