plan9port

fork of plan9port with libvec, libstr and libsdb
Log | Files | Refs | README | LICENSE

Notes (2606B)


      1 Changes from the Plan 9 acid (beyond the 
      2 obvious changes necessary to compile without
      3 Ken's compiler and with the new libmach interface).
      4 ========================================
      5 
      6 the input-line print verb is %Z, so that %L can be for locations
      7 
      8 the register block is explicitly "mapped" at 0 by xget1, xget2, ...
      9 	for compatibility with old acid, even though libmach
     10 	doesn't participate in this lie anymore.
     11 
     12 main accepts pid, file, and core in any order
     13 
     14 the ptab only records pids (no ctl fd anymore).
     15 
     16 new builtin sysstop(pid) runs pid until the next syscall
     17 
     18 map() returns 5-tuples: (name, filename, base, end, offset)
     19 	filename is new
     20 
     21 map() expects a 5-tuple too
     22 
     23 new acid maps() prints maps nicely.
     24 
     25 strace expects a list of register names and values like
     26 	{"PC", *PC, "SP", *SP}
     27 
     28 strace returns 5-tuples now:
     29 	{fn, pc, callerpc, paramlist, locallist}
     30 
     31 new builtin includepipe(cmd) includes the standard output
     32 	of running cmd.
     33 
     34 symbols returns 4-tuples now: {name, type, addr, file}
     35 
     36 new builtin textfile() returns the current set of open text files
     37 	as a list of {file, base} pairs.
     38 
     39 new builtin textfile({file, base}) adds a new file's symbols and text
     40 	offset by base for relocatables.
     41 
     42 new builtin deltextfile(file) removes a file from the set of open text files.
     43 
     44 both textfile and deltextfile update symbols.
     45 
     46 new types: register is something that when dereferenced gives you
     47 	the registers.  the Ureg is no longer mapped at 0.
     48 	refconst is something that gives a constant when dereferenced.
     49 
     50 new builtin register("AX") creates register values
     51 new builtin refconst(0x123) creates refconst values
     52 
     53 new builtin var("foo") is equivalent to the variable foo
     54 	(it returns foo but can also be used as the lhs of an assignment).
     55 
     56 new acid function getregs() returns a list of the current values of registers.
     57 new acid function setregs() sets the current registers to those values.
     58 	note that getregs and setregs operate on register locations, not the
     59 		register values themselves.  
     60 new acid function resetregs() sets registers to register("AX"), etc.
     61 new acid function clearregs() sets all registers to constant -1.
     62 
     63 the default register settings are as in resetregs(), not small numbers.
     64 the Ureg is not mapped at 0 anymore.
     65 
     66 new acid variables coretext, pids, systype, corefile, cmdline.
     67 
     68 new behavior: local variable lookup, stk, etc., use the acid values of registers
     69 	(*PC, *SP, and so on), so the thread support code can change the context
     70 	completely.
     71 
     72 unary + is applicable to more data types and prints more often.
     73 
     74 ====
     75 
     76 yet to be done:
     77 
     78 elflink has the linking info for elf on linux
     79