~ubuntu-branches/ubuntu/gutsy/virtualbox-ose/gutsy

« back to all changes in this revision

Viewing changes to include/VBox/cpumdis.h

  • Committer: Bazaar Package Importer
  • Author(s): Steve Kowalik
  • Date: 2007-09-08 16:44:58 UTC
  • Revision ID: james.westby@ubuntu.com-20070908164458-wao29470vqtr8ksy
Tags: upstream-1.5.0-dfsg2
ImportĀ upstreamĀ versionĀ 1.5.0-dfsg2

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/** @file
 
2
 * CPUM - CPU Monitor(/Manager)
 
3
 */
 
4
 
 
5
/*
 
6
 * Copyright (C) 2006-2007 innotek GmbH
 
7
 *
 
8
 * This file is part of VirtualBox Open Source Edition (OSE), as
 
9
 * available from http://www.virtualbox.org. This file is free software;
 
10
 * you can redistribute it and/or modify it under the terms of the GNU
 
11
 * General Public License as published by the Free Software Foundation,
 
12
 * in version 2 as it comes in the "COPYING" file of the VirtualBox OSE
 
13
 * distribution. VirtualBox OSE is distributed in the hope that it will
 
14
 * be useful, but WITHOUT ANY WARRANTY of any kind.
 
15
 */
 
16
 
 
17
#ifndef ___VBox_cpumdis_h
 
18
#define ___VBox_cpumdis_h
 
19
 
 
20
#include <VBox/cpum.h>
 
21
#include <VBox/cdefs.h>
 
22
#include <VBox/types.h>
 
23
#include <VBox/x86.h>
 
24
#include <VBox/dis.h>
 
25
 
 
26
 
 
27
__BEGIN_DECLS
 
28
/** @addtogroup grp_cpum
 
29
 * @{
 
30
 */
 
31
 
 
32
#ifdef IN_RING3
 
33
 
 
34
/**
 
35
 * Disassemble an instruction and return the information in the provided structure.
 
36
 *
 
37
 * @returns VBox status code.
 
38
 * @param   pVM         VM Handle
 
39
 * @param   pCtx        CPU context
 
40
 * @param   GCPtrPC     Program counter (relative to CS) to disassemble from.
 
41
 * @param   pCpu        Disassembly state
 
42
 * @param   pszPrefix   String prefix for logging (debug only)
 
43
 *
 
44
 */
 
45
CPUMR3DECL(int) CPUMR3DisasmInstrCPU(PVM pVM, PCPUMCTX pCtx, RTGCPTR GCPtrPC, PDISCPUSTATE pCpu, const char *pszPrefix);
 
46
 
 
47
# ifdef DEBUG
 
48
/**
 
49
 * Disassemble an instruction and dump it to the log
 
50
 *
 
51
 * @returns VBox status code.
 
52
 * @param   pVM         VM Handle
 
53
 * @param   pCtx        CPU context
 
54
 * @param   pc          GC instruction pointer
 
55
 * @param   prefix      String prefix for logging
 
56
 *
 
57
 * @deprecated  Use DBGFR3DisasInstrCurrentLog().
 
58
 */
 
59
CPUMR3DECL(void) CPUMR3DisasmInstr(PVM pVM, PCPUMCTX pCtx, RTGCPTR pc, char *prefix);
 
60
 
 
61
/**
 
62
 * Disassemble an instruction and dump it to the log
 
63
 *
 
64
 * @returns VBox status code.
 
65
 * @param   pVM         VM Handle
 
66
 * @param   pCtx        CPU context
 
67
 * @param   pc          GC instruction pointer
 
68
 * @param   prefix      String prefix for logging
 
69
 * @param   nrInstructions
 
70
 *
 
71
 * @deprecated  Create new DBGFR3Disas function to do this.
 
72
 */
 
73
CPUMR3DECL(void) CPUMR3DisasmBlock(PVM pVM, PCPUMCTX pCtx, RTGCPTR pc, char *prefix, int nrInstructions);
 
74
 
 
75
# else
 
76
#  define CPUMR3DisasmInstr(pVM, pCtx, pc, prefix)
 
77
#  define CPUMR3DisasmBlock(pVM, pCtx, pc, prefix, nrInstructions)
 
78
# endif
 
79
 
 
80
#endif /* IN_RING3 */
 
81
 
 
82
/** @} */
 
83
__END_DECLS
 
84
 
 
85
 
 
86
#endif
 
87
 
 
88
 
 
89
 
 
90
 
 
91