Stack has a built-in list of associations between dis directories and their associated source directories (e.g. it can automatically map from /dis/ls.dis to /appl/cmd/ls.sbl). Giving the -p option adds a new association to the head of this list: if a module path prefix matches dispath, stack will search for a symbol file in sblpath. If the environment variable $sblpath is set, pairs of items from it are added to the association list, as given as -p options. The -p options take precedence over $sblpath.
Stackv recursively traverses the symbols it finds, printing values as it goes. Repeated identical structure is not shown - only the pointer value is printed, followed by (qv). Each argument gives a starting point for the traversal, rooted by a process id, pid. If an unadorned process id is given, all values in all stack frames in the process will be printed; adding names specifies the starting point. For instance, 123.init.ctxt.display might specify the display field inside the ctxt adt inside the init function inside the process 123. Stackv understands the following options:
$ stack 1 unknown fn() Module $Sys PC 742103 waitfor() shnew.b:105.7, 38 runpipeline() shnew.b:483.2, 14 runit() shnew.b:552.3, 29 init() shnew.b:83.3, 28
The process is executing in the Sys module, a call to sys->read that originated at line 105 (characters 7 to 38) of the waitfor function in shnew.b.
Once again, with the -v option to reveal more:
$ stack -v 1 unknown fn() Module $Sys PC 742103 waitfor(pid=18) shnew.b:105.7, 38 status= "" buf= @b419a4 n=-1 who=-1 runpipeline(ctx=nil, pipeline=@b41454) shnew.b:483.2, 14 pid=18 runit(ctx=nil, pipes=nil) shnew.b:552.3, 29 pipeline=@b41454 init(ctxt=nil, argv=nil) shnew.b:83.3, 28 buf= @b40f04 n=4 arg=@b41634 prompt= "$ " $
|STACK(1 )||Rev: Tue Mar 31 02:42:38 GMT 2015|