aboutsummaryrefslogtreecommitdiff
path: root/breakpoints.c
AgeCommit message (Collapse)Author
2012-10-30Fix cross-tracing PIE binariesPetr Machata
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-26Update copyright information and license headersPetr Machata
2012-09-03breakpoints.c: handle_event.c: Fix compilation on MIPSSedat Dilek
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>
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 backend.h for backend interfacesPetr Machata
2012-05-15Be more robust if entry breakpoint can't be addedPetr Machata
2012-04-30Split arch_translate_address into this and arch_translate_address_dynPetr Machata
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).
2012-04-25Replace some uses of error with fprintfPetr Machata
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.
2012-04-24Add on_retract breakpoint callbackPetr Machata
2012-04-20Fix attach on PPC32 BSSPetr Machata
2012-04-19Fix code that assumes that breakpoint is valid after removedPetr Machata
(Which may actually hold sometimes, but generally won't.)
2012-04-19Implement proc_remove_breakpointPetr Machata
2012-04-19Add ARCH_HAVE_DYNLINK_DONEPetr Machata
2012-04-19Fix compilationPetr Machata
That line was commited by mistake.
2012-04-19Proper clean-up in insert_breakpointPetr Machata
2012-04-19NitsPetr Machata
2012-04-19Drop parameters that determined whether breakpoints should be enabledPetr Machata
2012-04-19Fix breakpoint cloningPetr Machata
2012-04-19Drop bp_callbacks.on_destroyPetr Machata
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.
2012-04-19Drop breakpoint->procPetr Machata
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.
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-19Drop leftover fprintf'sPetr Machata
- convert some to debug or error calls
2012-04-19Need to add entry breakpoint first, then to add libraryPetr Machata
- that because proc_add_library populates breakpoint tables. We can merge symbol into artificial breakpoint, but not the other way around.
2012-04-19Change a condition to an assertPetr Machata
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-19Don't turn on breakpoints when library is addedPetr Machata
- 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
2012-04-19Coding stylePetr Machata
2012-04-19Implement @MAIN, @/path/name -e selectors, make former default for nowPetr Machata
- the default might become "*" in future, but keep things more or less the same as they always were for now
2012-04-19Make several breakpoint callback names more systematicPetr Machata
2012-04-19Tracing dlopened libraries works again on x86_64Petr Machata
- 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
2012-04-19Shuffle breakpoint functions aroundPetr Machata
2012-04-19Configurable ugly workaround invocationPetr Machata
- doesn't help to fix the weird singlestepping problem on ppc64 though
2012-04-19Add missing implementations of default callbackPetr Machata
2012-04-19Remove "enable" flag from insert_breakpointPetr Machata
2012-04-19Add breakpoint_set_callbacks, split off breakpoint_init, adjust callersPetr Machata
2012-04-19New interface breakpoint_namePetr Machata
2012-04-19Add arch_breakpoint_destroy as a counterpart to arch_breakpoint_initPetr Machata
- even though we don't destroy breakpoints at all right now
2012-04-19Drop library_symbol.needs_initPetr Machata
2012-04-19Support tracing PPC32 processes with both BSS and secure PLTsPetr Machata
- 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
2012-04-19Error handlingPetr Machata
2012-04-19The first crude version of tracing across librariesPetr Machata
- the patch will be sliced later
2012-04-19Move process-related functions and structures to proc.hPetr Machata
2012-04-19Remove another bit of PPC-related crudPetr Machata
- We now always enable breakpoints after dynamic linker is done
2012-04-19Remove Breakpoint typedefPetr Machata
2012-04-19Drop Process::breakpoints_enabledPetr Machata
2012-04-19Drop most of start-up magic and use startup callback insteadPetr Machata
2012-04-19read_elf takes extra argument for entry pointPetr Machata
2012-04-19Add callbacks to breakpointsPetr Machata