* breakpoint.c (bpstat_copy): Copy the command lines as well
authorDaniel Jacobowitz <drow@false.org>
Mon, 10 Mar 2003 23:37:29 +0000 (23:37 +0000)
committerDaniel Jacobowitz <drow@false.org>
Mon, 10 Mar 2003 23:37:29 +0000 (23:37 +0000)
as the old value, to match what is freed in bpstat_clear.

gdb/ChangeLog
gdb/breakpoint.c

index e2adc4bbbe0b75a2d2cf7261552652fd57268af8..9407556ae68037a511f9580c91256f777ac282e8 100644 (file)
@@ -1,3 +1,8 @@
+2003-03-10  Klee Dienes  <kdienes@apple.com>
+
+       * breakpoint.c (bpstat_copy): Copy the command lines as well
+       as the old value, to match what is freed in bpstat_clear.
+
 2003-03-10  David Carlton  <carlton@math.stanford.edu>
 
        * minsyms.c (add_minsym_to_hash_table): Replace
index f27f3fc556e4edfb2482ae486e76dbc7a8f2ad89..638935c274e588c1cf32dea0cdb4abbc89d28519 100644 (file)
@@ -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;
This page took 0.033776 seconds and 4 git commands to generate.