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
72c301dc
Commit
72c301dc
authored
Feb 25, 2015
by
Skylot
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
core: print error on failed method decode
parent
e8fd1e1d
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
17 additions
and
11 deletions
+17
-11
MethodGen.java
jadx-core/src/main/java/jadx/core/codegen/MethodGen.java
+13
-8
ClassNode.java
jadx-core/src/main/java/jadx/core/dex/nodes/ClassNode.java
+2
-2
ClassModifier.java
...e/src/main/java/jadx/core/dex/visitors/ClassModifier.java
+2
-1
No files found.
jadx-core/src/main/java/jadx/core/codegen/MethodGen.java
View file @
72c301dc
...
...
@@ -180,14 +180,19 @@ public class MethodGen {
public
void
addFallbackMethodCode
(
CodeWriter
code
)
{
if
(
mth
.
getInstructions
()
==
null
)
{
// load original instructions
try
{
mth
.
load
();
DepthTraversal
.
visit
(
new
FallbackModeVisitor
(),
mth
);
}
catch
(
DecodeException
e
)
{
LOG
.
error
(
"Error reload instructions in fallback mode:"
,
e
);
code
.
startLine
(
"// Can't loadFile method instructions: "
+
e
.
getMessage
());
return
;
JadxErrorAttr
errorAttr
=
mth
.
get
(
AType
.
JADX_ERROR
);
if
(
errorAttr
==
null
||
errorAttr
.
getCause
()
==
null
||
!
errorAttr
.
getCause
().
getClass
().
equals
(
DecodeException
.
class
))
{
// load original instructions
try
{
mth
.
load
();
DepthTraversal
.
visit
(
new
FallbackModeVisitor
(),
mth
);
}
catch
(
DecodeException
e
)
{
LOG
.
error
(
"Error reload instructions in fallback mode:"
,
e
);
code
.
startLine
(
"// Can't load method instructions: "
+
e
.
getMessage
());
return
;
}
}
}
InsnNode
[]
insnArr
=
mth
.
getInstructions
();
...
...
jadx-core/src/main/java/jadx/core/dex/nodes/ClassNode.java
View file @
72c301dc
...
...
@@ -222,8 +222,8 @@ public class ClassNode extends LineAttrNode implements ILoadable {
for
(
MethodNode
mth
:
getMethods
())
{
try
{
mth
.
load
();
}
catch
(
Decode
Exception
e
)
{
LOG
.
error
(
"Method load error"
,
e
);
}
catch
(
Exception
e
)
{
LOG
.
error
(
"Method load error
:
"
,
e
);
mth
.
addAttr
(
new
JadxErrorAttr
(
e
));
}
}
...
...
jadx-core/src/main/java/jadx/core/dex/visitors/ClassModifier.java
View file @
72c301dc
...
...
@@ -156,7 +156,8 @@ public class ClassModifier extends AbstractVisitor {
// remove public empty constructors
if
(
af
.
isConstructor
()
&&
af
.
isPublic
()
&&
mth
.
getArguments
(
false
).
isEmpty
())
{
&&
mth
.
getArguments
(
false
).
isEmpty
()
&&
!
mth
.
contains
(
AType
.
JADX_ERROR
))
{
List
<
BlockNode
>
bb
=
mth
.
getBasicBlocks
();
if
(
bb
==
null
||
bb
.
isEmpty
()
||
allBlocksEmpty
(
bb
))
{
mth
.
add
(
AFlag
.
DONT_GENERATE
);
...
...
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