Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 18 Oct 2019 14:00:45 +0200
From:      Gary Jennejohn <gljennjohn@gmail.com>
To:        "Hartmann, O." <ohartmann@walstatt.org>
Cc:        Conrad Meyer <cem@FreeBSD.org>, svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org
Subject:   Re: svn commit: r353700 - in head: share/man/man4 sys/amd64/conf sys/conf sys/gdb sys/i386/conf sys/kern sys/net sys/sys
Message-ID:  <20191018140045.31d269b0@ernst.home>
In-Reply-To: <20191018122104.389ffb7a@hermann.fritz.box>
References:  <201910172133.x9HLX1kl071044@repo.freebsd.org> <20191018122104.389ffb7a@hermann.fritz.box>

next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, 18 Oct 2019 12:21:04 +0200
"Hartmann, O." <ohartmann@walstatt.org> wrote:

> On Thu, 17 Oct 2019 21:33:01 +0000 (UTC)
> Conrad Meyer <cem@FreeBSD.org> wrote:
> 
> > Author: cem
> > Date: Thu Oct 17 21:33:01 2019
> > New Revision: 353700
> > URL: https://svnweb.freebsd.org/changeset/base/353700
> > 
> > Log:
> >   Implement NetGDB(4)
> >   
> >   NetGDB(4) is a component of a system using a panic-time network
> > stack to remotely debug crashed FreeBSD kernels over the network,
> > instead of traditional serial interfaces.
> >   
> >   There are three pieces in the complete NetGDB system.
> >   
> >   First, a dedicated proxy server must be running to accept
> > connections from both NetGDB and gdb(1), and pass bidirectional
> > traffic between the two protocols.
> >   
> >   Second, the NetGDB client is activated much like ordinary 'gdb' and
> >   similarly to 'netdump' in ddb(4) after a panic.  Like other
> > debugnet(4) clients (netdump(4)), the network interface on the route
> > to the proxy server must be online and support debugnet(4).
> >   
> >   Finally, the remote (k)gdb(1) uses 'target remote <proxy>:<port>'
> > (like any other TCP remote) to connect to the proxy server.
> >   
> >   The NetGDB v1 protocol speaks the literal GDB remote serial
> > protocol, and uses a 1:1 relationship between GDB packets and
> > sequences of debugnet packets (fragmented by MTU).  There is no
> > encryption utilized to keep debugging sessions private, so this is
> > only appropriate for local segments or trusted networks.
> >   
> >   Submitted by:	John Reimer <john.reimer AT emc.com> (earlier
> > version) Discussed some with:	emaste, markj
> >   Relnotes:	sure
> >   Differential Revision:	https://reviews.freebsd.org/D21568
> > 
> > Added:
> >   head/share/man/man4/netgdb.4   (contents, props changed)
> >   head/sys/gdb/netgdb.c   (contents, props changed)
> >   head/sys/gdb/netgdb.h   (contents, props changed)
> > Modified:
> >   head/share/man/man4/Makefile
> >   head/share/man/man4/ddb.4
> >   head/sys/amd64/conf/GENERIC
> >   head/sys/conf/NOTES
> >   head/sys/conf/files
> >   head/sys/conf/options
> >   head/sys/gdb/gdb.h
> >   head/sys/gdb/gdb_int.h
> >   head/sys/gdb/gdb_main.c
> >   head/sys/gdb/gdb_packet.c
> >   head/sys/i386/conf/GENERIC
> >   head/sys/kern/subr_kdb.c
> >   head/sys/net/debugnet.c
> >   head/sys/net/debugnet.h
> >   head/sys/net/debugnet_inet.c
> >   head/sys/net/debugnet_int.h
> >   head/sys/sys/kdb.h
> >   head/sys/sys/param.h
> > 
> > Modified: head/share/man/man4/Makefile
> > ==============================================================================
> > --- head/share/man/man4/Makefile	Thu Oct 17 21:25:50
> > 2019	(r353699) +++ head/share/man/man4/Makefile	Thu Oct
> > 17 21:33:01 2019	(r353700) @@ -307,6 +307,7 @@ MAN=
> > aac.4 \ net80211.4 \
> >  	netdump.4 \
> >  	netfpga10g_nf10bmac.4 \
> > +	netgdb.4 \
> >  	netgraph.4 \
> >  	netintro.4 \
> >  	netmap.4 \
> >   
> [...]
> 
> 
> Having "nooptions       NETGDB          # netgdb(4) client support"
> defined in my kernel config file, buildkernel fails with the error
> shown below.
> 
> [...]
> --- debugnet.o ---
> /usr/src/sys/net/debugnet.c:662:4: error: implicit declaration of
> function 'db_printf' is invalid in C99
> [-Werror,-Wimplicit-function-declaration] db_printf("%s: Could not get
> route for that server.\n", ^ /usr/src/sys/net/debugnet.c:662:4: note:
> did you mean 'if_printf'? /usr/src/sys/net/if_var.h:679:5: note:
> 'if_printf' declared here int     if_printf(struct ifnet *, const char
> *, ...) __printflike(2, 3); ^
> 1 error generated.

And I also had to add "nooptions NETDUMP" to get the kernel to compile
and link.

-- 
Gary Jennejohn



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20191018140045.31d269b0>