[PATCH 2/3] Define _KMEMUSER in arm-nbsd-nat.c

cbiesinger@chromium.org cbiesinger@chromium.org
Fri Jan 24 14:18:00 GMT 2020


From: Christian Biesinger <cbiesinger@google.com>

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 _KMEMUSER to get the declaration of
	register_t.

Change-Id: I82c21d38189ee59ea0af2538ba84b771d268722e
---
 gdb/arm-nbsd-nat.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/gdb/arm-nbsd-nat.c b/gdb/arm-nbsd-nat.c
index 00f919194b..31fe66c724 100644
--- a/gdb/arm-nbsd-nat.c
+++ b/gdb/arm-nbsd-nat.c
@@ -17,6 +17,7 @@
    You should have received a copy of the GNU General Public License
    along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 
+
 #include "defs.h"
 #include "gdbcore.h"
 #include "inferior.h"
-- 
2.25.0.341.g760bfbb309-goog



More information about the Gdb-patches mailing list