google / google/smali

Don't emit multiple .line directives before an instruction when disassembling

Open
#54 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
400
Forks
67
Avg merge
1d 2h
Merged PRs (30d)
1

Description

When running baksmali the disassembly can have multiple `.line` directives before an instruction, like this:
```
.line n
.line n+1
.line n+2

```
This happens when the line number table have line information for PCs which are not at an exact instruction boundary (in the example above `.line n` and `.line n+1` are on PCs between the previous instruction and ``. The disassembly should only have `.line` directives for the PCs matching instruction boundaries. So only
```
.line n+2

```
for the example above.

Typically this is caused by R8 compiling with PC -to-PC based line tables to be able to share then and save on DEX size.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.