Age | Commit message (Collapse) | Author |
|
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.
|
|
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.
|
|
This is meant to be the same for per-OS configuration as arch_process_data
is for per-arch configuration.
|
|
Export find_dynamic_entry_addr as proc_find_dynamic_entry_addr.
Signed-off-by: Edgar E. Iglesias <edgar@axis.com>
|
|
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.
|
|
Document the interface, refer to this documentation at declarations of
each_* functions.
|
|
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.
|
|
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.
|
|
|
|
- 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
|
|
|
|
- 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.
|
|
|
|
|
|
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.
|
|
|
|
|
|
|
|
|
|
|
|
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.
|
|
- the one outstanding use was a bug, clone_process already adds the process
by the way of process_bare_init
|
|
- 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.
|
|
- ... not int, which is narrower than target_address_t on 64-bit machines
|
|
- use it to determine whether to turn on breakpoints in added libraries
if they were added after _start is hit
|
|
|
|
|
|
... 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.
|
|
- the patch will be sliced later
|
|
|
|
|