aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/acid/Notes
blob: 90cfc2a5c1e3cf75d632b940a809ffdb3703f612 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
Changes from the Plan 9 acid (beyond the 
obvious changes necessary to compile without
Ken's compiler and with the new libmach interface).
========================================

the input-line print verb is %Z, so that %L can be for locations

the register block is explicitly "mapped" at 0 by xget1, xget2, ...
	for compatibility with old acid, even though libmach
	doesn't participate in this lie anymore.

main accepts pid, file, and core in any order

the ptab only records pids (no ctl fd anymore).

new builtin sysstop(pid) runs pid until the next syscall

map() returns 5-tuples: (name, filename, base, end, offset)
	filename is new

map() expects a 5-tuple too

new acid maps() prints maps nicely.

strace expects a list of register names and values like
	{"PC", *PC, "SP", *SP}

strace returns 5-tuples now:
	{fn, pc, callerpc, paramlist, locallist}

new builtin includepipe(cmd) includes the standard output
	of running cmd.

symbols returns 4-tuples now: {name, type, addr, file}

new builtin textfile() returns the current set of open text files
	as a list of {file, base} pairs.

new builtin textfile({file, base}) adds a new file's symbols and text
	offset by base for relocatables.

new builtin deltextfile(file) removes a file from the set of open text files.

both textfile and deltextfile update symbols.

new types: register is something that when dereferenced gives you
	the registers.  the Ureg is no longer mapped at 0.
	refconst is something that gives a constant when dereferenced.

new builtin register("AX") creates register values
new builtin refconst(0x123) creates refconst values

new builtin var("foo") is equivalent to the variable foo
	(it returns foo but can also be used as the lhs of an assignment).

new acid function getregs() returns a list of the current values of registers.
new acid function setregs() sets the current registers to those values.
	note that getregs and setregs operate on register locations, not the
		register values themselves.  
new acid function resetregs() sets registers to register("AX"), etc.
new acid function clearregs() sets all registers to constant -1.

the default register settings are as in resetregs(), not small numbers.
the Ureg is not mapped at 0 anymore.

new acid variables coretext, pids, systype, corefile, cmdline.

new behavior: local variable lookup, stk, etc., use the acid values of registers
	(*PC, *SP, and so on), so the thread support code can change the context
	completely.

unary + is applicable to more data types and prints more often.

====

yet to be done:

elflink has the linking info for elf on linux