aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Biesinger <cbiesinger@google.com>2020-01-24 15:05:05 +0100
committerChristian Biesinger <cbiesinger@google.com>2020-01-24 16:39:01 +0100
commit73685c7ededdde511ae6a7f827fa29ec8502892a (patch)
treec388b8520bde6ef420f111194f35a47b836121d8
parent43198d20896df6a785165650914d0b73fc9450a8 (diff)
downloadgdb-73685c7ededdde511ae6a7f827fa29ec8502892a.zip
gdb-73685c7ededdde511ae6a7f827fa29ec8502892a.tar.gz
gdb-73685c7ededdde511ae6a7f827fa29ec8502892a.tar.bz2
Define _KERNTYPES in arm-nbsd-nat.c
Fixes the below compile error on ARM NetBSD 9.0_RC1 (the only version I tested). types.h does not define register_t by default. We already use this define elsewhere, notably in bsd-kvm.c. In file included from ../../gdb/arm-nbsd-nat.c:28: /usr/include/machine/frame.h:54:2: error: unknown type name 'register_t'; did you mean '__register_t'? register_t tf_spsr; ^ /usr/include/machine/types.h:77:14: note: '__register_t' declared here typedef int __register_t; ^ There are other compile errors that this does not fix. gdb/ChangeLog: 2020-01-24 Christian Biesinger <cbiesinger@google.com> * arm-nbsd-nat.c: Define _KERNTYPES to get the declaration of register_t. Change-Id: I82c21d38189ee59ea0af2538ba84b771d268722e
-rw-r--r--gdb/ChangeLog5
-rw-r--r--gdb/arm-nbsd-nat.c2
2 files changed, 7 insertions, 0 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 964a01d..a708c3f 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,10 @@
2020-01-24 Christian Biesinger <cbiesinger@google.com>
+ * arm-nbsd-nat.c: Define _KERNTYPES to get the declaration of
+ register_t.
+
+2020-01-24 Christian Biesinger <cbiesinger@google.com>
+
* aarch64-fbsd-tdep.c (aarch64_fbsd_iterate_over_regset_sections):
Update comment.
* aarch64-linux-tdep.c (aarch64_linux_iterate_over_regset_sections):
diff --git a/gdb/arm-nbsd-nat.c b/gdb/arm-nbsd-nat.c
index 00f9191..33ae790 100644
--- a/gdb/arm-nbsd-nat.c
+++ b/gdb/arm-nbsd-nat.c
@@ -17,6 +17,8 @@
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
+/* We define this to get types like register_t. */
+#define _KERNTYPES
#include "defs.h"
#include "gdbcore.h"
#include "inferior.h"