Lines Matching refs:bfdParams
59 static bool arch_bfdInit(pid_t pid, bfd_t* bfdParams) { in arch_bfdInit() argument
62 if ((bfdParams->bfdh = bfd_openr(fname, 0)) == NULL) { in arch_bfdInit()
67 if (!bfd_check_format(bfdParams->bfdh, bfd_object)) { in arch_bfdInit()
72 int storage_needed = bfd_get_symtab_upper_bound(bfdParams->bfdh); in arch_bfdInit()
78 bfdParams->syms = (asymbol**)util_Malloc(storage_needed); in arch_bfdInit()
79 bfd_canonicalize_symtab(bfdParams->bfdh, bfdParams->syms); in arch_bfdInit()
81 if ((bfdParams->section = bfd_get_section_by_name(bfdParams->bfdh, ".text")) == NULL) { in arch_bfdInit()
89 static void arch_bfdDestroy(bfd_t* bfdParams) { in arch_bfdDestroy() argument
90 if (bfdParams->syms) { in arch_bfdDestroy()
91 free(bfdParams->syms); in arch_bfdDestroy()
93 if (bfdParams->bfdh) { in arch_bfdDestroy()
94 bfd_close(bfdParams->bfdh); in arch_bfdDestroy()
104 __block bfd_t bfdParams = { in arch_bfdResolveSyms() local
110 if (arch_bfdInit(pid, &bfdParams) == false) { in arch_bfdResolveSyms()
122 long offset = (long)funcs[i].pc - bfdParams.section->vma; in arch_bfdResolveSyms()
123 if ((offset < 0 || (unsigned long)offset > bfdParams.section->size)) { in arch_bfdResolveSyms()
127 bfdParams.bfdh, bfdParams.section, bfdParams.syms, offset, &file, &func, &line)) { in arch_bfdResolveSyms()
133 arch_bfdDestroy(&bfdParams); in arch_bfdResolveSyms()