This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[obv] Cleanup: Use bpstat_causes_stop
- From: Jan Kratochvil <jan dot kratochvil at redhat dot com>
- To: gdb-patches at sourceware dot org
- Date: Mon, 5 Apr 2010 12:09:01 +0200
- Subject: [obv] Cleanup: Use bpstat_causes_stop
Hi,
just a tiny code cleanup.
------------------------------------------------------------------------------
int
bpstat_causes_stop (bpstat bs)
{
for (; bs != NULL; bs = bs->next)
if (bs->stop)
return 1;
return 0;
}
------------------------------------------------------------------------------
No regressions on {x86_64,x86_64-m32,i686}-fedora12-linux-gnu.
Checked-in.
Thanks,
Jan
http://sourceware.org/ml/gdb-cvs/2010-04/msg00034.html
--- src/gdb/ChangeLog 2010/04/04 23:46:58 1.11571
+++ src/gdb/ChangeLog 2010/04/05 10:07:30 1.11572
@@ -1,3 +1,8 @@
+2010-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
+
+ Code cleanup.
+ * breakpoint.c (bpstat_stop_status): Use bpstat_causes_stop.
+
2010-04-04 Stan Shebs <stan@codesourcery.com>
Nathan Sidwell <nathan@codesourcery.com>
--- src/gdb/breakpoint.c 2010/04/04 23:47:15 1.477
+++ src/gdb/breakpoint.c 2010/04/05 10:07:30 1.478
@@ -4141,12 +4141,8 @@
not have changed, but the intermediate memory locations we are
watching may have. Don't bother if we're stopping; this will get
done later. */
- for (bs = root_bs->next; bs != NULL; bs = bs->next)
- if (bs->stop)
- break;
-
need_remove_insert = 0;
- if (bs == NULL)
+ if (! bpstat_causes_stop (root_bs->next))
for (bs = root_bs->next; bs != NULL; bs = bs->next)
if (!bs->stop
&& bs->breakpoint_at->owner