Bitdefender Hypervisor Memory Introspection
guest_stack.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2020 Bitdefender
3  * SPDX-License-Identifier: Apache-2.0
4  */
5 #ifndef _GUEST_STACK_H_
6 #define _GUEST_STACK_H_
7 
8 #include "introtypes.h"
9 
11 #define STACK_ADDR_NOT_INSIDE_FUNCTION 0x00000001
12 #define STACK_CALL_ADDRESS_IMPRECISE 0x00000002
14 #define STACK_INTERRUPT_ROUTINE 0x00000004
16 #define STACK_EXCEPTION_ROUTINE 0x00000008
18 
20 #define STACK_FLG_ONLY_DRIVER_ADDRS 0x00000001
21 #define STACK_FLG_FAST_GET 0x00000002
23 
25 typedef struct _STACK_ELEMENT
26 {
33  void *ReturnModule;
35 
40 
42 typedef struct _STACK_TRACE
43 {
47 
50 
51 #endif //_GUEST_STACK_H_
BOOLEAN Bits64
TRUE if we got the stack frame in 64-bit mode (RBP) or 32 (EBP)
Definition: guest_stack.h:48
_Bool BOOLEAN
Definition: intro_types.h:58
struct _STACK_TRACE * PSTACK_TRACE
DWORD Flags
Describe what each of the following fields mean.
Definition: guest_stack.h:32
Structure that describes a stack trace element.
Definition: guest_stack.h:25
DWORD NumberOfTraces
Number of elements inside Traces.
Definition: guest_stack.h:44
QWORD RetAddrPointer
Where we found the return address.
Definition: guest_stack.h:38
STACK_ELEMENT * Traces
Array describing the stack trace elements.
Definition: guest_stack.h:46
void * ReturnModule
The module to which the function belongs.
Definition: guest_stack.h:33
unsigned long long QWORD
Definition: intro_types.h:53
QWORD CalledAddress
The start address of the function called.
Definition: guest_stack.h:36
QWORD ReturnAddress
The address where the current stack frame will return (@ ret)
Definition: guest_stack.h:34
QWORD StartRip
The RIP where we were initially.
Definition: guest_stack.h:45
struct _STACK_TRACE STACK_TRACE
Structure that describes a stack trace.
uint32_t DWORD
Definition: intro_types.h:49
QWORD CurrentRip
The RIP where we are now (pointing to the instruction next to the CALL)
Definition: guest_stack.h:37
struct _STACK_ELEMENT * PSTACK_ELEMENT
struct _STACK_ELEMENT STACK_ELEMENT
Structure that describes a stack trace element.
Structure that describes a stack trace.
Definition: guest_stack.h:42