2003-04-30 00:41:16 +04:00
|
|
|
#ifndef _QEMU_DISAS_H
|
|
|
|
#define _QEMU_DISAS_H
|
|
|
|
|
2009-03-06 02:01:23 +03:00
|
|
|
#include "qemu-common.h"
|
|
|
|
|
2009-09-20 18:58:02 +04:00
|
|
|
#ifdef NEED_CPU_H
|
2003-04-30 00:41:16 +04:00
|
|
|
/* Disassemble this for me please... (debugging). */
|
2005-01-04 02:35:10 +03:00
|
|
|
void disas(FILE *out, void *code, unsigned long size);
|
2012-09-08 16:40:00 +04:00
|
|
|
void target_disas(FILE *out, CPUArchState *env, target_ulong code,
|
|
|
|
target_ulong size, int flags);
|
2009-03-06 02:01:23 +03:00
|
|
|
|
2012-03-14 04:38:32 +04:00
|
|
|
void monitor_disas(Monitor *mon, CPUArchState *env,
|
2005-11-22 02:35:10 +03:00
|
|
|
target_ulong pc, int nb_insn, int is_physical, int flags);
|
2003-04-30 00:41:16 +04:00
|
|
|
|
|
|
|
/* Look up symbol for debugging purpose. Returns "" if unknown. */
|
2005-01-04 02:35:10 +03:00
|
|
|
const char *lookup_symbol(target_ulong orig_addr);
|
2009-09-20 18:58:02 +04:00
|
|
|
#endif
|
2003-04-30 00:41:16 +04:00
|
|
|
|
2008-10-22 19:11:31 +04:00
|
|
|
struct syminfo;
|
|
|
|
struct elf32_sym;
|
|
|
|
struct elf64_sym;
|
|
|
|
|
2010-03-01 06:55:48 +03:00
|
|
|
#if defined(CONFIG_USER_ONLY)
|
|
|
|
typedef const char *(*lookup_symbol_t)(struct syminfo *s, target_ulong orig_addr);
|
|
|
|
#else
|
2012-10-23 14:30:10 +04:00
|
|
|
typedef const char *(*lookup_symbol_t)(struct syminfo *s, hwaddr orig_addr);
|
2010-03-01 06:55:48 +03:00
|
|
|
#endif
|
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
|
|
|
|
2003-04-30 00:41:16 +04:00
|
|
|
#endif /* _QEMU_DISAS_H */
|