summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/dex_file.cc7
-rw-r--r--src/dex_file.h2
2 files changed, 5 insertions, 4 deletions
diff --git a/src/dex_file.cc b/src/dex_file.cc
index a11744d232..0a18f11c01 100644
--- a/src/dex_file.cc
+++ b/src/dex_file.cc
@@ -675,10 +675,8 @@ void DexFile::dexDecodeDebugInfo0(const CodeItem* code_item, const art::Method*
for (;;) {
uint8_t opcode = *stream++;
- uint8_t adjopcode = opcode - DBG_FIRST_SPECIAL;
uint16_t reg;
-
switch (opcode) {
case DBG_END_SEQUENCE:
return;
@@ -755,7 +753,9 @@ void DexFile::dexDecodeDebugInfo0(const CodeItem* code_item, const art::Method*
case DBG_SET_FILE:
break;
- default:
+ default: {
+ int adjopcode = opcode - DBG_FIRST_SPECIAL;
+
address += adjopcode / DBG_LINE_RANGE;
line += DBG_LINE_BASE + (adjopcode % DBG_LINE_RANGE);
@@ -766,6 +766,7 @@ void DexFile::dexDecodeDebugInfo0(const CodeItem* code_item, const art::Method*
}
}
break;
+ }
}
}
}
diff --git a/src/dex_file.h b/src/dex_file.h
index 7d9e6f998f..7d3fb74868 100644
--- a/src/dex_file.h
+++ b/src/dex_file.h
@@ -717,7 +717,7 @@ class DexFile {
const String* signature);
static bool LineNumForPcCb(void* cnxt, uint32_t address, uint32_t line_num) {
- LineNumFromPcContext *context = (LineNumFromPcContext *)cnxt;
+ LineNumFromPcContext* context = (LineNumFromPcContext*) cnxt;
// We know that this callback will be called in
// ascending address order, so keep going until we find