@@ -70,7 +70,7 @@ int wait_for_proc(pid_t pid);
70
70
int task_kill (pid_t pid , int sig );
71
71
72
72
/* Called after PID is attached, but before it is continued. */
73
- void trace_set_options (struct Process * proc );
73
+ void trace_set_options (struct process * proc );
74
74
75
75
/* Called after ltrace forks. Should attach the newly created child,
76
76
* in whose context this function is called. */
@@ -86,7 +86,7 @@ void untrace_pid(pid_t pid);
86
86
/* The back end may need to store arbitrary data to a process. This
87
87
* is a place where it can initialize PROC->arch_dep. XXX this should
88
88
* be dropped in favor of arhc_process_init on pmachata/libs. */
89
- void get_arch_dep (struct Process * proc );
89
+ void get_arch_dep (struct process * proc );
90
90
91
91
/* Return current instruction pointer of PROC.
92
92
*
@@ -95,34 +95,34 @@ void get_arch_dep(struct Process *proc);
95
95
* that would otherwise support this. Above we have a definition of
96
96
* arch_addr_t. This should be converted to an integral type and
97
97
* used for target addresses throughout. */
98
- void * get_instruction_pointer (struct Process * proc );
98
+ void * get_instruction_pointer (struct process * proc );
99
99
100
100
/* Set instruction pointer of PROC to ADDR. XXX see above. */
101
- void set_instruction_pointer (struct Process * proc , void * addr );
101
+ void set_instruction_pointer (struct process * proc , void * addr );
102
102
103
103
/* Return current stack pointer of PROC. XXX see above. */
104
- void * get_stack_pointer (struct Process * proc );
104
+ void * get_stack_pointer (struct process * proc );
105
105
106
106
/* Find and return caller address, i.e. the address where the current
107
107
* function returns. */
108
- void * get_return_addr (struct Process * proc , void * stack_pointer );
108
+ void * get_return_addr (struct process * proc , void * stack_pointer );
109
109
110
110
/* Adjust PROC so that when the current function returns, it returns
111
111
* to ADDR. */
112
- void set_return_addr (struct Process * proc , void * addr );
112
+ void set_return_addr (struct process * proc , void * addr );
113
113
114
114
/* Enable breakpoint SBP in process PROC. */
115
- void enable_breakpoint (struct Process * proc , struct breakpoint * sbp );
115
+ void enable_breakpoint (struct process * proc , struct breakpoint * sbp );
116
116
117
117
/* Disable breakpoint SBP in process PROC. */
118
- void disable_breakpoint (struct Process * proc , struct breakpoint * sbp );
118
+ void disable_breakpoint (struct process * proc , struct breakpoint * sbp );
119
119
120
120
/* Determine whether the event that we have just seen (and that is
121
121
* recorded in STATUS) was a syscall. If it was, return 1. If it was
122
122
* a return from syscall, return 2. In both cases, set *SYSNUM to the
123
123
* number of said syscall. If it wasn't a syscall, return 0. If
124
124
* there was an error, return -1. */
125
- int syscall_p (struct Process * proc , int status , int * sysnum );
125
+ int syscall_p (struct process * proc , int status , int * sysnum );
126
126
127
127
/* Continue execution of the process with given PID. */
128
128
void continue_process (pid_t pid );
@@ -136,17 +136,17 @@ void continue_after_signal(pid_t pid, int signum);
136
136
* is system call, otherwise it's return from a system call. The
137
137
* callback should do whatever book-keeping is necessary and continue
138
138
* the process if necessary. */
139
- void continue_after_syscall (struct Process * proc , int sysnum , int ret_p );
139
+ void continue_after_syscall (struct process * proc , int sysnum , int ret_p );
140
140
141
141
/* Called after we hit a breakpoint SBP. Should do whatever
142
142
* book-keeping is necessary and then continue the process. */
143
- void continue_after_breakpoint (struct Process * proc , struct breakpoint * sbp );
143
+ void continue_after_breakpoint (struct process * proc , struct breakpoint * sbp );
144
144
145
145
/* Called after we received a vfork. Should do whatever book-keeping
146
146
* is necessary and continue the process if necessary. N.B. right
147
147
* now, with Linux/GNU the only back end, this is not necessary. I
148
148
* imagine other systems may be different. */
149
- void continue_after_vfork (struct Process * proc );
149
+ void continue_after_vfork (struct process * proc );
150
150
151
151
/* Called when trace_me or primary trace_pid fail. This may plug in
152
152
* any platform-specific knowledge of why it could be so. */
@@ -171,14 +171,14 @@ void os_ltrace_exiting(void);
171
171
172
172
/* Should copy COUNT bytes from address ADDR of process PROC to local
173
173
* buffer BUF. */
174
- size_t umovebytes (struct Process * proc , void * addr , void * buf , size_t count );
174
+ size_t umovebytes (struct process * proc , void * addr , void * buf , size_t count );
175
175
176
176
/* Find out an address of symbol SYM in process PROC, and return.
177
177
* Returning NULL delays breakpoint insertion and enables heaps of
178
178
* arch-specific black magic that we should clean up some day.
179
179
*
180
180
* XXX the same points as for get_instruction_pointer apply. */
181
- void * sym2addr (struct Process * proc , struct library_symbol * sym );
181
+ void * sym2addr (struct process * proc , struct library_symbol * sym );
182
182
183
183
/* Obtain address of PLT entry corresponding to relocation RELA in
184
184
* file LTE. This is NDX-th PLT entry in the file.
@@ -189,7 +189,7 @@ GElf_Addr arch_plt_sym_val(struct ltelf *lte, size_t ndx, GElf_Rela *rela);
189
189
/* Called at some point after we have attached to PROC. This callback
190
190
* should insert an introspection breakpoint for handling dynamic
191
191
* linker library loads. */
192
- int linkmap_init (struct Process * proc , arch_addr_t dyn_addr );
192
+ int linkmap_init (struct process * proc , arch_addr_t dyn_addr );
193
193
194
194
/* This should produce and return the next event of one of the traced
195
195
* processes. The returned pointer will not be freed by the core and
@@ -198,14 +198,14 @@ int linkmap_init(struct Process *proc, arch_addr_t dyn_addr);
198
198
struct Event * next_event (void );
199
199
200
200
/* Called when process PROC was removed. */
201
- void process_removed (struct Process * proc );
201
+ void process_removed (struct process * proc );
202
202
203
203
/* This should extract entry point address and interpreter (dynamic
204
204
* linker) bias if possible. Returns 0 if there were no errors, -1
205
205
* otherwise. Sets *ENTRYP and *INTERP_BIASP to non-zero values if
206
206
* the corresponding value is known, or zero otherwise; this is not
207
207
* done for pointers that are NULL. */
208
- int process_get_entry (struct Process * proc ,
208
+ int process_get_entry (struct process * proc ,
209
209
arch_addr_t * entryp ,
210
210
arch_addr_t * interp_biasp );
211
211
@@ -232,7 +232,7 @@ void arch_elf_destroy(struct ltelf *lte);
232
232
* destroy, and clone SBP->arch. arch_breakpoint_init and
233
233
* arch_breakpoint_clone return 0 on success or a negative value on
234
234
* failure. */
235
- int arch_breakpoint_init (struct Process * proc , struct breakpoint * sbp );
235
+ int arch_breakpoint_init (struct process * proc , struct breakpoint * sbp );
236
236
void arch_breakpoint_destroy (struct breakpoint * sbp );
237
237
int arch_breakpoint_clone (struct breakpoint * retp , struct breakpoint * sbp );
238
238
@@ -259,19 +259,19 @@ int arch_library_symbol_clone(struct library_symbol *retp,
259
259
* PROC->arch in case that PROC underwent an exec. See notes at
260
260
* process_init, process_destroy, process_clone and process_exec in
261
261
* proc.h. */
262
- int arch_process_init (struct Process * proc );
263
- void arch_process_destroy (struct Process * proc );
264
- int arch_process_clone (struct Process * retp , struct Process * proc );
265
- int arch_process_exec (struct Process * proc );
262
+ int arch_process_init (struct process * proc );
263
+ void arch_process_destroy (struct process * proc );
264
+ int arch_process_clone (struct process * retp , struct process * proc );
265
+ int arch_process_exec (struct process * proc );
266
266
267
267
/* The following callbacks have to be implemented in OS backend if
268
268
* os.h defines OS_HAVE_PROCESS_DATA. The protocol is same as for,
269
269
* respectively, arch_process_init, arch_process_destroy,
270
270
* arch_process_clone and arch_process_exec. */
271
- int os_process_init (struct Process * proc );
272
- void os_process_destroy (struct Process * proc );
273
- int os_process_clone (struct Process * retp , struct Process * proc );
274
- int os_process_exec (struct Process * proc );
271
+ int os_process_init (struct process * proc );
272
+ void os_process_destroy (struct process * proc );
273
+ int os_process_clone (struct process * retp , struct process * proc );
274
+ int os_process_exec (struct process * proc );
275
275
276
276
/* The following callback has to be implemented in backend if arch.h
277
277
* defines ARCH_HAVE_GET_SYM_INFO.
@@ -306,18 +306,18 @@ enum plt_status {
306
306
* calling arch_plt_sym_val, and symbol is allocated. If plt_ok or
307
307
* plt_default are returned, the chain of symbols passed back in RET
308
308
* is added to library under construction. */
309
- enum plt_status arch_elf_add_plt_entry (struct Process * proc , struct ltelf * lte ,
309
+ enum plt_status arch_elf_add_plt_entry (struct process * proc , struct ltelf * lte ,
310
310
const char * name , GElf_Rela * rela ,
311
311
size_t i , struct library_symbol * * ret );
312
312
313
313
/* This callback needs to be implemented if arch.h defines
314
314
* ARCH_HAVE_DYNLINK_DONE. It is called after the dynamic linker is
315
315
* done with the process startup. */
316
- void arch_dynlink_done (struct Process * proc );
316
+ void arch_dynlink_done (struct process * proc );
317
317
318
318
/* This callback needs to be implemented if arch.h defines
319
319
* ARCH_HAVE_SYMBOL_RET. It is called after a traced call returns. */
320
- void arch_symbol_ret (struct Process * proc , struct library_symbol * libsym );
320
+ void arch_symbol_ret (struct process * proc , struct library_symbol * libsym );
321
321
322
322
323
323
/* This callback needs to be implemented if arch.h defines
@@ -327,7 +327,7 @@ void arch_symbol_ret(struct Process *proc, struct library_symbol *libsym);
327
327
* DYN_ADDR holds the address of the dynamic section.
328
328
* If the debug area is found, return 0 and fill in the address in *RET.
329
329
* If the debug area is not found, return a negative value. */
330
- int arch_find_dl_debug (struct Process * proc , arch_addr_t dyn_addr ,
330
+ int arch_find_dl_debug (struct process * proc , arch_addr_t dyn_addr ,
331
331
arch_addr_t * ret );
332
332
333
333
/* If arch.h defines ARCH_HAVE_FETCH_ARG, the following callbacks have
0 commit comments