blob: 0789b57218600a64d6ec16d099d7ca79bdfa81e2 [file] [log] [blame]
bellardb9adb4a2003-04-29 20:41:16 +00001#ifndef _QEMU_DISAS_H
2#define _QEMU_DISAS_H
3
aliguori376253e2009-03-05 23:01:23 +00004#include "qemu-common.h"
5
bellardb9adb4a2003-04-29 20:41:16 +00006/* Disassemble this for me please... (debugging). */
bellardc27004e2005-01-03 23:35:10 +00007void disas(FILE *out, void *code, unsigned long size);
bellard83b34f82005-01-23 20:26:30 +00008void target_disas(FILE *out, target_ulong code, target_ulong size, int flags);
aliguori376253e2009-03-05 23:01:23 +00009
10/* The usual mess... FIXME: Remove this condition once dyngen-exec.h is gone */
11#ifndef __DYNGEN_EXEC_H__
12void monitor_disas(Monitor *mon, CPUState *env,
bellard34765622005-11-21 23:35:10 +000013 target_ulong pc, int nb_insn, int is_physical, int flags);
aliguori376253e2009-03-05 23:01:23 +000014#endif
bellardb9adb4a2003-04-29 20:41:16 +000015
16/* Look up symbol for debugging purpose. Returns "" if unknown. */
bellardc27004e2005-01-03 23:35:10 +000017const char *lookup_symbol(target_ulong orig_addr);
bellardb9adb4a2003-04-29 20:41:16 +000018
pbrook49918a72008-10-22 15:11:31 +000019struct syminfo;
20struct elf32_sym;
21struct elf64_sym;
22
23typedef const char *(*lookup_symbol_t)(struct syminfo *s, target_ulong orig_addr);
24
25struct syminfo {
26 lookup_symbol_t lookup_symbol;
bellarde80cfcf2004-12-19 23:18:01 +000027 unsigned int disas_num_syms;
pbrook49918a72008-10-22 15:11:31 +000028 union {
29 struct elf32_sym *elf32;
30 struct elf64_sym *elf64;
31 } disas_symtab;
bellarde80cfcf2004-12-19 23:18:01 +000032 const char *disas_strtab;
33 struct syminfo *next;
pbrook49918a72008-10-22 15:11:31 +000034};
35
36/* Filled in by elfload.c. Simplistic, but will do for now. */
37extern struct syminfo *syminfos;
bellarde80cfcf2004-12-19 23:18:01 +000038
bellardb9adb4a2003-04-29 20:41:16 +000039#endif /* _QEMU_DISAS_H */