Statistics
| Branch: | Revision:

root / disas.h @ 47b01cf3

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