diff options
author | Stan Shebs <shebs@codesourcery.com> | 2010-03-26 23:49:31 +0000 |
---|---|---|
committer | Stan Shebs <shebs@codesourcery.com> | 2010-03-26 23:49:31 +0000 |
commit | 9766ced4152120e0300ddbfe40118bc9f8f15226 (patch) | |
tree | 9f780ee70e53a43d406760fe75fc00526710c4d2 /gdb/breakpoint.c | |
parent | f0d937f331ae6304d146e1f364cfe7e388522194 (diff) | |
download | gdb-9766ced4152120e0300ddbfe40118bc9f8f15226.zip gdb-9766ced4152120e0300ddbfe40118bc9f8f15226.tar.gz gdb-9766ced4152120e0300ddbfe40118bc9f8f15226.tar.bz2 |
2010-03-26 Tom Tromey <tromey@redhat.com>
* breakpoint.c (commands_command_1): Duplicate 'arg'.
Diffstat (limited to 'gdb/breakpoint.c')
-rw-r--r-- | gdb/breakpoint.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/gdb/breakpoint.c b/gdb/breakpoint.c index a6bde43..e9fb71e 100644 --- a/gdb/breakpoint.c +++ b/gdb/breakpoint.c @@ -959,8 +959,12 @@ commands_command_1 (char *arg, int from_tty, struct command_line *control) arg = xstrprintf ("%d-%d", multi_start, multi_end); else if (breakpoint_count > 0) arg = xstrprintf ("%d", breakpoint_count); - make_cleanup (xfree, arg); } + else + /* The command loop has some static state, so we need to preserve + our argument. */ + arg = xstrdup (arg); + make_cleanup (xfree, arg); map_breakpoint_numbers (arg, do_map_commands_command, &info); |