/[qemu]/qemu/disas.c
ViewVC logotype

Diff of /qemu/disas.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.27 by bellard, Sun Nov 6 16:52:11 2005 UTC revision 1.28 by bellard, Mon Nov 21 23:25:50 2005 UTC
# Line 138  print_insn_thumb1(bfd_vma pc, disassembl Line 138  print_insn_thumb1(bfd_vma pc, disassembl
138     values:     values:
139      i386 - nonzero means 16 bit code      i386 - nonzero means 16 bit code
140      arm  - nonzero means thumb code      arm  - nonzero means thumb code
141        ppc  - nonzero means little endian
142      other targets - unused      other targets - unused
143   */   */
144  void target_disas(FILE *out, target_ulong code, target_ulong size, int flags)  void target_disas(FILE *out, target_ulong code, target_ulong size, int flags)
# Line 177  void target_disas(FILE *out, target_ulon Line 178  void target_disas(FILE *out, target_ulon
178      disasm_info.mach = bfd_mach_sparc_v9b;      disasm_info.mach = bfd_mach_sparc_v9b;
179  #endif      #endif    
180  #elif defined(TARGET_PPC)  #elif defined(TARGET_PPC)
181      if (cpu_single_env->msr[MSR_LE])      if (flags)
182          disasm_info.endian = BFD_ENDIAN_LITTLE;          disasm_info.endian = BFD_ENDIAN_LITTLE;
183  #ifdef TARGET_PPC64  #ifdef TARGET_PPC64
184      disasm_info.mach = bfd_mach_ppc64;      disasm_info.mach = bfd_mach_ppc64;
# Line 314  void term_vprintf(const char *fmt, va_li Line 315  void term_vprintf(const char *fmt, va_li
315  void term_printf(const char *fmt, ...);  void term_printf(const char *fmt, ...);
316    
317  static int monitor_disas_is_physical;  static int monitor_disas_is_physical;
318    static CPUState *monitor_disas_env;
319    
320  static int  static int
321  monitor_read_memory (memaddr, myaddr, length, info)  monitor_read_memory (memaddr, myaddr, length, info)
# Line 325  monitor_read_memory (memaddr, myaddr, le Line 327  monitor_read_memory (memaddr, myaddr, le
327      if (monitor_disas_is_physical) {      if (monitor_disas_is_physical) {
328          cpu_physical_memory_rw(memaddr, myaddr, length, 0);          cpu_physical_memory_rw(memaddr, myaddr, length, 0);
329      } else {      } else {
330          cpu_memory_rw_debug(cpu_single_env, memaddr,myaddr, length, 0);          cpu_memory_rw_debug(monitor_disas_env, memaddr,myaddr, length, 0);
331      }      }
332      return 0;      return 0;
333  }  }
# Line 339  static int monitor_fprintf(FILE *stream, Line 341  static int monitor_fprintf(FILE *stream,
341      return 0;      return 0;
342  }  }
343    
344  void monitor_disas(target_ulong pc, int nb_insn, int is_physical, int flags)  void monitor_disas(CPUState *env,
345                       target_ulong pc, int nb_insn, int is_physical, int flags)
346  {  {
347      int count, i;      int count, i;
348      struct disassemble_info disasm_info;      struct disassemble_info disasm_info;
# Line 347  void monitor_disas(target_ulong pc, int Line 350  void monitor_disas(target_ulong pc, int
350    
351      INIT_DISASSEMBLE_INFO(disasm_info, NULL, monitor_fprintf);      INIT_DISASSEMBLE_INFO(disasm_info, NULL, monitor_fprintf);
352    
353        monitor_disas_env = env;
354      monitor_disas_is_physical = is_physical;      monitor_disas_is_physical = is_physical;
355      disasm_info.read_memory_func = monitor_read_memory;      disasm_info.read_memory_func = monitor_read_memory;
356    

Legend:
Removed from v.1.27  
changed lines
  Added in v.1.28

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26