How do you read symbols in /dev/kmem when nlist won't work

tony cooper name at portiaStanford.EDU
Wed Jun 6 10:39:47 AEST 1990


nlist is declared in A/UX starting as:

struct  nlist { /* symbol table entry */
	char    n_name[8];      /* symbol name */

Well n_name is restricted to 8 bytes so names must be 7 bytes long or less.
So how do you read sysmbols that are longer than 7 characters? There are
plenty of symbols that are longer. Most other UNIXs declare char *n_name so
they don't have this problem.

The only source code example I have is xload. But it reads the symbol avenrun
which is 7 characters. Other A/UX programs can read longer sysmbols eg netstat
reads symbols longer than 7 such as icmpstat and rthashsize. (But most
symbol reading programs read short symbols only).

Any ideas?

Tony Cooper
tony at popserver.stanford.edu



More information about the Comp.unix.aux mailing list