]>
Commit | Line | Data |
---|---|---|
b9adb4a6 FB |
1 | #ifndef _QEMU_DISAS_H |
2 | #define _QEMU_DISAS_H | |
3 | ||
376253ec AL |
4 | #include "qemu-common.h" |
5 | ||
ca20cf32 | 6 | #ifdef NEED_CPU_H |
b9adb4a6 | 7 | /* Disassemble this for me please... (debugging). */ |
c27004ec | 8 | void disas(FILE *out, void *code, unsigned long size); |
83b34f8b | 9 | void target_disas(FILE *out, target_ulong code, target_ulong size, int flags); |
376253ec | 10 | |
376253ec | 11 | void monitor_disas(Monitor *mon, CPUState *env, |
3476562d | 12 | target_ulong pc, int nb_insn, int is_physical, int flags); |
b9adb4a6 FB |
13 | |
14 | /* Look up symbol for debugging purpose. Returns "" if unknown. */ | |
c27004ec | 15 | const char *lookup_symbol(target_ulong orig_addr); |
ca20cf32 | 16 | #endif |
b9adb4a6 | 17 | |
49918a75 PB |
18 | struct syminfo; |
19 | struct elf32_sym; | |
20 | struct elf64_sym; | |
21 | ||
9f9f0309 PB |
22 | #if defined(CONFIG_USER_ONLY) |
23 | typedef const char *(*lookup_symbol_t)(struct syminfo *s, target_ulong orig_addr); | |
24 | #else | |
c227f099 | 25 | typedef const char *(*lookup_symbol_t)(struct syminfo *s, target_phys_addr_t orig_addr); |
9f9f0309 | 26 | #endif |
49918a75 PB |
27 | |
28 | struct syminfo { | |
29 | lookup_symbol_t lookup_symbol; | |
e80cfcfc | 30 | unsigned int disas_num_syms; |
49918a75 PB |
31 | union { |
32 | struct elf32_sym *elf32; | |
33 | struct elf64_sym *elf64; | |
34 | } disas_symtab; | |
e80cfcfc FB |
35 | const char *disas_strtab; |
36 | struct syminfo *next; | |
49918a75 PB |
37 | }; |
38 | ||
39 | /* Filled in by elfload.c. Simplistic, but will do for now. */ | |
40 | extern struct syminfo *syminfos; | |
e80cfcfc | 41 | |
b9adb4a6 | 42 | #endif /* _QEMU_DISAS_H */ |