|
|
1.1 root 1: /*
2: * Copyright (c) 1994 The University of Utah and
3: * the Center for Software Science (CSS). All rights reserved.
4: *
5: * Permission to use, copy, modify and distribute this software and its
6: * documentation is hereby granted, provided that both the copyright
7: * notice and this permission notice appear in all copies of the
8: * software, derivative works or modified versions, and any portions
9: * thereof, and that both notices appear in supporting documentation.
10: *
11: * THE UNIVERSITY OF UTAH AND CSS ALLOW FREE USE OF THIS SOFTWARE IN ITS "AS
12: * IS" CONDITION. THE UNIVERSITY OF UTAH AND CSS DISCLAIM ANY LIABILITY OF
13: * ANY KIND FOR ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
14: *
15: * CSS requests users of this software to return to [email protected] any
16: * improvements that they make and grant CSS redistribution rights.
17: *
18: * Author: Bryan Ford, University of Utah CSS
19: */
20:
21: #include <mach/machine/tss.h>
22:
23: void tss_dump(struct i386_tss *tss)
24: {
25: printf("Dump of TSS at %08x:\n", tss);
26: printf("back_link %04x\n", tss->back_link & 0xffff);
27: printf("ESP0 %08x SS0 %04x\n", tss->esp0, tss->ss0 & 0xffff);
28: printf("ESP1 %08x SS1 %04x\n", tss->esp1, tss->ss1 & 0xffff);
29: printf("ESP2 %08x SS2 %04x\n", tss->esp2, tss->ss2 & 0xffff);
30: printf("CR3 %08x\n", tss->cr3);
31: printf("EIP %08x EFLAGS %08x\n", tss->eip, tss->eflags);
32: printf("EAX %08x EBX %08x ECX %08x EDX %08x\n",
33: tss->eax, tss->ebx, tss->ecx, tss->edx);
34: printf("ESI %08x EDI %08x EBP %08x ESP %08x\n",
35: tss->esi, tss->edi, tss->ebp, tss->esp);
36: printf("CS %04x SS %04x DS %04x ES %04x FS %04x GS %04x\n",
37: tss->cs & 0xffff, tss->ss & 0xffff,
38: tss->ds & 0xffff, tss->es & 0xffff,
39: tss->fs & 0xffff, tss->gs & 0xffff);
40: printf("LDT %04x\n", tss->ldt & 0xffff);
41: printf("trace_trap %04x\n", tss->trace_trap);
42: printf("IOPB offset %04x\n", tss->io_bit_map_offset);
43: }
44:
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.