This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
PATCH: Fix a logic error in breaking out insert_bp_location
- From: Daniel Jacobowitz <drow at mvista dot com>
- To: gdb-patches at sources dot redhat dot com
- Cc: Michael Chastain <mec dot gnu at mindspring dot com>
- Date: Wed, 12 Nov 2003 12:04:07 -0500
- Subject: PATCH: Fix a logic error in breaking out insert_bp_location
Michael accurately analyzed this problem in PR 1450; I'm checking in the fix
as obvious. We return success because failure has already been handled, as
before.
--
Daniel Jacobowitz
MontaVista Software Debian GNU/Linux Developer
2003-11-12 Daniel Jacobowitz <drow@mvista.com>
PR breakpoints/1450
* breakpoint.c (insert_bp_location): Fix a logic error by returning
0 after a catchpoint fails.
Index: breakpoint.c
===================================================================
RCS file: /cvs/src/src/gdb/breakpoint.c,v
retrieving revision 1.143
diff -u -p -r1.143 breakpoint.c
--- breakpoint.c 8 Nov 2003 00:13:02 -0000 1.143
+++ breakpoint.c 12 Nov 2003 16:58:33 -0000
@@ -1071,7 +1071,11 @@ insert_bp_location (struct bp_location *
bpt->owner->enable_state = bp_disabled;
else
bpt->inserted = 1;
- return val;
+
+ /* We've already printed an error message if there was a problem
+ inserting this catchpoint, and we've disabled the catchpoint,
+ so just return success. */
+ return 0;
}
return 0;