static void enumerate_lines(const char *dllpath) { drsym_error_t symres; if (verbose) get_and_print_debug_kind(dllpath); symres = drsym_enumerate_lines(dllpath, enum_line_cb, (void *) dllpath); if (symres != DRSYM_SUCCESS && verbose) printf("line enum error %d\n", symres); }
static void lookup_symbol(const char *dllpath, const char *sym) { size_t modoffs; drsym_error_t symres; if (verbose) get_and_print_debug_kind(dllpath); symres = drsym_lookup_symbol(dllpath, sym, &modoffs, DRSYM_DEMANGLE); if (symres == DRSYM_SUCCESS || symres == DRSYM_ERROR_LINE_NOT_AVAILABLE) { printf("+0x%x\n", (uint)modoffs); } else { if (verbose) printf("drsym error %d looking up \"%s\" in \"%s\"\n", symres, sym, dllpath); else printf("??\n"); } }
static void symquery_lookup_symbol(const char *dllpath, const char *sym) { size_t modoffs; drsym_error_t symres; if (verbose) get_and_print_debug_kind(dllpath); symres = drsym_lookup_symbol(dllpath, sym, &modoffs, demangle_flags); if (symres == DRSYM_SUCCESS || symres == DRSYM_ERROR_LINE_NOT_AVAILABLE) { printf("+"SIZE_FMTX"\n", modoffs); } else { if (verbose) printf("drsym error %d looking up \"%s\" in \"%s\"\n", symres, sym, dllpath); else printf("??\n"); } }
static void enumerate_symbols(const char *dllpath, const char *match, bool search, bool searchall) { drsym_error_t symres; if (verbose) get_and_print_debug_kind(dllpath); #ifdef WINDOWS if (search) symres = drsym_search_symbols(dllpath, match, searchall, search_cb, NULL); else { #endif symres = drsym_enumerate_symbols(dllpath, search_cb, (void *)match, DRSYM_DEMANGLE); #ifdef WINDOWS } #endif if (symres != DRSYM_SUCCESS && verbose) printf("search/enum error %d\n", symres); }
static void enumerate_symbols(const char *dllpath, const char *match, bool search, bool searchall) { drsym_error_t symres; if (verbose) get_and_print_debug_kind(dllpath); #ifdef WINDOWS if (search) symres = drsym_search_symbols_ex(dllpath, match, (searchall ? DRSYM_FULL_SEARCH : 0) | demangle_flags, search_cb, sizeof(drsym_info_t), NULL); else { #endif symres = drsym_enumerate_symbols_ex(dllpath, search_cb, sizeof(drsym_info_t), (void *)match, demangle_flags); #ifdef WINDOWS } #endif if (symres != DRSYM_SUCCESS && verbose) printf("search/enum error %d\n", symres); }