aboutsummaryrefslogtreecommitdiff
path: root/library.c
diff options
context:
space:
mode:
authorPetr Machata <pmachata@redhat.com>2012-09-28 00:43:01 +0200
committerPetr Machata <pmachata@redhat.com>2012-10-01 14:18:53 +0200
commitef2fd27a347bbb0e7cca7fdee97422f6ae4d4bda (patch)
treef202d9bf5343dac44b70d32b770ffc594bac4331 /library.c
parent1054c90aa71875610fda43365a8e74086eb2bd66 (diff)
downloadltrace-ef2fd27a347bbb0e7cca7fdee97422f6ae4d4bda.tar.gz
Support latent and delayed symbols
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.
Diffstat (limited to 'library.c')
-rw-r--r--library.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/library.c b/library.c
index cbd4a35..c2ba169 100644
--- a/library.c
+++ b/library.c
@@ -113,13 +113,16 @@ static void
private_library_symbol_init(struct library_symbol *libsym,
arch_addr_t addr,
const char *name, int own_name,
- enum toplt type_of_plt)
+ enum toplt type_of_plt,
+ int latent, int delayed)
{
libsym->next = NULL;
libsym->lib = NULL;
libsym->plt_type = type_of_plt;
libsym->name = name;
libsym->own_name = own_name;
+ libsym->latent = latent;
+ libsym->delayed = delayed;
libsym->enter_addr = (void *)(uintptr_t)addr;
}
@@ -134,7 +137,8 @@ library_symbol_init(struct library_symbol *libsym,
arch_addr_t addr, const char *name, int own_name,
enum toplt type_of_plt)
{
- private_library_symbol_init(libsym, addr, name, own_name, type_of_plt);
+ private_library_symbol_init(libsym, addr, name, own_name,
+ type_of_plt, 0, 0);
/* If arch init fails, we've already set libsym->name and
* own_name. But we return failure, and the client code isn't
@@ -159,7 +163,8 @@ library_symbol_clone(struct library_symbol *retp, struct library_symbol *libsym)
return -1;
private_library_symbol_init(retp, libsym->enter_addr,
- name, libsym->own_name, libsym->plt_type);
+ name, libsym->own_name, libsym->plt_type,
+ libsym->latent, libsym->delayed);
if (arch_library_symbol_clone(retp, libsym) < 0) {
private_library_symbol_destroy(retp);