RFC: fix bug in compare_breakpoints
Tom Tromey
tromey@redhat.com
Wed Oct 17 19:36:00 GMT 2012
I built gdb with clang today.
This found a bunch of nits (I'll send a nit-cleanup patch later) but
also a couple real bugs.
Here's the first one. compare_breakpoints has an invalid comparison.
Built (with clang and gcc) and regtested (gcc only) on x86-64 F16.
Tom
2012-10-17 Tom Tromey <tromey@redhat.com>
* breakpoint.c (compare_breakpoints): Fix comparison.
diff --git a/gdb/breakpoint.c b/gdb/breakpoint.c
index bebad75..76e3e89 100644
--- a/gdb/breakpoint.c
+++ b/gdb/breakpoint.c
@@ -11766,7 +11766,7 @@ compare_breakpoints (const void *a, const void *b)
the number 0. */
if (ua < ub)
return -1;
- return ub > ub ? 1 : 0;
+ return ua > ub ? 1 : 0;
}
/* Delete breakpoints by address or line. */
More information about the Gdb-patches
mailing list