Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/tools/gdb Add gdbserver



details:   https://anonhg.NetBSD.org/src/rev/a297e21b535a
branches:  trunk
changeset: 939020:a297e21b535a
user:      christos <christos%NetBSD.org@localhost>
date:      Wed Sep 23 23:21:29 2020 +0000

description:
Add gdbserver

diffstat:

 tools/gdb/Makefile     |   9 ++++++++-
 tools/gdb/mknative-gdb |  15 ++++++++++++++-
 2 files changed, 22 insertions(+), 2 deletions(-)

diffs (74 lines):

diff -r 6ef72a20e018 -r a297e21b535a tools/gdb/Makefile
--- a/tools/gdb/Makefile        Wed Sep 23 18:48:50 2020 +0000
+++ b/tools/gdb/Makefile        Wed Sep 23 23:21:29 2020 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: Makefile,v 1.38 2019/06/02 23:28:32 christos Exp $
+#      $NetBSD: Makefile,v 1.39 2020/09/23 23:21:29 christos Exp $
 
 .include <bsd.hostinit.mk>
 
@@ -87,6 +87,12 @@
 CONFIGURE_ARGS_SIM+= --disable-sim
 .endif
 
+CONFIGURE_ARGS_GDBSERVER=
+.if \
+    ${MACHINE_CPU} == "x86_64"
+CONFIGURE_ARGS_GDBSERVER+= --enable-gdbserver
+.endif
+
 native-gdb: .native/.configure_done
        @echo 'Extracting GDB configury for a native toolchain.'
        MAKE=${BUILD_MAKE:Q} ${HOST_SH} ${MKNATIVE} gdb \
@@ -101,6 +107,7 @@
                        --prefix=/usr \
                        --with-separate-debug-dir=/usr/libdata/debug \
                        ${CONFIGURE_ARGS_SIM} \
+                       ${CONFIGURE_ARGS_GDBSERVER} \
                        --build=`${GNUHOSTDIST}/config.guess` \
                        --host=${MACHINE_GNU_PLATFORM} \
                        --target=${MACHINE_GNU_PLATFORM})
diff -r 6ef72a20e018 -r a297e21b535a tools/gdb/mknative-gdb
--- a/tools/gdb/mknative-gdb    Wed Sep 23 18:48:50 2020 +0000
+++ b/tools/gdb/mknative-gdb    Wed Sep 23 23:21:29 2020 +0000
@@ -1,5 +1,5 @@
 #!/bin/sh
-#      $NetBSD: mknative-gdb,v 1.12 2020/09/17 16:54:31 christos Exp $
+#      $NetBSD: mknative-gdb,v 1.13 2020/09/23 23:21:29 christos Exp $
 #
 # Shell script for generating all the constants needed for a native
 # platform build of src/external/gpl3/gdb
@@ -151,6 +151,8 @@
        done
 }
 
+##### gdb/lib/libgdb #####
+
 get_gdb_libgdb () {
        local _GDBP=$_GDB/lib/libgdb
 
@@ -212,6 +214,16 @@
        esac
 }
 
+# gdb/bin/gdbserver`
+
+get_gdb_bingdbserver () {
+       local _CTF=$_GDB/bin/gdbserver
+       mkdir -p $_TOP/$_CTF/arch/$_MACHINE_SUBDIR
+
+       write_c $_CTF/arch/$_MACHINE_SUBDIR/config.h \
+               <$_TMPDIR/gdbserver/config.h
+}
+
 ##### main #####
 
 case $1 in
@@ -225,6 +237,7 @@
        get_gdb_libiberty
        get_gdb_libreadline
        get_gdb_libdecnumber
+       get_gdb_bingdbserver
        exit 0
        ;;
 



Home | Main Index | Thread Index | Old Index