fix debug_info_off linking
This commit is contained in:
parent
9488208a42
commit
6426ad6dea
1 changed files with 2 additions and 1 deletions
|
|
@ -401,6 +401,7 @@ impl DexWriter {
|
||||||
let mut min_addr = 0;
|
let mut min_addr = 0;
|
||||||
let mut max_addr = 0;
|
let mut max_addr = 0;
|
||||||
let mut label_min_max_addrs: HashMap<String, (usize, usize)> = HashMap::new();
|
let mut label_min_max_addrs: HashMap<String, (usize, usize)> = HashMap::new();
|
||||||
|
|
||||||
for ins in &code.insns {
|
for ins in &code.insns {
|
||||||
match ins {
|
match ins {
|
||||||
Instruction::Label(Label { name }) => {
|
Instruction::Label(Label { name }) => {
|
||||||
|
|
@ -2429,7 +2430,7 @@ impl DexWriter {
|
||||||
debug!("Link the debug_info_off entries in code_items");
|
debug!("Link the debug_info_off entries in code_items");
|
||||||
for code in self.code_items.iter_mut() {
|
for code in self.code_items.iter_mut() {
|
||||||
if code.debug_info_off != 0 {
|
if code.debug_info_off != 0 {
|
||||||
code.debug_info_off += self.section_manager.get_offset(Section::DebugInfoItem);
|
code.debug_info_off += self.section_manager.get_offset(Section::DebugInfoItem) - 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue