diff options
author | Petr Machata <pmachata@redhat.com> | 2012-01-07 03:41:36 +0100 |
---|---|---|
committer | Petr Machata <pmachata@redhat.com> | 2012-08-29 19:02:07 +0200 |
commit | 642626096a694c6af279d25d2b1b2fba5b10ddfb (patch) | |
tree | 09bdd3219602049e767831d6370beb9b677aeda0 /common.h | |
parent | cd972587a4c0d14d764b3d0a43d75f5941db14cc (diff) | |
download | ltrace-642626096a694c6af279d25d2b1b2fba5b10ddfb.tar.gz |
Add backend.h for backend interfaces
Diffstat (limited to 'common.h')
-rw-r--r-- | common.h | 93 |
1 files changed, 0 insertions, 93 deletions
@@ -96,96 +96,6 @@ extern void show_summary(void); struct breakpoint; struct library_symbol; -struct breakpoint; - -/* Arch-dependent stuff: */ -extern char * pid2name(pid_t pid); -extern pid_t process_leader(pid_t pid); -extern int process_tasks(pid_t pid, pid_t **ret_tasks, size_t *ret_n); -extern int process_stopped(pid_t pid); -extern enum process_status process_status(pid_t pid); -extern void trace_set_options(struct Process *proc); -extern int wait_for_proc(pid_t pid); -extern void trace_me(void); -extern int trace_pid(pid_t pid); -extern void untrace_pid(pid_t pid); -extern void get_arch_dep(Process * proc); -extern void * get_instruction_pointer(Process * proc); -extern void set_instruction_pointer(Process * proc, void * addr); -extern void * get_stack_pointer(Process * proc); -extern void * get_return_addr(Process * proc, void * stack_pointer); -extern void set_return_addr(Process * proc, void * addr); -extern void enable_breakpoint(struct Process *proc, struct breakpoint *sbp); -extern void disable_breakpoint(struct Process *proc, struct breakpoint *sbp); -extern int syscall_p(Process * proc, int status, int * sysnum); -extern void continue_process(pid_t pid); -extern void continue_after_signal(pid_t pid, int signum); -extern void continue_after_syscall(Process *proc, int sysnum, int ret_p); -extern void continue_after_breakpoint(struct Process *proc, struct breakpoint *sbp); -extern void continue_after_vfork(Process * proc); -extern size_t umovebytes (Process *proc, void * addr, void * laddr, size_t count); -extern int ffcheck(void * maddr); -extern void * sym2addr(Process *, struct library_symbol *); -extern int linkmap_init(struct Process *proc, void *dyn_addr); -extern void arch_check_dbg(Process *proc); -extern int task_kill (pid_t pid, int sig); - -/* Called when trace_me or primary trace_pid fail. This may plug in - * any platform-specific knowledge of why it could be so. */ -void trace_fail_warning(pid_t pid); - -/* A pair of functions called to initiate a detachment request when - * ltrace is about to exit. Their job is to undo any effects that - * tracing had and eventually detach process, perhaps by way of - * installing a process handler. - * - * OS_LTRACE_EXITING_SIGHANDLER is called from a signal handler - * context right after the signal was captured. It returns 1 if the - * request was handled or 0 if it wasn't. - * - * If the call to OS_LTRACE_EXITING_SIGHANDLER didn't handle the - * request, OS_LTRACE_EXITING is called when the next event is - * generated. Therefore it's called in "safe" context, without - * re-entrancy concerns, but it's only called after an event is - * generated. */ -int os_ltrace_exiting_sighandler(void); -void os_ltrace_exiting(void); - -int arch_elf_init(struct ltelf *lte, struct library *lib); -void arch_elf_destroy(struct ltelf *lte); - -enum plt_status { - plt_fail, - plt_ok, - plt_default, -}; - -enum plt_status arch_elf_add_plt_entry(struct Process *p, struct ltelf *l, - const char *n, GElf_Rela *r, size_t i, - struct library_symbol **ret); - -int arch_breakpoint_init(struct Process *proc, struct breakpoint *sbp); -void arch_breakpoint_destroy(struct breakpoint *sbp); -int arch_breakpoint_clone(struct breakpoint *retp, struct breakpoint *sbp); - -void arch_library_init(struct library *lib); -void arch_library_destroy(struct library *lib); -void arch_library_clone(struct library *retp, struct library *lib); - -int arch_library_symbol_init(struct library_symbol *libsym); -void arch_library_symbol_destroy(struct library_symbol *libsym); -int arch_library_symbol_clone(struct library_symbol *retp, - struct library_symbol *libsym); - -int arch_process_init(struct Process *proc); -void arch_process_destroy(struct Process *proc); -int arch_process_clone(struct Process *retp, struct Process *proc); -int arch_process_exec(struct Process *proc); - -/* This is called after the dynamic linker is done with the - * process startup. */ -void arch_dynlink_done(struct Process *proc); - /* Format VALUE into STREAM. The dictionary of all arguments is given * for purposes of evaluating array lengths and other dynamic * expressions. Returns number of characters outputted, -1 in case of @@ -193,7 +103,4 @@ void arch_dynlink_done(struct Process *proc); int format_argument(FILE *stream, struct value *value, struct value_dict *arguments); -/* Called when process PROC was removed. */ -void process_removed(struct Process *proc); - #endif |