summaryrefslogtreecommitdiff
path: root/gdb/macrocmd.c
diff options
context:
space:
mode:
authorTom Tromey <tromey@redhat.com>2008-12-12 16:58:45 +0000
committerTom Tromey <tromey@redhat.com>2008-12-12 16:58:45 +0000
commit3ee2fe6b0783da17e2b0b58304fac41a9027945b (patch)
tree6e86424eb7530ac0717a024e6ab8cd91af3e5636 /gdb/macrocmd.c
parentb7681b5e27511b6e714c253ab8a8381eaff0052d (diff)
downloadgdb-3ee2fe6b0783da17e2b0b58304fac41a9027945b.tar.gz
* macrocmd.c (macro_define_command): Skip whitespace after
macro name. (print_one_macro): Print space after macro name.
Diffstat (limited to 'gdb/macrocmd.c')
-rw-r--r--gdb/macrocmd.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/gdb/macrocmd.c b/gdb/macrocmd.c
index 56e9a48ff22..fa639d1e60d 100644
--- a/gdb/macrocmd.c
+++ b/gdb/macrocmd.c
@@ -315,13 +315,17 @@ macro_define_command (char *exp, int from_tty)
}
/* Skip the closing paren. */
++exp;
+ skip_ws (&exp);
macro_define_function (macro_main (macro_user_macros), -1, name,
new_macro.argc, (const char **) new_macro.argv,
exp);
}
else
- macro_define_object (macro_main (macro_user_macros), -1, name, exp);
+ {
+ skip_ws (&exp);
+ macro_define_object (macro_main (macro_user_macros), -1, name, exp);
+ }
do_cleanups (cleanup_chain);
}
@@ -358,9 +362,7 @@ print_one_macro (const char *name, const struct macro_definition *macro,
macro->argv[i]);
fprintf_filtered (gdb_stdout, ")");
}
- /* Note that we don't need a leading space here -- "macro define"
- provided it. */
- fprintf_filtered (gdb_stdout, "%s\n", macro->replacement);
+ fprintf_filtered (gdb_stdout, " %s\n", macro->replacement);
}