ReactOS  0.4.15-dev-4857-g47842d7
pteb.c File Reference
#include <ntos.h>
#include <stdio.h>
Include dependency graph for pteb.c:

Go to the source code of this file.

Functions

int main (int argc, char *argv[])
 

Function Documentation

◆ main()

int main ( int argc  ,
char argv[] 
)

hosttype.c Copyright (C) 2002 by Brian Palmer brian.nosp@m.p@sg.nosp@m.inet..nosp@m.com

Definition at line 5 of file pteb.c.

6 {
7  int x;
8  PTEB Teb;
9 
10  printf("TEB dumpper\n");
11  __asm__("movl %%fs:0x18, %0\n\t"
12  : "=a" (x)
13  : /* no inputs */);
14  printf("fs[0x18] %x\n", x);
15 
16  Teb = (PTEB)x;
17 
18  printf("StackBase: 0x%08lX\n", (DWORD)Teb->Tib.StackBase);
19  printf("StackLimit: 0x%08lX\n", (DWORD)Teb->Tib.StackLimit);
20  printf("DeallocationStack: 0x%08lX\n", (DWORD)Teb->DeallocationStack);
21 
22  return(0);
23 }
GLint GLint GLint GLint GLint x
Definition: gl.h:1548
__asm__("\n\t \ NewInt3Handler:\n\t \ pushl $" STR(REASON_INT3) "\n\t \ // call debugger loop\n\t \ jmp NewInt31Handler\n\t \ ")
NT_TIB Tib
Definition: compat.h:696
#define printf
Definition: freeldr.h:94
PVOID DeallocationStack
Definition: compat.h:737
unsigned long DWORD
Definition: ntddk_ex.h:95
Definition: compat.h:694
PVOID StackBase
Definition: compat.h:571
struct _TEB * PTEB
PVOID StackLimit
Definition: compat.h:572