This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Other format: | [Raw text] |
On Sat, 25 Feb 2012 19:24:58 +0100, Luis Gustavo wrote:Could please try the following on your side?
Yes, it works for me.
Please check it in, it fixes the regression.
--- a/gdb/gdbserver/mem-break.c +++ b/gdb/gdbserver/mem-break.c @@ -726,20 +726,19 @@ void clear_gdb_breakpoint_conditions (CORE_ADDR addr) { struct breakpoint *bp = find_gdb_breakpoint_at (addr); - struct point_cond_list *cond, **cond_p; + struct point_cond_list *cond, *cond_next;
if (bp == NULL || bp->cond_list == NULL) return;
cond = bp->cond_list; - cond_p =&bp->cond_list->next;
while (cond != NULL) {
cond_next could be decllared inside in this block.
+ cond_next = cond->next;
Isn't missing here also? free (cond->cond->bytes);
2012-02-25 Luis Machado <lgustavo@codesourcery.com> * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation of conditions. diff --git a/gdb/gdbserver/mem-break.c b/gdb/gdbserver/mem-break.c index c9a6035..6b6b25c 100644 --- a/gdb/gdbserver/mem-break.c +++ b/gdb/gdbserver/mem-break.c @@ -726,20 +726,22 @@ void clear_gdb_breakpoint_conditions (CORE_ADDR addr) { struct breakpoint *bp = find_gdb_breakpoint_at (addr); - struct point_cond_list *cond, **cond_p; + struct point_cond_list *cond; if (bp == NULL || bp->cond_list == NULL) return; cond = bp->cond_list; - cond_p = &bp->cond_list->next; while (cond != NULL) { + struct point_cond_list *cond_next; + + cond_next = cond->next; + free (cond->cond->bytes); free (cond->cond); free (cond); - cond = *cond_p; - cond_p = &cond->next; + cond = cond_next; } bp->cond_list = NULL;
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |