Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
J
jadx
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
open-source
jadx
Commits
653bb2ac
Commit
653bb2ac
authored
Mar 02, 2019
by
Skylot
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: hide first argument instead remove for constructor in inner class
parent
cbdc2496
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
6 additions
and
9 deletions
+6
-9
ClassGen.java
jadx-core/src/main/java/jadx/core/codegen/ClassGen.java
+1
-0
MethodGen.java
jadx-core/src/main/java/jadx/core/codegen/MethodGen.java
+2
-0
SSAVar.java
...src/main/java/jadx/core/dex/instructions/args/SSAVar.java
+1
-6
MethodNode.java
jadx-core/src/main/java/jadx/core/dex/nodes/MethodNode.java
+1
-2
ClassModifier.java
...e/src/main/java/jadx/core/dex/visitors/ClassModifier.java
+1
-1
No files found.
jadx-core/src/main/java/jadx/core/codegen/ClassGen.java
View file @
653bb2ac
...
...
@@ -262,6 +262,7 @@ public class ClassGen {
code
.
newLine
().
addMultiLine
(
Utils
.
getStackTrace
(
e
));
code
.
newLine
().
add
(
"*/"
);
code
.
setIndent
(
savedIndent
);
mth
.
addError
(
"Method generation error: "
+
e
.
getMessage
(),
e
);
}
}
}
...
...
jadx-core/src/main/java/jadx/core/codegen/MethodGen.java
View file @
653bb2ac
...
...
@@ -116,6 +116,8 @@ public class MethodGen {
}
else
{
mth
.
addComment
(
"JADX WARN: Incorrect number of args for enum constructor: "
+
args
.
size
()
+
" (expected >= 2)"
);
}
}
else
if
(
mth
.
contains
(
AFlag
.
SKIP_FIRST_ARG
))
{
args
=
args
.
subList
(
1
,
args
.
size
());
}
addMethodArguments
(
code
,
args
);
code
.
add
(
')'
);
...
...
jadx-core/src/main/java/jadx/core/dex/instructions/args/SSAVar.java
View file @
653bb2ac
...
...
@@ -82,12 +82,7 @@ public class SSAVar extends AttrNode {
}
public
void
removeUse
(
RegisterArg
arg
)
{
for
(
int
i
=
0
,
useListSize
=
useList
.
size
();
i
<
useListSize
;
i
++)
{
if
(
useList
.
get
(
i
)
==
arg
)
{
useList
.
remove
(
i
);
break
;
}
}
useList
.
removeIf
(
registerArg
->
registerArg
==
arg
);
}
public
void
setUsedInPhi
(
@Nullable
PhiInsn
usedInPhi
)
{
...
...
jadx-core/src/main/java/jadx/core/dex/nodes/MethodNode.java
View file @
653bb2ac
...
...
@@ -248,9 +248,8 @@ public class MethodNode extends LineAttrNode implements ILoadable, ICodeNode {
return
argsList
;
}
public
RegisterArg
remove
FirstArgument
()
{
public
void
skip
FirstArgument
()
{
this
.
add
(
AFlag
.
SKIP_FIRST_ARG
);
return
argsList
.
remove
(
0
);
}
@Nullable
...
...
jadx-core/src/main/java/jadx/core/dex/visitors/ClassModifier.java
View file @
653bb2ac
...
...
@@ -120,7 +120,7 @@ public class ClassModifier extends AbstractVisitor {
if
(!
fieldInfo
.
equals
(
field
.
getFieldInfo
())
||
!
putInsn
.
getArg
(
0
).
equals
(
arg
))
{
return
false
;
}
mth
.
remove
FirstArgument
();
mth
.
skip
FirstArgument
();
InstructionRemover
.
remove
(
mth
,
block
,
insn
);
// other arg usage -> wrap with IGET insn
if
(
arg
.
getSVar
().
getUseCount
()
!=
0
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment