mirror of
https://github.com/bminor/binutils-gdb.git
synced 2025-12-27 01:28:46 +00:00
* breakpoint.c (bpstat_copy): Copy the command lines as well
as the old value, to match what is freed in bpstat_clear.
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user