internet and kernel debuging

Pete Delaney - Rocky Mountain UNIX Consultants pete at lvbull.UUCP
Wed Jul 25 00:31:30 AEST 1984


  I've been using a TRACE_PRINTF() in our kernel to trace function data flow.
I has made integration of 4.2bsd networking into V7 somewhat easier.
Expect to use bits of traceing flag to indicate modules of interest.
I have C compiler generate code to index extern $Level on entry of a function 
and --$level on exit.

  The result is a trace indented by subr nesting.  
The Syscall entry is the base.  I use a $Set_Tracing(int tracing_flags)
system call  to turn tracing on a particular proc. Tracing uses a tiny
Dump_Block() function to write, with interupts disabled, to a mag-tape.
I'd be glad to send a example trace, and perhaps the code if anyone 
is interested.

  Interesting interupt/software levels are traced if any proc's are tracing.
All TRACE_PRINTF()'s are on 1 line, so a g/TRACE_PRINTF/d cmd can be used
to remove them.  We run our system with tracing enbeded, with no user 
complaints.  Debuged tftp <---> tdfpd session thru UDP/IP and the routing
and loop-back driver; session was traced running multi-user.  Only the
two process's enabled kernel-tracing.  Only major inconvience is that
printf()'s on stdout are unbuffered, so user printf's are somewhat lengthy.

  I'm interested in hearing about how others debug kernel code.

  Any hackers interested in using ISO transport on X25 in a 4BSD environ.
I've been wondering about adding x25 phone #'s(DTE) to route tables.
This has the advantage that X25 can internet with a LAN. 
Disadvantage is route-table entry is larger, however since a mbuf is used
to hold a route-table entry(RTE),
there should be no actual increase is space used.
Also, since some LAN hosts may not be able to use ARP,
ifconfig cmd could explicity supply the eithernet DTE in the same RTE.
Currenly suggesting that we hack the routing to use ISO/ECMA-92 
0...32 byte variable length addresses.  Also, their may be some additional
socket user request that may be necessary to add.

I see this method to be far superior to our current plain to add X25 and
LAN support on top of V7 via ioctl()'s.  Without standards like 4bsd
we get each group writing code with different interfaces, and more
duplication of functions, etc, etc, etc.


As with many others, the ideas expressed here are not likely to be the same
as those of the group/empire.

					Pete Delaney
					Rocky Mnt. UNIX
					Honeywell BULL, France
					UUCP: mcvax!vmucnam!lvbull!pete
					



More information about the Comp.unix.wizards mailing list