3 attachargs, attachcore, attachdynamic, attachproc, proctextfile \- debugging processes and core files
11 .ta +\w'\fLextern 'u +\w'\fLchar *'u
13 int attachcore(Fhdr *hdr)
16 int attachproc(int pid)
19 int attachdynamic(void)
22 char* proctextfile(int pid)
25 int attachargs(int argc, char **argv, int omode)
32 extern Fhdr* fhdrlist;
43 These routines provide access to the objects
44 a typical debugger manipulates: an executable binary,
45 some number of shared libraries, a memory image
46 in the form of a core dump or active process,
49 The maintained state is:
52 The file header for the main binary.
55 The file name of the main binary.
58 The memory map of the main binary.
61 A linked list (via the
63 fields) of all currently open headers
68 When dynamically linked objects have been attached,
69 they are present in this linked list,
70 and therefore included in searches by
79 The file header for the core dump, if any.
82 The file name of the core dump, if any.
85 The memory map of the core dump or attached process.
88 The process id of the attached process, if any.
91 The register set of the core dump or attached process.
93 If these fields are not valid, they are zeroed.
98 attach to an opened core file or an executing process.
108 returns the name of the main binary for the process with id
112 requires that the memory image already be attached.
113 It reads the dynamic linker's internal run-time data structures
114 and then opens all the dynamic objects that are currently
118 uses all of these functions while
119 parsing an argument vector as would be passed to
124 It expects a list of executable files, core dump files, or process ids,
126 If extra arguments are given (for example, more than one executable, or both
127 a core dump and a process id), they are ignored and diagnostics are printed to
129 If arguments are missing (for example, the process id is given without an
132 fills them in as best it can.
134 .B /usr/local/plan9/src/libmach
140 The interface needs to be changed to support
141 multiple threads, each with its own register set.