diff options
author | Eugene Tarassov | 2012-05-09 19:55:31 +0000 |
---|---|---|
committer | Eugene Tarassov | 2012-05-09 19:55:31 +0000 |
commit | 829a838708f275a4e79b45763c69c147ede42b7e (patch) | |
tree | 85469d9e9173329caed8b23c006230096d506bdb /agent | |
parent | 02b03d4040630de86c3a9a883fa99df7f1b4589b (diff) | |
download | org.eclipse.tcf.agent-829a838708f275a4e79b45763c69c147ede42b7e.tar.gz org.eclipse.tcf.agent-829a838708f275a4e79b45763c69c147ede42b7e.tar.xz org.eclipse.tcf.agent-829a838708f275a4e79b45763c69c147ede42b7e.zip |
TCF Agent: fixed handling of FORM_SDATA, FORM_UDATA in OP_GNU_implicit_pointer
Diffstat (limited to 'agent')
-rw-r--r-- | agent/tcf/services/dwarfecomp.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/agent/tcf/services/dwarfecomp.c b/agent/tcf/services/dwarfecomp.c index 88c89061..9ee71697 100644 --- a/agent/tcf/services/dwarfecomp.c +++ b/agent/tcf/services/dwarfecomp.c @@ -251,7 +251,27 @@ static void op_implicit_pointer(void) { } else if (trap.error == ERR_SYM_NOT_FOUND) { size_t i; + union { + U4_T u4; + U8_T u8; + U1_T arr[8]; + } buf; read_dwarf_object_property(expr_ctx, STACK_NO_FRAME, ref_obj, AT_const_value, &pv); + switch (pv.mForm) { + case FORM_SDATA: + case FORM_UDATA: + pv.mAddr = buf.arr; + if (unit->mFile->elf64) { + pv.mSize = 8; + buf.u8 = pv.mValue; + } + else { + pv.mSize = 4; + buf.u4 = (U4_T)pv.mValue; + } + if (unit->mFile->byte_swap) swap_bytes(buf.arr, pv.mSize); + break; + } if (pv.mAddr == NULL) str_exception(ERR_INV_DWARF, "Invalid OP_GNU_implicit_pointer"); if (offset != 0) { if (offset > pv.mSize) str_exception(ERR_INV_DWARF, "Invalid OP_GNU_implicit_pointer"); |