Module: wine Branch: master Commit: 4f2e15d053564b457d93492f2c04f1d4fddd2de5 URL: http://source.winehq.org/git/wine.git/?a=commit;h=4f2e15d053564b457d93492f2c...
Author: Marcus Meissner marcus@jet.franken.de Date: Mon May 31 22:08:28 2010 +0200
dbghelp: Add 2 new darf defines and implement DW_OP_stack_value.
---
dlls/dbghelp/dwarf.c | 4 ++++ dlls/dbghelp/dwarf.h | 3 +++ dlls/dbghelp/symbol.c | 4 ++++ 3 files changed, 11 insertions(+), 0 deletions(-)
diff --git a/dlls/dbghelp/dwarf.c b/dlls/dbghelp/dwarf.c index 35c01a6..f3e2f12 100644 --- a/dlls/dbghelp/dwarf.c +++ b/dlls/dbghelp/dwarf.c @@ -847,6 +847,10 @@ compute_location(dwarf2_traverse_context_t* ctx, struct location* loc, loc->kind = loc_dwarf2_block; } break; + case DW_OP_stack_value: + /* Expected behaviour is that this is the last instruction of this + * expression and just the "top of stack" value should be put to loc->offset. */ + break; default: if (op < DW_OP_lo_user) /* as DW_OP_hi_user is 0xFF, we don't need to test against it */ FIXME("Unhandled attr op: %x\n", op); diff --git a/dlls/dbghelp/dwarf.h b/dlls/dbghelp/dwarf.h index 23493d6..4ecb816 100644 --- a/dlls/dbghelp/dwarf.h +++ b/dlls/dbghelp/dwarf.h @@ -379,6 +379,9 @@ typedef enum dwarf_operation_e DW_OP_form_tls_address = 0x9b, DW_OP_call_frame_cfa = 0x9c, DW_OP_bit_piece = 0x9d, + /** Dwarf4 new values */ + DW_OP_implicit_value = 0x9e, + DW_OP_stack_value = 0x9f,
/* Implementation defined extensions */ DW_OP_lo_user = 0xe0, diff --git a/dlls/dbghelp/symbol.c b/dlls/dbghelp/symbol.c index 0eac098..0607278 100644 --- a/dlls/dbghelp/symbol.c +++ b/dlls/dbghelp/symbol.c @@ -724,6 +724,10 @@ static void symt_fill_sym_info(struct module_pair* pair, sym_info->Register = loc.reg ? loc.reg : CV_REG_EBP; sym_info->Address = loc.offset; break; + case loc_absolute: + sym_info->Flags |= SYMFLAG_VALUEPRESENT; + sym_info->Value = loc.offset; + break; default: FIXME("Shouldn't happen (kind=%d), debug reader backend is broken\n", loc.kind); assert(0);