From a0be994c5a6ec365d14f62b79b3d380000ab77b7 Mon Sep 17 00:00:00 2001
From: "Mr. eXoDia"
Date: Mon, 8 Jun 2015 00:42:43 +0200
Subject: [PATCH] DBG: new expression parser (should be far more stable, might
affect issue #312 and #310)
---
help/Input.htm | 16 +-
x64_dbg_dbg/_global.h | 1 +
x64_dbg_dbg/command.cpp | 30 +-
x64_dbg_dbg/expressionparser.cpp | 469 +++++++++++++++++++++
x64_dbg_dbg/expressionparser.h | 69 ++++
x64_dbg_dbg/math.cpp | 520 ------------------------
x64_dbg_dbg/math.h | 14 -
x64_dbg_dbg/value.cpp | 132 +++---
x64_dbg_dbg/value.h | 1 +
x64_dbg_dbg/x64_dbg_dbg.vcxproj | 4 +-
x64_dbg_dbg/x64_dbg_dbg.vcxproj.filters | 12 +-
11 files changed, 638 insertions(+), 630 deletions(-)
create mode 100644 x64_dbg_dbg/expressionparser.cpp
create mode 100644 x64_dbg_dbg/expressionparser.h
delete mode 100644 x64_dbg_dbg/math.cpp
delete mode 100644 x64_dbg_dbg/math.h
diff --git a/help/Input.htm b/help/Input.htm
index e1fdfb54..1a71dc77 100644
--- a/help/Input.htm
+++ b/help/Input.htm
@@ -27,19 +27,15 @@ x64).
registers (of all sizes) can be used as variables.
memory locations: You can read from a memory location by using one of the
following expressions:
[addr] - read a
-DWORD/QWORD, depending on the architecture.
@addr - same as
-above.
n:[addr] - read n bytes.
- @n:addr - same as
-above.
REMARKS:
- n is the amount of bytes to
-read, this can be anything smaller than 4 on x32 and smaller than 8 on x64 when
-specified, otherwise there will be an error.
- addr is directly interpreted
-as a value, when you want to read [addr+1] you should use
-brackets:
+DWORD/QWORD, depending on the
+architecture.
n:[addr] - read n bytes
+from.
REMARKS:
- n is the amount of bytes to read, this can be anything
+smaller than 4 on x32 and smaller than 8 on x64 when specified, otherwise
- @(addr+1), @addr+1 will read: [addr]+1.
+ there will be an error.
flags: Debug
flags (interpreted as integer) can be used as input. Flags are prefixed with a
'!' following the flag name. Valid flags are: !cf, !pf, !af, !zf, !sf, !tf, !if,
@@ -75,7 +71,7 @@ used.
"oep" or "ep" the address of these will be returned
instead.
Notice: Instead of the ':' delimiter you can
also use a '.' If you need to query module information such as
- "[module]:imagebase" or "[module]":entry" you are adviced to
+ "[module]:imagebase" or "[module]":entry" you are advised to
use a '?' as delimiter instead ("[module]?entry"). The '?' does
checking for named exports later, so it will still work when there is an
export called "entry" in the module.
diff --git a/x64_dbg_dbg/_global.h b/x64_dbg_dbg/_global.h
index 44979de5..9451fc6a 100644
--- a/x64_dbg_dbg/_global.h
+++ b/x64_dbg_dbg/_global.h
@@ -15,6 +15,7 @@
#include
#include
#include
+#include
#include