1 | /* $Id: tstHelp.c 23 2007-01-15 14:08:28Z vboxsync $ */
|
---|
2 | /** @file
|
---|
3 | * Testcase helpers.
|
---|
4 | */
|
---|
5 |
|
---|
6 | /*
|
---|
7 | * Copyright (C) 2006 InnoTek Systemberatung GmbH
|
---|
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 as published by the Free Software Foundation,
|
---|
13 | * in version 2 as it comes in the "COPYING" file of the VirtualBox OSE
|
---|
14 | * distribution. VirtualBox OSE is distributed in the hope that it will
|
---|
15 | * be useful, but WITHOUT ANY WARRANTY of any kind.
|
---|
16 | *
|
---|
17 | * If you received this file as part of a commercial VirtualBox
|
---|
18 | * distribution, then only the terms of your commercial VirtualBox
|
---|
19 | * license agreement apply instead of the previous paragraph.
|
---|
20 | */
|
---|
21 |
|
---|
22 | /*******************************************************************************
|
---|
23 | * Header Files *
|
---|
24 | *******************************************************************************/
|
---|
25 | #include "tstHelp.h"
|
---|
26 | #include <stdio.h>
|
---|
27 |
|
---|
28 | void tstDumpCtx(PCPUMCTX pCtx, const char *pszComment)
|
---|
29 | {
|
---|
30 | printf("*** CPU State dump *** %s:\n"
|
---|
31 | "cs:eip=%04x:%08x ss:esp=%04x:%08x tr=%04x\n"
|
---|
32 | " gdtr=%04x:%08x idtr=%04x:%08x ldtr=%04x\n"
|
---|
33 | "ds=%04x es=%04x fs=%04x gs=%04x\n"
|
---|
34 | "cr0=%08x cr2=%08x cr3=%08x cr4=%08x\n"
|
---|
35 | "eax=%08x ebx=%08x ecx=%08x edx=%08x\n"
|
---|
36 | "esi=%08x edi=%08x ebp=%08x efl=%08x\n",
|
---|
37 | pszComment,
|
---|
38 | pCtx->cs, pCtx->eip, pCtx->ss, pCtx->esp, pCtx->tr,
|
---|
39 | pCtx->gdtr.cbGdt, pCtx->gdtr.pGdt, pCtx->idtr.cbIdt, pCtx->idtr.pIdt, pCtx->ldtr,
|
---|
40 | pCtx->ds, pCtx->es, pCtx->fs, pCtx->gs,
|
---|
41 | pCtx->cr0, pCtx->cr2, pCtx->cr3, pCtx->cr4,
|
---|
42 | pCtx->eax, pCtx->ebx, pCtx->ecx, pCtx->edx,
|
---|
43 | pCtx->esi, pCtx->edi, pCtx->ebp, pCtx->eflags.u32);
|
---|
44 | }
|
---|
45 |
|
---|