aboutsummaryrefslogtreecommitdiff
path: root/proc.h
AgeCommit message (Collapse)Author
2012-10-27Add proc_find_symbol, use it to find corresponding symbols for clonesPetr Machata
The code in breakpoint_clone was buggy--it looked through old_proc's symbols. It was also needlessly verbose, proc_find_symbol uses library key to find the right library. Instead use the new interface and call it on new_proc to find the new symbol. We also didn't relink symbols in stack elements of a cloned process in process_clone. Use proc_find_symbol for this as well.
2012-10-26Use os_process_data for keeping debug statusPetr Machata
This also takes care of a leak caused by malloc'ing struct debug. That malloc is not done anymore, because the data is embedded in struct Process by way of struct os_process_data.
2012-10-26Add os_process_data and relatedPetr Machata
This is meant to be the same for per-OS configuration as arch_process_data is for per-arch configuration.
2012-10-15Export find_dynamic_entry_addrEdgar E. Iglesias
Export find_dynamic_entry_addr as proc_find_dynamic_entry_addr. Signed-off-by: Edgar E. Iglesias <edgar@axis.com>
2012-10-01Support latent and delayed symbolsPetr Machata
Neither latent, nor delayed symbols are given a breakpoint. The difference is in who's responsible for the state. Latent symbols are (will be) used by ltrace core. Delayed symbols are used by backends. Only when both of these flags are cleared is a breakpoint enabled for the symbol.
2012-09-25Extract enum callback_status to a separate modulePetr Machata
Document the interface, refer to this documentation at declarations of each_* functions.
2012-08-29Track elf class in struct ProcessPetr Machata
Technically only s390 needs this at the moment, but it seems general enough that it should be alongside the e_machine flag. Eventually it is desirable to replace both fields with either a backend-provided ABI enum, or with an ABI object that would implement the interesting back end calls.
2012-08-29Move target_address_t to arch.h, rename to arch_addr_tPetr Machata
Note that the placement under arch.h is currently conceptual only. Since no backend defines ARCH_HAVE_ADDRESS_TYPES, it's actually in sysdep.h in all cases.
2012-08-29Fix compilationPetr Machata
2012-08-29Add fetch.c/fetch.h, a module for fetching function argumentsPetr Machata
- this is now a thin wrapper over gimme_arg, ideally the backends will eventually use this right interface - in display_args.c, strip one layer of pointer wrapping, which is now done in output.c
2012-08-29Drop unused interfaces save_register_args, struct stack_element.arch_ptrPetr Machata
2012-08-29Add expr.c, expr.h, plug in properlyPetr Machata
- in callstack_pop, we don't free arch_ptr. That's because this doesn't get copied over the clone. It's a mere coincidence that fork() doesn't need to save register arguments, and this works. - added copyright notices to files that this touches. This is based on git blame. Only contributors of 10+ lines are added - test suite adjusted to not include "void" type as "don't show this int". Back ends in general need to know the exact type, so this never worked anyway.
2012-08-29Add missed header for struct timevalAndrey Zonov
2012-05-18Add missing include config.h to proc.hPetr Machata
2012-04-24Fix double frees, remove_process now releases memoryPetr Machata
Presence in singly-linked list strongly indicates that process is heap allocated, and that if we are about to stop tracing it, we should also reclaim the memory.
2012-04-19Implement proc_remove_breakpointPetr Machata
2012-04-19Add arch_process arch hooks for per-arch struct Process customizationPetr Machata
2012-04-19Fixes for tracing across execPetr Machata
2012-04-19Drop parameters that determined whether breakpoints should be enabledPetr Machata
2012-04-19Fix breakpoint cloningPetr Machata
2012-04-19Drop process.fixed_libs, enable breakpoints right awayPetr Machata
The theory behing fixed_libs was broken from the beginning, we can't tell dlopened libraries from fixed ones when attaching. We also don't need to wait for _start to enable breakpoints. We may need this on LS_TOPLT_POINT architectures, but that was added for PPC, and PPC doesn't need it anymore.
2012-04-19Hide unused add_processPetr Machata
- the one outstanding use was a bug, clone_process already adds the process by the way of process_bare_init
2012-04-19Drop debug_state from struc process, use custom process.debug for thatPetr Machata
- ideally we would define arch_proc_data in sysdeps/linux-gnu/os.h or some such, same as we do with arch_breakpoint_data and others, but that's currently not implemented, so do it this way.
2012-04-19Address hashing and comparison functions need to work with target_address_tPetr Machata
- ... not int, which is narrower than target_address_t on 64-bit machines
2012-04-19Add proc.fixed_libsPetr Machata
- use it to determine whether to turn on breakpoints in added libraries if they were added after _start is hit
2012-04-19Shuffle breakpoint functions aroundPetr Machata
2012-04-19Add CBS_FAIL to enum callback_statusPetr Machata
2012-04-19Change iterators each_task, each_process, library_each_symbolPetr Machata
... now the restarts are supported by start_after instead of start. Otherwise the restart scenario was something like: for (it *sym = NULL; (sym = next(sym)) != NULL; ) if ((sym = sym->next) == NULL) break; which just seems too convoluted.
2012-04-19The first crude version of tracing across librariesPetr Machata
- the patch will be sliced later
2012-04-19Move the Process typedef to proc.hPetr Machata
2012-04-19Move process-related functions and structures to proc.hPetr Machata