This is the mail archive of the gdb-patches@sourceware.cygnus.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]

[PATCH] Return meaningful errno if hw breakpoints can't be set



FYI, I checked in today the following patch (trunk and branch):

2000-04-11  Eli Zaretskii  <eliz@is.elta.co.il>

	* go32-nat.c (go32_insert_hw_breakpoint): When there are no more
	hardware breakpoint resources, return EBUSY.
	(go32_handle_nonaligned_watchpoint): If the argument WHAT is not
	one of the enumerated values, return EINVAL.


--- gdb/go32-nat.c~	Sun Apr  2 23:07:12 2000
+++ gdb/go32-nat.c	Tue Apr 11 19:55:58 2000
@@ -879,7 +879,7 @@ go32_handle_nonaligned_watchpoint (wp_op
       else if (what == wp_count)
 	rv++;
       else
-	status = -1;
+	status = EINVAL;
       /* We keep the loop going even after a failure, because some of
 	 the other aligned watchpoints might still succeed, e.g. if
 	 they watch addresses that are already watched, and thus just
@@ -1055,7 +1055,7 @@ go32_insert_hw_breakpoint (CORE_ADDR add
     }
   SHOW_DR (insert_hw, 0);
 
-  return i < 4 ? 0 : -1;
+  return i < 4 ? 0 : EBUSY;
 }
 
 /* Put the device open on handle FD into either raw or cooked

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