summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRenan Le Padellec2012-10-10 09:05:32 (EDT)
committer Eugene Tarassov2012-10-10 13:10:53 (EDT)
commitfd295c3a0dac6ffd1c72f5f1d4f362aad94a6fec (patch)
treec1ecefcc7e7f77badb07e479c5470b09fd5d4a1e
parent6904adc8b6dcbc280b9ae8ca3b0054f338737e00 (diff)
downloadorg.eclipse.tcf.agent-fd295c3a0dac6ffd1c72f5f1d4f362aad94a6fec.zip
org.eclipse.tcf.agent-fd295c3a0dac6ffd1c72f5f1d4f362aad94a6fec.tar.gz
org.eclipse.tcf.agent-fd295c3a0dac6ffd1c72f5f1d4f362aad94a6fec.tar.bz2
Bug 391543 - Fix op_call() routine.
Increment the expression offset before reading the DWARF debug information.
-rw-r--r--agent/tcf/services/dwarfecomp.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/agent/tcf/services/dwarfecomp.c b/agent/tcf/services/dwarfecomp.c
index 5f11816..663636b 100644
--- a/agent/tcf/services/dwarfecomp.c
+++ b/agent/tcf/services/dwarfecomp.c
@@ -314,13 +314,16 @@ static void op_push_tls_address(void) {
static void op_call() {
U8_T ref_id = 0;
DIO_UnitDescriptor * desc = &expr->unit->mDesc;
- U8_T dio_pos = expr->expr_addr + expr_pos - (U1_T *)expr->section->data;
+ U8_T dio_pos = 0;
+ U1_T opcode = 0;
ObjectInfo * ref_obj = NULL;
DWARFExpressionInfo info;
PropertyValue pv;
+ opcode = expr->expr_addr[expr_pos++];
+ dio_pos = expr->expr_addr + expr_pos - (U1_T *)expr->section->data;
dio_EnterSection(desc, expr->section, dio_pos);
- switch (expr->expr_addr[expr_pos]) {
+ switch (opcode) {
case OP_call2:
ref_id = desc->mSection->addr + desc->mUnitOffs + dio_ReadU2();
break;