ReactOS 0.4.15-dev-8636-g945e856
|
Go to the source code of this file.
Classes | |
struct | _RPN_OP |
struct | _RPN_STACK |
Macros | |
#define | NDEBUG |
#define | stricmp _stricmp |
#define | RTL_FIELD_SIZE(type, field) (sizeof(((type *)0)->field)) |
#define | CONST_STRCPY(dst, src) do { if ((dst)) { memcpy(dst, src, sizeof(src)); } } while (0); |
#define | RPN_OP_STACK_SIZE 256 |
#define | RPN_VALUE_STACK_SIZE 256 |
Typedefs | |
typedef enum _RPN_OP_TYPE | RPN_OP_TYPE |
typedef ULONGLONG(* | RPN_BINARY_OPERATOR) (ULONGLONG a, ULONGLONG b) |
typedef struct _RPN_OP | RPN_OP |
typedef struct _RPN_OP * | PRPN_OP |
typedef struct _RPN_STACK | RPN_STACK |
typedef struct _RPN_STACK * | PRPN_STACK |
Enumerations | |
enum | _RPN_OP_TYPE { RpnOpNop , RpnOpBinaryOperator , RpnOpUnaryOperator , RpnOpImmediate , RpnOpRegister , RpnOpDereference } |
Variables | |
struct { | |
ULONG Size | |
ULONG Sp | |
RPN_OP Ops [RPN_OP_STACK_SIZE] | |
} | RpnStack |
struct { | |
PCHAR Name | |
UCHAR Offset | |
UCHAR Size | |
} | RegisterToTrapFrame [] |
static const INT | RegisterToTrapFrameCount = sizeof (RegisterToTrapFrame) / sizeof (RegisterToTrapFrame[0]) |
Definition at line 89 of file kdb_expr.c.
#define NDEBUG |
Definition at line 39 of file kdb_expr.c.
#define RPN_OP_STACK_SIZE 256 |
Definition at line 92 of file kdb_expr.c.
#define RPN_VALUE_STACK_SIZE 256 |
Definition at line 93 of file kdb_expr.c.
Definition at line 86 of file kdb_expr.c.
Definition at line 83 of file kdb_expr.c.
typedef struct _RPN_STACK * PRPN_STACK |
Definition at line 53 of file kdb_expr.c.
typedef enum _RPN_OP_TYPE RPN_OP_TYPE |
typedef struct _RPN_STACK RPN_STACK |
Enumerator | |
---|---|
RpnOpNop | |
RpnOpBinaryOperator | |
RpnOpUnaryOperator | |
RpnOpImmediate | |
RpnOpRegister | |
RpnOpDereference |
Definition at line 43 of file kdb_expr.c.
BOOLEAN KdbpRpnEvaluateExpression | ( | IN PCHAR | Expression, |
IN PKDB_KTRAP_FRAME | TrapFrame, | ||
OUT PULONGLONG | Result, | ||
OUT PLONG ErrOffset | OPTIONAL, | ||
OUT PCHAR ErrMsg | OPTIONAL | ||
) |
Evaluates the given expression.
Expression | Expression to evaluate. |
TrapFrame | Register values. |
Result | Variable which receives the result on success. |
ErrOffset | Variable which receives character offset on parse error (-1 on other errors) |
ErrMsg | Buffer which receives an error message on failure (128 bytes) |
TRUE | Success. |
FALSE | Failure. |
Definition at line 1106 of file kdb_expr.c.
Referenced by KdbpEvaluateExpression().
BOOLEAN KdbpRpnEvaluateParsedExpression | ( | IN PVOID | Expression, |
IN PKDB_KTRAP_FRAME | TrapFrame, | ||
OUT PULONGLONG | Result, | ||
OUT PLONG ErrOffset | OPTIONAL, | ||
OUT PCHAR ErrMsg | OPTIONAL | ||
) |
Evaluates the given expression and returns the result.
Expression | Expression "handle" returned by KdbpRpnParseExpression. |
TrapFrame | Register values. |
Result | Variable which receives the result on success. |
ErrOffset | Variable which receives character offset on parse error (-1 on other errors) |
ErrMsg | Buffer which receives an error message on failure (128 bytes) |
Definition at line 1200 of file kdb_expr.c.
Referenced by KdbEnterDebuggerException().
PVOID KdbpRpnParseExpression | ( | IN PCHAR | Expression, |
OUT PLONG ErrOffset | OPTIONAL, | ||
OUT PCHAR ErrMsg | OPTIONAL | ||
) |
Parses the given expression and returns a "handle" to it.
Expression | Expression to evaluate. |
ErrOffset | Variable which receives character offset on parse error (-1 on other errors) |
ErrMsg | Buffer which receives an error message on failure (128 bytes) |
Definition at line 1146 of file kdb_expr.c.
Referenced by KdbpInsertBreakPoint().
Definition at line 184 of file kdb_expr.c.
Referenced by RpnpEvaluateStack(), and RpnpParseExpression().
Definition at line 200 of file kdb_expr.c.
Referenced by RpnpParseExpression().
Definition at line 232 of file kdb_expr.c.
Referenced by RpnpParseExpression().
Definition at line 240 of file kdb_expr.c.
Referenced by RpnpParseExpression().
Definition at line 216 of file kdb_expr.c.
Referenced by RpnpParseExpression().
Definition at line 224 of file kdb_expr.c.
Referenced by RpnpParseExpression().
Definition at line 192 of file kdb_expr.c.
Referenced by RpnpParseExpression().
Definition at line 176 of file kdb_expr.c.
Referenced by RpnpParseExpression().
Definition at line 208 of file kdb_expr.c.
Referenced by RpnpParseExpression().
Definition at line 168 of file kdb_expr.c.
Referenced by RpnpParseExpression().
|
static |
Clears the given RPN stack.
Stack | Pointer to a RPN_STACK structure. |
Definition at line 329 of file kdb_expr.c.
Referenced by KdbpRpnEvaluateExpression(), and KdbpRpnParseExpression().
|
static |
Evaluates the RPN op stack and returns the result.
Stack | Pointer to a RPN_STACK structure. |
TrapFrame | Register values. |
Result | Pointer to an ULONG to store the result into. |
ErrOffset | On failure this is set to the character offset at which the error occoured. |
ErrMsg | Buffer which receives an error message on failure (128 bytes) |
TRUE | Success. |
FALSE | Failure. |
Definition at line 897 of file kdb_expr.c.
Referenced by KdbpRpnEvaluateExpression(), and KdbpRpnEvaluateParsedExpression().
|
static |
Parses an expression.
This functions parses the given expression until the end of string or a closing brace is found. As the function parses the string it pushes RPN_OPs onto the stack.
Examples: 1+2*3 ; eax+10 ; (eax+16) * (ebx+4) ; dword[eax]
Stack | Pointer to a RPN_STACK structure. |
Expression | String to parse. |
CharacterOffset | Character offset of the subexpression from the beginning of the expression. |
End | On success End is set to the character at which parsing stopped. |
ErrOffset | On failure this is set to the character offset at which the error occoured. |
ErrMsg | On failure a message describing the problem is copied into this buffer (128 bytes) |
TRUE | Success. |
FALSE | Failure. |
Definition at line 426 of file kdb_expr.c.
Referenced by KdbpRpnEvaluateExpression(), KdbpRpnParseExpression(), and RpnpParseExpression().
Pops the top op from the stack.
Stack | Pointer to a RPN_STACK structure. |
Op | Pointer to an RPN_OP to store the popped op into (can be NULL). |
TRUE | Success. |
FALSE | Failure (stack empty) |
Definition at line 367 of file kdb_expr.c.
Referenced by RpnpParseExpression().
Pushes an RPN_OP onto the stack.
Stack | Pointer to a RPN_STACK structure. |
Op | RPN_OP to be copied onto the stack. |
Definition at line 342 of file kdb_expr.c.
Referenced by RpnpParseExpression().
|
static |
Gets the top op from the stack (not popping it)
Stack | Pointer to a RPN_STACK structure. |
Op | Pointer to an RPN_OP to copy the top op into. |
TRUE | Success. |
FALSE | Failure (stack empty) |
Definition at line 392 of file kdb_expr.c.
Referenced by RpnpParseExpression().
Definition at line 110 of file kdb_expr.c.
Definition at line 111 of file kdb_expr.c.
RPN_OP Ops[RPN_OP_STACK_SIZE] |
Definition at line 100 of file kdb_expr.c.
Referenced by KdbpRpnParseExpression().
const struct { ... } RegisterToTrapFrame[] |
Referenced by RpnpEvaluateStack(), and RpnpParseExpression().
|
static |
Definition at line 155 of file kdb_expr.c.
Referenced by RpnpParseExpression().
struct { ... } RpnStack |
Referenced by KdbpRpnEvaluateExpression(), and KdbpRpnParseExpression().
Definition at line 98 of file kdb_expr.c.
Referenced by KdbpRpnParseExpression().
ULONG Sp |
Definition at line 99 of file kdb_expr.c.