VirtualBox

source: vbox/trunk/src/VBox/Disassembler/DisasmTestCore.cpp@ 41738

Last change on this file since 41738 was 41735, checked in by vboxsync, 13 years ago

DISCPUCORE: s/addrmode/uAddrMode/ s/opmode/uOpMode/

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 1.4 KB
Line 
1/* $Id: DisasmTestCore.cpp 41735 2012-06-15 00:26:44Z vboxsync $ */
2/** @file
3 * VBox disassembler - Test application for core.
4 */
5
6/*
7 * Copyright (C) 2006-2012 Oracle Corporation
8 *
9 * This file is part of VirtualBox Open Source Edition (OSE), as
10 * available from http://www.virtualbox.org. This file is free software;
11 * you can redistribute it and/or modify it under the terms of the GNU
12 * General Public License (GPL) as published by the Free Software
13 * Foundation, in version 2 as it comes in the "COPYING" file of the
14 * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
15 * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
16 */
17
18
19/*******************************************************************************
20* Header Files *
21*******************************************************************************/
22#include <VBox/dis.h>
23#include <VBox/disopcode.h>
24#include <stdio.h>
25
26int main(int argc, char **argv)
27{
28 printf("VBox Disassembler Test Core\n");
29 if (argc != 1)
30 {
31 //printf("DisasmBlock on printf:\n");
32 //DisasmBlock((uint8_t *)printf, 256);
33 }
34 else
35 {
36 printf("DISOne on it self:\n");
37
38 unsigned cb;
39 DISCPUSTATE cpu;
40 if (DISInstr((void *)(uintptr_t)&DISInstr, DISCPUMODE_32BIT, &cpu, &cb))
41 printf("ok %d\n", cpu.uAddrMode);
42 else
43 {
44 printf("DISOne failed!\n");
45 return 1;
46 }
47 }
48
49 return 0;
50}
51
Note: See TracBrowser for help on using the repository browser.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette