* [PATCH] Fix a small bug in gdbserver
@ 2005-12-31 5:46 Jie Zhang
2006-01-20 23:15 ` Daniel Jacobowitz
0 siblings, 1 reply; 3+ messages in thread
From: Jie Zhang @ 2005-12-31 5:46 UTC (permalink / raw)
To: gdb-patches, Daniel Jacobowitz
[-- Attachment #1: Type: text/plain, Size: 143 bytes --]
Hi,
This patch will make gdbserver search through the whole breakpoint list
when it's finding the being deleted one.
Is it OK?
Thanks,
Jie
[-- Attachment #2: gdbserver-delete-breakpoint.diff --]
[-- Type: text/x-patch, Size: 1049 bytes --]
2005-12-29 Jie Zhang <jie.zhang@analog.com>
* mem-break.c (delete_breakpoint): Search through the whole
breakpoint list for the being deleted one.
Index: mem-break.c
===================================================================
RCS file: /cvs/src/src/gdb/gdbserver/mem-break.c,v
retrieving revision 1.5
diff -u -p -r1.5 mem-break.c
--- mem-break.c 23 Dec 2005 18:11:55 -0000 1.5
+++ mem-break.c 29 Dec 2005 13:16:47 -0000
@@ -84,18 +84,15 @@ delete_breakpoint (struct breakpoint *bp
free (bp);
return;
}
- cur = breakpoints;
- while (cur->next)
- {
- if (cur->next == bp)
- {
- cur->next = bp->next;
- (*the_target->write_memory) (bp->pc, bp->old_data,
- breakpoint_len);
- free (bp);
- return;
- }
- }
+ for (cur = breakpoints; cur->next; cur = cur->next)
+ if (cur->next == bp)
+ {
+ cur->next = bp->next;
+ (*the_target->write_memory) (bp->pc, bp->old_data,
+ breakpoint_len);
+ free (bp);
+ return;
+ }
warning ("Could not find breakpoint in list.");
}
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [PATCH] Fix a small bug in gdbserver
2005-12-31 5:46 [PATCH] Fix a small bug in gdbserver Jie Zhang
@ 2006-01-20 23:15 ` Daniel Jacobowitz
2006-01-21 0:18 ` Jim Blandy
0 siblings, 1 reply; 3+ messages in thread
From: Daniel Jacobowitz @ 2006-01-20 23:15 UTC (permalink / raw)
To: Jie Zhang; +Cc: gdb-patches
On Thu, Dec 29, 2005 at 09:41:05PM +0800, Jie Zhang wrote:
> Hi,
>
> This patch will make gdbserver search through the whole breakpoint list
> when it's finding the being deleted one.
>
> Is it OK?
> 2005-12-29 Jie Zhang <jie.zhang@analog.com>
>
> * mem-break.c (delete_breakpoint): Search through the whole
> breakpoint list for the being deleted one.
Yes, this is fine - please also make sure to update the copyright year
in the file.
--
Daniel Jacobowitz
CodeSourcery
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2006-01-21 0:18 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-12-31 5:46 [PATCH] Fix a small bug in gdbserver Jie Zhang
2006-01-20 23:15 ` Daniel Jacobowitz
2006-01-21 0:18 ` Jim Blandy
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox