This is the mail archive of the
gdb-patches@sourceware.cygnus.com
mailing list for the GDB project.
[PATCH] Return meaningful errno if hw breakpoints can't be set
- To: gdb-patches at sourceware dot cygnus dot com
- Subject: [PATCH] Return meaningful errno if hw breakpoints can't be set
- From: Eli Zaretskii <eliz at delorie dot com>
- Date: Wed, 12 Apr 2000 13:11:45 -0400 (EDT)
- Reply-to: Eli Zaretskii <eliz at is dot elta dot co dot il>
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