Define _KERNTYPES in arm-nbsd-nat.c
authorChristian Biesinger <cbiesinger@google.com>
Fri, 24 Jan 2020 14:05:05 +0000 (15:05 +0100)
committerChristian Biesinger <cbiesinger@google.com>
Fri, 24 Jan 2020 15:39:01 +0000 (16:39 +0100)
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

gdb/ChangeLog
gdb/arm-nbsd-nat.c

index 964a01d6f1ba025b14d4b7ad1887850fa1bd1e35..a708c3f8d733cf9e32767d22d373cbcbc4a14617 100644 (file)
@@ -1,3 +1,8 @@
+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):
index 00f919194b9551d9a55c339ce6005e834fce0b81..33ae790063f71cefcb77c41268cf30cb5bbf3687 100644 (file)
@@ -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"
This page took 0.025985 seconds and 4 git commands to generate.