aboutsummaryrefslogtreecommitdiff
path: root/sysdeps/linux-gnu/trace.c
AgeCommit message (Collapse)Author
2013-11-05Full support of IFUNC tracing on PPC32Petr Machata
2013-11-05Move code for tracing IFUNC symbolsPetr Machata
- ... from sysdeps/linux-gnu/hooks.c to sysdeps/linux-gnu/trace.c where it fits better.
2013-11-05Partial support of IFUNC tracing on PPC32Petr Machata
- Just like on PPC64, we need to move IRELATIVE relocations from .rela.dyn to the vector of PLT relocations - Just like on PPC64, we may need to rename the symbol--except the symbol to looked is the one with the address of PLT slot address, not of rela addend.
2013-10-25Split linux_elf_find_irelative_name out of linux_elf_add_plt_entry_irelativePetr Machata
2013-10-24sysdeps/linux-gnu/trace.c misses #include <stdint.h>Petr Machata
2013-10-23Add support for tracing of IRELATIVE PLT entriesPetr Machata
- Because the IRELATIVE entries have no associated symbol name, we need to allow arch_elf_add_plt_entry to override the name. This is done by that callback returning PLT_OK and returning the new symbol via libsym-chain return argument. Filtering is postponed until we have that symbol, and the filter is applied to the whole returned chain. - Add linux_elf_add_plt_entry_irelative to support proper naming of IRELATIVE PLT entries. This needs to be called from arch backend, as the numbers of IRELATIVE relocations differ per-architecture.
2013-10-23Split part of delete_breakpoint into delete_breakpoint_atPetr Machata
2013-10-11Rename insert_breakpoint to insert_breakpoint_atPetr Machata
2013-03-12Instead of smuggling the vfork return breakpoint back, ref it once morePetr Machata
- Before we would let the breakpoint be removed and later reinserted it. But that's unnecessarily cumbersome, and besides breaks on ARM Thumb, where the reinserted breakpoint would be ARM breakpoint instead of Thumb. This is easier and fixes that issue.
2013-03-11GNU/Linux software singlestepping: store breakpoints, not addressesPetr Machata
The reason being that the actual breakpoint address might be different from the address requested. One example is Thumb, where Thumb breakpoints are requested for address+1 (lowest bit set). Whether this is clean solution is very questionable though.
2013-03-08GNU/Linux backend: guard writing through task_info pointer against NULLPetr Machata
2013-03-08Change DICT_FIND to DICT_FIND_{REF,VAL}Petr Machata
- In many places, DICT_FIND was awkward to use, as it required the use of pointers even in cases that the dictionary already stored pointers. For those cases, add DICT_FIND_VAL. - Rename the original DICT_FIND to DICT_FIND_REF to make the disctinction clear. That is useful if the dictionary holds actual structures.
2013-03-08Rewrite dict module to be more in line with vectPetr Machata
It's now a bit more strongly typed, can grow and shrink on demand, and has a more complete interface. It uses open addressing scheme to store hashes.
2013-03-05Remove hacks for SPARC codePetr Machata
Simply continuing on SPARC is probably broken. The breakpoint isn't disabled at that point, and continuing just hits it again. That __ia64___ in ifdef is never defined even on an IA64 machine. It's a typo, note the three underscores.
2013-01-30Introduce continue_after_execPetr Machata
This needs to be handled differently on non-Linux platforms.
2013-01-15Update call to arch_sw_singlestepPetr Machata
- After the refactoring, the prototype changed and it doesn't return int anymore. Of course C happily implicitly converts this. Ho hum.
2013-01-14Rename atomic singlestep to software singlestepPetr Machata
- The old name came from PPC implementation, where the feature was used for skipping atomic instructions. But this is more useful, was reused for fully software singlestepping on MIPS, and will be similarly used for ARM. So rename the interface, and make the prototype more explicit. - Also document the method in backend.h. - And convert several void*'s to arch_addr_t's while there.
2012-12-17Make enum ecb_status enumerators uppercasePetr Machata
2012-12-17Make enumerators of process stopping status uppercasePetr Machata
2012-12-17Make enum process_status enumerators uppercasePetr Machata
Rationale: coding style consistency.
2012-12-17struct Process becomes struct processPetr Machata
This is for consistency with other structures, and ultimately with Linux coding style. The typedef ("Process") was dropped as well for this reason. This opportunity was used to fix coding style around the impacted lines.
2012-11-07Move default PTRACE_ constants into new file trace-defs.hPetr Machata
Include it also in events.c, where we use them as well.
2012-10-27Coding style in sysdeps/linux-gnu/trace.cPetr Machata
This is all now code coming from the threads branch. Hopefully no patches against this are in the wild.
2012-09-27mipsel: Singlestep over breakpointsEdgar E. Iglesias
Signed-off-by: Edgar E. Iglesias <edgar@axis.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 memory errorsPetr Machata
2012-08-29Fix compilationPetr Machata
2012-08-29Add backend.h for backend interfacesPetr Machata
2012-08-29Move event-que declarations to sysdeps, new backend interface process_removedPetr Machata
- the reason being that the que-handling was declared on global level, but was only implemented in one back end. If this is deemed generally useful, it should all be moved to front end, but as things are it's all the same, so I'm preferring the less invasive change
2012-08-29Drop umovestr, umovelong that are not used anymorePetr Machata
2012-08-29Add type.c/.h, value.c/.h, value_dict.c/.hPetr Machata
- none of this is plugged in yet - expr.c/.h is not in yet, so we still express array length with len_spec integer. Some function are mocked out so the thing compiles
2012-05-05Fix build on android, which requires that ptrace data and addr are void *Petr Machata
Also, for several requests that ignore addr, we pass 1. Change these back to 0. This patch is largely based on work by Florian Echtler <floe@butterbrot.org>.
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-23Use the right process to insert breakpoints for stepping over atomic blockPetr Machata
2012-04-19Reinsert vfork return breakpoint in handlerPetr Machata
Previously we assumed that that breakpoint would still be around in the breakpoint table, but now that they are actually erased on removal, it doesn't hold anymore. If it should hold (which might happen), then insert_breakpoint knows to just piggy-back on an existing breakpoint.
2012-04-19When removing atomic breakpoints, fetch data from leader, not current procPetr Machata
2012-04-19Fixes for atomic block supportPetr Machata
- Support branches in atomic blocks - Fix interaction between atomic skip and single stepping
2012-04-19Fix post_singlestep for cases where event was already sunkPetr Machata
2012-04-19Fix rebase falloutPetr Machata
2012-04-19Call breakpoint handler if that's what we hit during stopping on linuxPetr Machata
2012-04-19Expose on_all_stopped hooks for linux stopping handlerPetr Machata
2012-04-19Updates to debugging messagesPetr Machata
2012-04-19Drop PID parameter from trace_set_optionsPetr Machata
2012-04-19Fix PLT calls on PPC64 unprelinked strippedPetr Machata
2012-04-19Configurable ugly workaround invocationPetr Machata
- doesn't help to fix the weird singlestepping problem on ppc64 though
2012-04-19Remove "enable" flag from insert_breakpointPetr Machata
2012-04-19Further generalize the process stopping handlerPetr Machata
2012-04-19Move declarations related to process stopping handler to a new file trace.hPetr Machata
2012-04-19Generalize the stopping handler so that it can be reusedPetr Machata
- though more generalizing may be needed