Skip to content

Commit

Permalink
Disassembler symbol lookup fix
Browse files Browse the repository at this point in the history
Fix function signature for userspace disassembler symbol lookup.

Signed-off-by: Paul Brook <paul@codesourcery.com>
  • Loading branch information
Paul Brook committed Mar 1, 2010
1 parent 35bed8e commit 9f9f030
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 4 additions & 0 deletions disas.h
Expand Up @@ -22,7 +22,11 @@ struct syminfo;
struct elf32_sym;
struct elf64_sym;

#if defined(CONFIG_USER_ONLY)
typedef const char *(*lookup_symbol_t)(struct syminfo *s, target_ulong orig_addr);
#else
typedef const char *(*lookup_symbol_t)(struct syminfo *s, target_phys_addr_t orig_addr);
#endif

struct syminfo {
lookup_symbol_t lookup_symbol;
Expand Down
4 changes: 2 additions & 2 deletions linux-user/elfload.c
Expand Up @@ -1448,10 +1448,10 @@ static void load_symbols(struct elfhdr *hdr, int fd)
s->disas_num_syms = nsyms;
#if ELF_CLASS == ELFCLASS32
s->disas_symtab.elf32 = syms;
s->lookup_symbol = (lookup_symbol_t)lookup_symbolxx;
s->lookup_symbol = lookup_symbolxx;
#else
s->disas_symtab.elf64 = syms;
s->lookup_symbol = (lookup_symbol_t)lookup_symbolxx;
s->lookup_symbol = lookup_symbolxx;
#endif
s->next = syminfos;
syminfos = s;
Expand Down

0 comments on commit 9f9f030

Please sign in to comment.