diff options
author | Daniel Jacobowitz <drow@false.org> | 2003-03-10 23:37:29 +0000 |
---|---|---|
committer | Daniel Jacobowitz <drow@false.org> | 2003-03-10 23:37:29 +0000 |
commit | 31cc81e9d91588faabb97ce0be1b2f296bb46712 (patch) | |
tree | ecc8f0053809b209fc6c87d661e1e92f14e8ebd9 /gdb/breakpoint.c | |
parent | e515b051720482023e3f79e418d8b381e29273f3 (diff) | |
download | gdb-31cc81e9d91588faabb97ce0be1b2f296bb46712.zip gdb-31cc81e9d91588faabb97ce0be1b2f296bb46712.tar.gz gdb-31cc81e9d91588faabb97ce0be1b2f296bb46712.tar.bz2 |
* breakpoint.c (bpstat_copy): Copy the command lines as well
as the old value, to match what is freed in bpstat_clear.
Diffstat (limited to 'gdb/breakpoint.c')
-rw-r--r-- | gdb/breakpoint.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/gdb/breakpoint.c b/gdb/breakpoint.c index f27f3fc..638935c 100644 --- a/gdb/breakpoint.c +++ b/gdb/breakpoint.c @@ -1816,6 +1816,11 @@ bpstat_copy (bpstat bs) { tmp = (bpstat) xmalloc (sizeof (*tmp)); memcpy (tmp, bs, sizeof (*tmp)); + if (bs->commands != NULL) + tmp->commands = copy_command_lines (bs->commands); + if (bs->old_val != NULL) + tmp->old_val = value_copy (bs->old_val); + if (p == NULL) /* This is the first thing in the chain. */ retval = tmp; |