This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [Patch Darwin] head build fixes for i686-darwin9/x86_64-darwin10.
- From: Pedro Alves <alves dot ped at gmail dot com>
- To: Iain Sandoe <developer at sandoe-acoustics dot co dot uk>
- Cc: gdb-patches at sourceware dot org, Tristan Gingold <gingold at adacore dot com>
- Date: Mon, 02 Jan 2012 11:39:54 +0000
- Subject: Re: [Patch Darwin] head build fixes for i686-darwin9/x86_64-darwin10.
- References: <59ABFF71-CA26-452C-B9B2-9B0FC6AAE2BD@sandoe-acoustics.co.uk>
On 12/29/2011 08:30 PM, Iain Sandoe wrote:
=======
2/ DR_FIRSTADDR and cousins are undefined.
(the fragment below is copied verbatim from gdb-7.3.1 - is there some
reason to expect that it should have been defined elsewhere?)
I've just recently removed these from this file, but I missed that the file
does not include i386-nat.h. Include i386-nat.h instead please.
Darwin has the i386 watchpoint hooks in place, but it doesn't install
them --- there's a i386_use_watchpoints call missing (at least).
http://sourceware.org/ml/gdb-patches/2011-12/msg00143.html
diff --git a/gdb/i386-darwin-nat.c b/gdb/i386-darwin-nat.c
index 23f6a6d..2a346c4 100644
--- a/gdb/i386-darwin-nat.c
+++ b/gdb/i386-darwin-nat.c
@@ -263,6 +263,22 @@ i386_darwin_store_inferior_registers (struct
target_ops *ops,
/* Support for debug registers, boosted mostly from
i386-linux-nat.c. */
+#ifndef DR_FIRSTADDR
+#define DR_FIRSTADDR 0
+#endif
+
+#ifndef DR_LASTADDR
+#define DR_LASTADDR 3
+#endif
+
+#ifndef DR_STATUS
+#define DR_STATUS 6
+#endif
+
+#ifndef DR_CONTROL
+#define DR_CONTROL 7
+#endif
+