[PATCH 2/3] [DbgHelp]: correctly handle the RULE_EXPRESSION when computing CFA in dwarf debug info
Eric Pouech
eric.pouech at orange.fr
Sun Jun 27 11:55:15 CDT 2010
A+
---
dlls/dbghelp/dwarf.c | 7 ++++++-
1 files changed, 6 insertions(+), 1 deletions(-)
diff --git a/dlls/dbghelp/dwarf.c b/dlls/dbghelp/dwarf.c
index e5769d8..dda1725 100644
--- a/dlls/dbghelp/dwarf.c
+++ b/dlls/dbghelp/dwarf.c
@@ -2881,7 +2881,12 @@ static void apply_frame_info(struct module* module, struct cpu_stack_walk* csw,
switch (info->cfa_rule)
{
case RULE_EXPRESSION:
- *cfa = *(ULONG_PTR*)eval_expression(module, csw, (const unsigned char*)info->cfa_offset, context);
+ *cfa = eval_expression(module, csw, (const unsigned char*)info->cfa_offset, context);
+ if (!sw_read_mem(csw, *cfa, cfa, sizeof(*cfa)))
+ {
+ WARN("Couldn't read memory at %p\n", (void*)*cfa);
+ return;
+ }
break;
case RULE_VAL_EXPRESSION:
*cfa = eval_expression(module, csw, (const unsigned char*)info->cfa_offset, context);
More information about the wine-patches
mailing list