Statistics
| Branch: | Revision:

root / disas.h @ 1e6eec8b

History | View | Annotate | Download (1.1 kB)

1 b9adb4a6 bellard
#ifndef _QEMU_DISAS_H
2 b9adb4a6 bellard
#define _QEMU_DISAS_H
3 b9adb4a6 bellard
4 376253ec aliguori
#include "qemu-common.h"
5 376253ec aliguori
6 b9adb4a6 bellard
/* Disassemble this for me please... (debugging). */
7 c27004ec bellard
void disas(FILE *out, void *code, unsigned long size);
8 83b34f8b bellard
void target_disas(FILE *out, target_ulong code, target_ulong size, int flags);
9 376253ec aliguori
10 376253ec aliguori
/* The usual mess... FIXME: Remove this condition once dyngen-exec.h is gone */
11 376253ec aliguori
#ifndef __DYNGEN_EXEC_H__
12 376253ec aliguori
void monitor_disas(Monitor *mon, CPUState *env,
13 3476562d bellard
                   target_ulong pc, int nb_insn, int is_physical, int flags);
14 376253ec aliguori
#endif
15 b9adb4a6 bellard
16 b9adb4a6 bellard
/* Look up symbol for debugging purpose.  Returns "" if unknown. */
17 c27004ec bellard
const char *lookup_symbol(target_ulong orig_addr);
18 b9adb4a6 bellard
19 49918a75 pbrook
struct syminfo;
20 49918a75 pbrook
struct elf32_sym;
21 49918a75 pbrook
struct elf64_sym;
22 49918a75 pbrook
23 49918a75 pbrook
typedef const char *(*lookup_symbol_t)(struct syminfo *s, target_ulong orig_addr);
24 49918a75 pbrook
25 49918a75 pbrook
struct syminfo {
26 49918a75 pbrook
    lookup_symbol_t lookup_symbol;
27 e80cfcfc bellard
    unsigned int disas_num_syms;
28 49918a75 pbrook
    union {
29 49918a75 pbrook
      struct elf32_sym *elf32;
30 49918a75 pbrook
      struct elf64_sym *elf64;
31 49918a75 pbrook
    } disas_symtab;
32 e80cfcfc bellard
    const char *disas_strtab;
33 e80cfcfc bellard
    struct syminfo *next;
34 49918a75 pbrook
};
35 49918a75 pbrook
36 49918a75 pbrook
/* Filled in by elfload.c.  Simplistic, but will do for now. */
37 49918a75 pbrook
extern struct syminfo *syminfos;
38 e80cfcfc bellard
39 b9adb4a6 bellard
#endif /* _QEMU_DISAS_H */