TODO revision 9daea45bcf7ea43798c2204cc5341cfa27f65468
1-*-org-*- 2* TODO 3** Automatic prototype discovery: 4*** Use debuginfo if available 5 Alternatively, use debuginfo to generate configure file. 6*** Demangled identifiers contain partial prototypes themselves 7** Automatically update list of syscalls? 8** Improve documentation 9*** Describe syntax of config files 10** Update /etc/ltrace.conf 11 In particular, we could use a config directory, where packages 12 would install their ltrace config scripts. The config file could 13 be named after SONAME, and automatically read when corresponding 14 library is mapped. 15** More operating systems (solaris?) 16** Get rid of EVENT_ARCH_SYSCALL and EVENT_ARCH_SYSRET 17** Implement displaced tracing 18 A technique used in GDB (and in uprobes, I believe), whereby the 19 instruction under breakpoint is moved somewhere else, and followed 20 by a jump back to original place. When the breakpoint hits, the IP 21 is moved to the displaced instruction, and the process is 22 continued. We avoid all the fuss with singlestepping and 23 reenablement. 24** Create different ltrace processes to trace different children 25** Config file syntax 26*** typedef should be able to assign a lens to a name 27*** format should take arguments like string does 28** More fine-tuned control of right arguments 29 Combination of named arguments and some extensions could take care 30 of that: 31 32 | void func(X=hide(int*), long*, +pack(X)); | 33 34 This would show long* as input argument (i.e. the function could 35 mangle it), and later show the pre-fetched X. The "pack" syntax is 36 utterly undeveloped as of now. The general idea is to produce 37 arguments that expand to some mix of types and values. But maybe 38 all we need is something like 39 40 | void func(out int*, long*); | 41 42 ltrace would know that out/inout/in arguments are given in the 43 right order, but left pass should display in and inout arguments 44 only, and right pass then out and inout. + would be 45 backward-compatible syntactic sugar, expanded like so: 46 47 | void func(int*, int*, +long*, long*); | 48 | void func(in int*, in int*, out long*, out long*); | 49 50 But sometimes we may want to see a different type on the way in and 51 on the way out. E.g. in asprintf, what's interesting on the way in 52 is the address, but on the way out we want to see buffer contents. 53 Does something like the following make sense? 54 55 | void func(X=void*, long*, out string(X)); | 56 57* BUGS 58** After a clone(), syscalls may be seen as sysrets in s390 (see trace.c:syscall_p()) 59