This is the mail archive of the gdb-patches@sources.redhat.com 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]

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;


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]