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.
|
|
|
|
From my conversation with Petr Machata:
>>> [ breakpoints.c ]
>>>
>>> MIPS arch has no own "breakpoints.c".
>>> IIRC sth, was wrong with "list_of_symbols" in
>>> enable_all_breakpoints()... "Process" has no member "list_of_symbols",
>>> so cut off the mips-ifdef part.
>>> Just testing compiles or not.
>>
>> Cutting this actually seems reasonable. There was a similar ifdef for
>> PPC, and that is now gone as well (and PPC works fine). I believe
>> ltrace now handles delaying breakpoint enablement.
>>
>>> [ handle_event.c ]
>>>
>>> Same as for breakpoints.c cut off the mips-ifdef, seen
>>> "list_of_symbols" errors in handle_breakpoint().
>>
>> Hmm, that seems like an implementation of the delayed start. I think
>> this can be removed as well, with the same rationale as above.
These two should probably be in a patch by themselves.
Signed-off-by: Sedat Dilek <sedat.dilek@gmail.com>
|
|
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.
|
|
|
|
|
|
|
|
The former is called when ltelf is available. The latter in dynamic context
when ltelf is not necessary anymore (or if the data is necessary, it will
have been copied out to struct library).
|
|
error is not standard so it has no business being used in generic code.
The linux-gnu back end is useful for android, and that doesn't have that
interface either.
|
|
|
|
|
|
(Which may actually hold sometimes, but generally won't.)
|
|
|
|
|
|
That line was commited by mistake.
|
|
|
|
|
|
|
|
|
|
Unless until it turns out it's really needed, in which case drop the
arch_breakpoint_data customization and convert current uses to the
OO model.
|
|
This assumed that the process where this breakpoint is added can also be
used to turn the breakpoint on and off. That's not true, leader is not
always stopped when we need it. But when we need to turn a breakpoint on
or off, we are doing so in response to an event, and thus do have a stopped
process in hands. Just use that.
|
|
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.
|
|
- convert some to debug or error calls
|
|
- that because proc_add_library populates breakpoint tables. We can merge
symbol into artificial breakpoint, but not the other way around.
|
|
|
|
- use it to determine whether to turn on breakpoints in added libraries
if they were added after _start is hit
|
|
- this likely breaks tracing from libraries on x86s, but fixes ppc base
binary tracing for non-secure ppc32 cases. We'll need to tweak this
to enable the library PLTs
|
|
|
|
- the default might become "*" in future, but keep things more or less
the same as they always were for now
|
|
|
|
- the difference from the last time it worked is that now we got rid of
a kludge with one global dyn_addr and propagate it properly through
breakpoint and process interfaces
|
|
|
|
- doesn't help to fix the weird singlestepping problem on ppc64 though
|
|
|
|
|
|
|
|
|
|
- even though we don't destroy breakpoints at all right now
|
|
|
|
- only entry breakpoint is realized at the beginning
- when it's hit, it's deleted, and all enabled breakpoints are realized
- all PLTs are LS_TOPLT_EXEC. The difference is in the way the PLT entry
address is computed
|
|
|
|
- the patch will be sliced later
|
|
|
|
- We now always enable breakpoints after dynamic linker is done
|
|
|
|
|
|
|
|
|
|
|