Date: Mon, 29 Nov 2004 22:01:17 -0500 From: Ken Smith <kensmith@cse.Buffalo.EDU> To: freebsd-stable@freebsd.org Subject: Re: Need source to TCP/IP 'connect()' Message-ID: <20041130030117.GB390@electra.cse.Buffalo.EDU> In-Reply-To: <20041130024858.GA16962@squash.dsto.defence.gov.au> References: <62A29338972397468405C79C4FE13C3B013DDDD4@ex1.messagegate.local> <20041130023542.GA390@electra.cse.Buffalo.EDU> <20041130024858.GA16962@squash.dsto.defence.gov.au>
next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, Nov 30, 2004 at 01:18:58PM +1030, Wilkinson, Alex wrote: > 0n Mon, Nov 29, 2004 at 09:35:42PM -0500, Ken Smith wrote: > > > When 'fishing' for stuff in the kernel source code I find the tags > > files kind of useful. In a kernel build directory (e.g. I usually > > use src/sys/i386/compile/GENERIC on a 5.X machine, after config-ing > > GENERIC) after doing a 'make depend' you can do 'make tags'. It > > will usually fail once it starts to process the modules because it > > can't find 'gtags' but by then it's already built what is most useful. > > > > Once the tags file is built in the kernel build directory you can > > do something like: > > > > vi -t connect > > > > and it will start up vi with the cursor at the beginning of that > > function. It's not perfect (sometimes it can't find a function) > > but for the most part it works OK. > > > > In this case it found connect() in /usr/src/sys/kern/uipc_syscalls.c > > (I was using a RELENG_5 source tree). > > This looks useful, however, even after a buildkernel all I have > is a CVS dir in /usr/src/sys/i386/compile/. > > Did u mean /usr/obj/usr/src/sys/GENERIC ? > > When u say "config-ing", do u mean running config(8) manually ? I haven't tried using the results of a 'make buildkernel' to do this, it might not work. There is all sorts of magic stuff going on that places the results of 'make buildworld/buildkernel' in /usr/obj. Assuming a 5.X based i386 system I would do this: cd /usr/src/sys/i386/conf config GENERIC cd ../compile/GENERIC make depend make tags vi -t connect The same basic thing works on 4.X systems but the pathnames are a tiny bit different (mostly just "cd ../../compile/GENERIC" instead). -- Ken Smith - From there to here, from here to | kensmith@cse.buffalo.edu there, funny things are everywhere. | - Theodore Geisel |
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20041130030117.GB390>