diff options
author | Petr Machata <pmachata@redhat.com> | 2012-09-28 00:43:01 +0200 |
---|---|---|
committer | Petr Machata <pmachata@redhat.com> | 2012-10-01 14:18:53 +0200 |
commit | ef2fd27a347bbb0e7cca7fdee97422f6ae4d4bda (patch) | |
tree | f202d9bf5343dac44b70d32b770ffc594bac4331 /library.c | |
parent | 1054c90aa71875610fda43365a8e74086eb2bd66 (diff) | |
download | ltrace-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.c | 11 |
1 files changed, 8 insertions, 3 deletions
@@ -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); |