From fd295c3a0dac6ffd1c72f5f1d4f362aad94a6fec Mon Sep 17 00:00:00 2001 From: Renan Le Padellec Date: Wed, 10 Oct 2012 06:05:32 -0700 Subject: Bug 391543 - Fix op_call() routine. Increment the expression offset before reading the DWARF debug information. --- agent/tcf/services/dwarfecomp.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/agent/tcf/services/dwarfecomp.c b/agent/tcf/services/dwarfecomp.c index 5f118163..663636be 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; -- cgit v1.2.3