Eric Pouech : dbghelp: Correctly handle the RULE_EXPRESSION when computing CFA in dwarf debug info .
Alexandre Julliard
julliard at winehq.org
Mon Jun 28 11:01:19 CDT 2010
Module: wine
Branch: master
Commit: 1c037bf5641d6dab556439882c1dc26d11a96b68
URL: http://source.winehq.org/git/wine.git/?a=commit;h=1c037bf5641d6dab556439882c1dc26d11a96b68
Author: Eric Pouech <eric.pouech at orange.fr>
Date: Sun Jun 27 18:55:15 2010 +0200
dbghelp: Correctly handle the RULE_EXPRESSION when computing CFA in dwarf debug info.
---
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 274410e..413ae44 100644
--- a/dlls/dbghelp/dwarf.c
+++ b/dlls/dbghelp/dwarf.c
@@ -2877,7 +2877,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-cvs
mailing list