Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Translate debug info #5

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

abc4857
Copy link

@abc4857 abc4857 commented Sep 6, 2017

I added support for translating debug info (line numbers, local variable names, types and signatures and parameter names) from dex to jar. It is enabled by using the --debug flag.

@abc4857
Copy link
Author

abc4857 commented Sep 6, 2017

The output is correct but if you're using Procyon there's a bug that causes a NullPointerException when there's instructions between the first store to a register and the LocalVariableTable entry start_pc of the variable (I reported it here). A workaround that solves many (but not all) of these errors is replacing line 2684 in AstBuilder.java with:

if ((vDef == null || (vDef.getScopeStart() != -1 && vDef.getScopeEnd() != -1)) 
    && b.operand instanceof VariableReference
    && variablesMatch(vRef, (VariableReference) b.operand)) {

@Storyyeller
Copy link
Owner

I don't feel comfortable merging this without having spent time personally testing it, but you're welcome to tell people to use your branch if they want debug info.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants