When searching lately a lot through the UNIX 2.11bsd source code I
wanted many times a hyperlinked and cross referenced rendition of the
sources, much like doxygen or lxr does it. For kernel, lib and user
code, for c and assembler.
Since none of the existing tools seemed to do what I wanted, I wrote
a perl script generating such a html'ized version of the source code.
The tool far from finished, but might already be useful. For a tour
start for example with the code of the 'cp' command
http://www-linux.gsi.de/~mueller/test/211bsd/usr/src/bin/cp.c.html
and click along. The links connect C and asm code, the user land code,
libc and kernel code. Look to the readdir() call in line 197, a click
gets you into the libc module implementing readdir(). A further click
on read() into the assembler stub doing the system call, and a click
on the kernel handler listed there gets you into the kernel source.
Here the links of the tour
http://www-linux.gsi.de/~mueller/test/211bsd/usr/src/bin/cp.c.html#n:197
http://www-linux.gsi.de/~mueller/test/211bsd/usr/src/lib/libc/gen/readdir.c…
http://www-linux.gsi.de/~mueller/test/211bsd/usr/src/lib/libc/pdp/sys/__rea…
http://www-linux.gsi.de/~mueller/test/211bsd/usr/src/sys/sys/sys_generic.c.…
The background color tells you in which territory you are in
magenta boot and standalone code
red kernel
orange network code (running in supervisor)
green libraries
blue user level code
If you want a kernel tour, start at
http://www-linux.gsi.de/~mueller/test/211bsd/usr/src/sys/sys/init_main.c.ht…
Clicking on a symbol definition (or the X in the sidebar) gets you to the
cross referencing info's. To see for example who is using setjmp see
http://www-linux.gsi.de/~mueller/test/211bsd/usr/src/lib/libc/pdp/gen/setjm…
or who is including nlist.h see
http://www-linux.gsi.de/~mueller/test/211bsd/usr/include/nlist.h.html#xref:…
As said, it's beta stage, the style sheet is still the debug version,
not all links end where they should, not all is parsed as it should.
Hope you enjoy it. Comments, suggestion ect are very welcome.
With best regards,
Walter
--
Dr. Walter F.J. M?ller Mail: W.F.J.Mueller at gsi.de
GSI, Abteilung KP3 Phone: +49-6159-71-2766
D-64291 Darmstadt FAX: +49-6159-71-3762
URL:
http://www-linux.gsi.de/~mueller/