From jimm@cloyd Mon Dec 14 12:25:24 1987
Return-Path: <jimm@cloyd>
Received: from cloyd.amiga.uucp by tooter.amiga.uucp (1.1/SMI-3.0DEV3)
	id AA00169; Mon, 14 Dec 87 12:25:19 PST
Received: by cloyd.amiga.uucp (1.1/SMI-3.0DEV3)
	id AA00200; Sat, 14 Dec 85 12:26:30 PST
Date: Sat, 14 Dec 85 12:26:30 PST
From: jimm@cloyd (Jim Mackraz)
Message-Id: <8512142026.AA00200@cloyd.amiga.uucp>
To: bart@cloyd, cbmvax!andy, cbmvax!daveb, cbmvax!eric, cbmvax!steveb,
        dale@cloyd, kodiak@cloyd
Subject: Wack notes (and I have source)
Status: RO

Here are some old notes on new wack.  Dig it.


i have a good working wack for our use.  it can be found named 'a' in
homer:/usr2/jimm/Wack.  Run it, type '!' or 'newhelp' to get a command
summary.  i put it in my bin as 'wack' so my scripts jwack, dwack, and
swack (also in ~/bin) work.  these scripts are user for wacking the .ld
downloaded from the current directory, wacking a .ld file downloaded
from .../roms, and wacking a .ld from a kickstart.  see the download
scripts jram and dram (by the way, 'd' is for dale, and 'j' is for jimm).

you'll note that i didn't dump too much of GfxBase, but i put in enough
example fields that you'll be able to figure out how to add more,
to suit.  I am tempted to put in several different 'ibase' commands to
show different parts of my base.  maybe you want to write a copper
list disassembler.

to enhance this stuff yourself, see the files showi.c, showlock.c,
and showg.c (the last is "show graphics").  new symbols are bound in
initial.c, and besides some new stuff in special.c/h that is about all
i added along these lines.

i also put in a fancy 'find' facility.  you set a limit and then search
for a pattern from the current position (plus/minus one word) to that
limit.  your current position doesn't move if no match is found.  the
length of the pattern is either 2 or 4 bytes, determined only by the presence
of stuff in the high-order word.  enhancement can come later.  this stuff
is in find.c.

you can type 'limit' to set the limit to the current position, or
(limit 1cee5) to set the limit to 1cee5.  you can type (find f2) to
search for 00f2, or just 'find' (or just '/') to search for the
last used pattern.  there is no "don't care" capability in the pattern yet.

you can also type (stacklimit <task>), supplying a task address (or just
'stacklimit' if current position is a task) to set the limit to the top
of the stack, and the current position to the stack pointer.  'sl' is
a synonym for 'stacklimit.'

to search the stack of the input device (at 27fa) for intuition loaded
at f20000, you would type
tasks		--	see that input.device = 27fa
(sl 27fa)	--	sets limit and current position for i.d stack
(find f2)	--	finds first 00f2.
/		--	repeats search from new position.

note that neil thinks that rather than going too far with our own wack,
we should port debug to the sun and use its macros.  my position is that
porting to the sun is likely non-trivial, and that in C i use symbols,
particularly structure field offsets frequently.  he is tolerant, but
nervous about a lot of wacks running around.

by the way, while working on this i used dbx to debug wack, but the 
recursive nature of doing so made me ill-at-ease.

		yrs, jimm

ps: didn't actually use this to find any deadlocks, yet.


