Use dex_pc instead of line_number.
Change-Id: I3759319562428bccabccc66d7afd691682ecca55
diff --git a/src/dex_file.cc b/src/dex_file.cc
index a054849..85dafee 100644
--- a/src/dex_file.cc
+++ b/src/dex_file.cc
@@ -586,18 +586,12 @@
return -2;
}
- return GetLineNumFromPC(method->IsStatic(), method->GetDexMethodIndex(),
- GetCodeItem(method->GetCodeItemOffset()), rel_pc);
-}
-
-int32_t DexFile::GetLineNumFromPC(bool is_static, uint32_t method_idx,
- const CodeItem* code_item,
- uint32_t rel_pc) const {
+ const CodeItem* code_item = GetCodeItem(method->GetCodeItemOffset());
DCHECK(code_item != NULL) << GetLocation();
// A method with no line number info should return -1
LineNumFromPcContext context(rel_pc, -1);
- DecodeDebugInfo(code_item, is_static, method_idx, LineNumForPcCb,
+ DecodeDebugInfo(code_item, method->IsStatic(), method->GetDexMethodIndex(), LineNumForPcCb,
NULL, &context);
return context.line_num_;
}