2016-06-29 14:47:03 +03:00
|
|
|
#ifndef QEMU_DISAS_H
|
|
|
|
#define QEMU_DISAS_H
|
2003-04-30 00:41:16 +04:00
|
|
|
|
|
|
|
/* Disassemble this for me please... (debugging). */
|
2023-05-03 10:23:27 +03:00
|
|
|
void disas(FILE *out, const void *code, size_t size);
|
|
|
|
void target_disas(FILE *out, CPUState *cpu, uint64_t code, size_t size);
|
2009-03-06 02:01:23 +03:00
|
|
|
|
2023-05-03 10:23:27 +03:00
|
|
|
void monitor_disas(Monitor *mon, CPUState *cpu, uint64_t pc,
|
|
|
|
int nb_insn, bool is_physical);
|
2003-04-30 00:41:16 +04:00
|
|
|
|
2019-05-22 12:27:14 +03:00
|
|
|
char *plugin_disas(CPUState *cpu, uint64_t addr, size_t size);
|
|
|
|
|
2003-04-30 00:41:16 +04:00
|
|
|
/* Look up symbol for debugging purpose. Returns "" if unknown. */
|
2023-05-03 10:23:27 +03:00
|
|
|
const char *lookup_symbol(uint64_t orig_addr);
|
2003-04-30 00:41:16 +04:00
|
|
|
|
2008-10-22 19:11:31 +04:00
|
|
|
struct syminfo;
|
|
|
|
struct elf32_sym;
|
|
|
|
struct elf64_sym;
|
|
|
|
|
2023-05-03 10:23:27 +03:00
|
|
|
typedef const char *(*lookup_symbol_t)(struct syminfo *s, uint64_t orig_addr);
|
2008-10-22 19:11:31 +04:00
|
|
|
|
|
|
|
struct syminfo {
|
|
|
|
lookup_symbol_t lookup_symbol;
|
2004-12-20 02:18:01 +03:00
|
|
|
unsigned int disas_num_syms;
|
2008-10-22 19:11:31 +04:00
|
|
|
union {
|
|
|
|
struct elf32_sym *elf32;
|
|
|
|
struct elf64_sym *elf64;
|
|
|
|
} disas_symtab;
|
2004-12-20 02:18:01 +03:00
|
|
|
const char *disas_strtab;
|
|
|
|
struct syminfo *next;
|
2008-10-22 19:11:31 +04:00
|
|
|
};
|
|
|
|
|
|
|
|
/* Filled in by elfload.c. Simplistic, but will do for now. */
|
|
|
|
extern struct syminfo *syminfos;
|
2004-12-20 02:18:01 +03:00
|
|
|
|
2016-06-29 14:47:03 +03:00
|
|
|
#endif /* QEMU_DISAS_H */
|