-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path221700.mypatch
56 lines (50 loc) · 2.11 KB
/
221700.mypatch
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
From: Eric Pouech <[email protected]>
Subject: [PATCH 19/19] programs/winedbg: remove FORCE_DEREF expressions
Message-Id: <163897113257.528091.15440627439872477744.stgit@euterpe>
Date: Wed, 8 Dec 2021 14:45:32 +0100
In-Reply-To: <163897087724.528091.10090935688970751662.stgit@euterpe>
References: <163897087724.528091.10090935688970751662.stgit@euterpe>
(simply use DEREF unary op)
Signed-off-by: Eric Pouech <[email protected]>
---
programs/winedbg/dbg.y | 2 +-
programs/winedbg/expr.c | 5 -----
programs/winedbg/expr.h | 1 -
3 files changed, 1 insertion(+), 7 deletions(-)
diff --git a/programs/winedbg/dbg.y b/programs/winedbg/dbg.y
index b10f50a3d6a..d14ae1c399a 100644
--- a/programs/winedbg/dbg.y
+++ b/programs/winedbg/dbg.y
@@ -411,7 +411,7 @@ lvalue:
| lvalue OP_DRF tIDENTIFIER { $$ = expr_alloc_pstruct($1, $3); }
| lvalue '.' tIDENTIFIER { $$ = expr_alloc_struct($1, $3); }
| lvalue '[' expr ']' { $$ = expr_alloc_binary_op(EXP_OP_ARR, $1, $3); }
- | '*' expr { $$ = expr_alloc_unary_op(EXP_OP_FORCE_DEREF, $2); }
+ | '*' expr { $$ = expr_alloc_unary_op(EXP_OP_DEREF, $2); }
;
%%
diff --git a/programs/winedbg/expr.c b/programs/winedbg/expr.c
index 7a7c2013578..0b5b1c544f3 100644
--- a/programs/winedbg/expr.c
+++ b/programs/winedbg/expr.c
@@ -556,11 +556,6 @@ struct dbg_lvalue expr_eval(struct expr* exp)
if (!types_array_index(&exp1, 0, &rtn))
RaiseException(DEBUG_STATUS_BAD_TYPE, 0, 0, NULL);
break;
- case EXP_OP_FORCE_DEREF:
- rtn = exp1;
- if (exp1.in_debuggee)
- dbg_read_memory(memory_to_linear_addr(&exp1.addr), &rtn.addr.Offset, sizeof(rtn.addr.Offset));
- break;
case EXP_OP_ADDR:
/* only do it on linear addresses */
if (exp1.addr.Mode != AddrModeFlat)
diff --git a/programs/winedbg/expr.h b/programs/winedbg/expr.h
index 295543ec292..24303a4a562 100644
--- a/programs/winedbg/expr.h
+++ b/programs/winedbg/expr.h
@@ -41,4 +41,3 @@
#define EXP_OP_ADDR 0x27
#define EXP_OP_ARR 0x28
#define EXP_OP_SEG 0x29
-#define EXP_OP_FORCE_DEREF 0x2a