ReactOS 0.4.15-dev-7958-gcd0bb1a
pteb.c
Go to the documentation of this file.
1#include <ntos.h>
2#include <stdio.h>
3
4
5int main(int argc, char* argv[])
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}
static int argc
Definition: ServiceArgs.c:12
struct _TEB * PTEB
int main()
Definition: test.c:6
unsigned long DWORD
Definition: ntddk_ex.h:95
#define printf
Definition: freeldr.h:97
GLint GLint GLint GLint GLint x
Definition: gl.h:1548
#define argv
Definition: mplay32.c:18
__asm__(".p2align 4, 0x90\n" ".seh_proc __seh2_global_filter_func\n" "__seh2_global_filter_func:\n" "\tpush %rbp\n" "\t.seh_pushreg %rbp\n" "\tsub $32, %rsp\n" "\t.seh_stackalloc 32\n" "\t.seh_endprologue\n" "\tmov %rdx, %rbp\n" "\tjmp *%rax\n" "__seh2_global_filter_func_exit:\n" "\t.p2align 4\n" "\tadd $32, %rsp\n" "\tpop %rbp\n" "\tret\n" "\t.seh_endproc")
PVOID StackLimit
Definition: compat.h:713
PVOID StackBase
Definition: compat.h:712
Definition: compat.h:836
PVOID DeallocationStack
Definition: compat.h:878
NT_TIB Tib
Definition: compat.h:837