aboutsummaryrefslogtreecommitdiff
path: root/library.h
AgeCommit message (Collapse)Author
2013-10-23Allow the prototype to be specified directly at the symbolPetr Machata
2013-10-23Allow per-OS configuration hooks for structs library and library_symbolPetr Machata
2013-10-23System calls are now part of dedicated symbol libraryPetr Machata
- This symbol library is still special in that symbols are created on demand and never actually added. It just serves as a link to protolibrary with system call prototypes, and has a name (SYS). - Prototypes for system calls were moved to a dedicated prototype library called syscalls.conf. - Because it's undesirable to look up syscall prototypes in anything but the dedicated syscall protolib, prototype.c/.h now understand that some lookups shouldn't be done recursively (and so we never pick the definition from -F file that just happens to have the same name as a system call). The good thing is that now libraries can actually use symbols named SYS_something without clashing with system call prototypes. - One test case needed to be updated, because we now display system calls as something@SYS instead of SYS_something.
2013-10-11arch_library_init and arch_library_clone should be able to signal failurePetr Machata
- This then trickles to library_init, which needs to return int - Callers of library_init were updated to unroll their transactions upon failure - PPC and ARM backends were updated to match the updated interface
2013-03-08Each struct library should have its own struct protolibPetr Machata
This is enough for handling -x symbols. For handling -e however, we will need a per-process library that's incrementally built according to what's mapped in.
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.
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-07Add library_symbol_delayed_cb iteration predicatePetr Machata
2012-10-26Update copyright information and license headersPetr Machata
2012-10-01mipsel: Replace LS_TOPLT_GOTONLY with delayed symsEdgar E. Iglesias
Signed-off-by: Edgar E. Iglesias <edgar@axis.com>
2012-10-01Add a list of exported names to librariesPetr Machata
Those don't need to be full symbols, so we keep them separately.
2012-10-01Fix a comment in struct libraryPetr Machata
2012-10-01Add a callback that can be used for looking up symbols by namePetr Machata
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-27Add LS_TOPLT_GOTONLYEdgar E. Iglesias
to describe symbols with a GOT entry but without PLT entry. Signed-off-by: Edgar E. Iglesias <edgar@axis.com>
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-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-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-19Add ARCH_HAVE_LIBRARY_DATA customization pointPetr Machata
2012-04-19library_symbol_init may failPetr Machata
2012-04-19Commentary updatesPetr Machata
2012-04-19Drop the rest of LS_TOPLT_POINT supportPetr Machata
If any other architecture needs it, we'll add it back in some form. But now that we have callbacks on breakpoints, it might be possible to do it differently, without explicit support.
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-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-19Handle symbol aliasesPetr Machata
2012-04-19Don't create PLT symbols that don't match filtering criteriaPetr Machata
- instead of creating them, keeping them around, and then just not enabling breakpoints for them
2012-04-19Differentiate fresh libraries from old by "key", not by base addressPetr Machata
- that because base is unknown at the time that library is mapped in, only bias is known. We'd have to read the elf file to determine whether this is the right library or not. Instead we assume that the dynamic linker keeps linked list, and use address of internal structure as the key
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-19Shuffle breakpoint functions aroundPetr Machata
2012-04-19Support per-arch data in library_symbolPetr Machata
- new configuration setting ARCH_HAVE_LIBRARY_SYMBOL_DATA
2012-04-19Don't require target library as part of symbol initPetr Machata
2012-04-19Drop library_symbol.is_weakPetr Machata
2012-04-19Drop library_symbol.needs_initPetr Machata
2012-04-19Add arch_translate_address declPetr Machata
- and drop opd2addr, which this function supersedes
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-19library_symbol_init takes target_address_t instead of GElf_AddrPetr Machata
2012-04-19Support bias, display library name on breakpointPetr Machata
- syscall support very hacky right now
2012-04-19The first crude version of tracing across librariesPetr Machata
- the patch will be sliced later