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
0d509f94
Commit
0d509f94
authored
Mar 26, 2015
by
Skylot
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
core: fix various processing issues
parent
e4fbbcf2
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
21 additions
and
8 deletions
+21
-8
BlockNode.java
jadx-core/src/main/java/jadx/core/dex/nodes/BlockNode.java
+2
-1
MethodNode.java
jadx-core/src/main/java/jadx/core/dex/nodes/MethodNode.java
+4
-2
ConstInlineVisitor.java
.../main/java/jadx/core/dex/visitors/ConstInlineVisitor.java
+6
-2
RegionMaker.java
...main/java/jadx/core/dex/visitors/regions/RegionMaker.java
+5
-1
PostTypeInference.java
...dx/core/dex/visitors/typeinference/PostTypeInference.java
+3
-1
JadxSettings.java
jadx-gui/src/main/java/jadx/gui/settings/JadxSettings.java
+1
-1
No files found.
jadx-core/src/main/java/jadx/core/dex/nodes/BlockNode.java
View file @
0d509f94
...
...
@@ -5,6 +5,7 @@ import jadx.core.dex.attributes.AType;
import
jadx.core.dex.attributes.AttrNode
;
import
jadx.core.dex.attributes.nodes.IgnoreEdgeAttr
;
import
jadx.core.dex.attributes.nodes.LoopInfo
;
import
jadx.core.utils.EmptyBitSet
;
import
jadx.core.utils.InsnUtils
;
import
java.util.ArrayList
;
...
...
@@ -24,7 +25,7 @@ public class BlockNode extends AttrNode implements IBlock {
private
List
<
BlockNode
>
cleanSuccessors
;
// all dominators
private
BitSet
doms
;
private
BitSet
doms
=
EmptyBitSet
.
EMPTY
;
// dominance frontier
private
BitSet
domFrontier
;
// immediate dominator
...
...
jadx-core/src/main/java/jadx/core/dex/nodes/MethodNode.java
View file @
0d509f94
...
...
@@ -126,9 +126,11 @@ public class MethodNode extends LineAttrNode implements ILoadable {
list
.
add
(
resultArg
);
}
insnNode
.
getRegisterArgs
(
list
);
for
(
int
i
=
0
,
listSize
=
list
.
size
();
i
<
listSize
;
i
++)
{
int
argsCount
=
list
.
size
();
for
(
int
i
=
0
;
i
<
argsCount
;
i
++)
{
if
(
list
.
get
(
i
).
getRegNum
()
>=
regsCount
)
{
throw
new
JadxRuntimeException
(
"Incorrect register number in instruction: "
+
insnNode
);
throw
new
JadxRuntimeException
(
"Incorrect register number in instruction: "
+
insnNode
+
", expected to be less than "
+
regsCount
);
}
}
}
...
...
jadx-core/src/main/java/jadx/core/dex/visitors/ConstInlineVisitor.java
View file @
0d509f94
...
...
@@ -106,13 +106,17 @@ public class ConstInlineVisitor extends AbstractVisitor {
continue
;
}
LiteralArg
litArg
;
ArgType
argType
=
arg
.
getType
();
if
(
argType
.
isObject
()
&&
literal
!=
0
)
{
argType
=
ArgType
.
NARROW_NUMBERS
;
}
if
(
use
.
size
()
==
1
||
arg
.
isTypeImmutable
())
{
// arg used only in one place
litArg
=
InsnArg
.
lit
(
literal
,
arg
.
getType
()
);
litArg
=
InsnArg
.
lit
(
literal
,
arg
Type
);
}
else
if
(
useInsn
.
getType
()
==
InsnType
.
MOVE
&&
!
useInsn
.
getResult
().
getType
().
isTypeKnown
())
{
// save type for 'move' instructions (hard to find type in chains of 'move')
litArg
=
InsnArg
.
lit
(
literal
,
arg
.
getType
()
);
litArg
=
InsnArg
.
lit
(
literal
,
arg
Type
);
}
else
{
// in most cases type not equal arg.getType()
// just set unknown type and run type fixer
...
...
jadx-core/src/main/java/jadx/core/dex/visitors/regions/RegionMaker.java
View file @
0d509f94
...
...
@@ -912,7 +912,11 @@ public class RegionMaker {
handler
.
setHandlerRegion
(
makeRegion
(
start
,
stack
));
ExcHandlerAttr
excHandlerAttr
=
start
.
get
(
AType
.
EXC_HANDLER
);
handler
.
getHandlerRegion
().
addAttr
(
excHandlerAttr
);
if
(
excHandlerAttr
==
null
)
{
LOG
.
warn
(
"Missing exception handler attribute for start block"
);
}
else
{
handler
.
getHandlerRegion
().
addAttr
(
excHandlerAttr
);
}
}
static
boolean
isEqualPaths
(
BlockNode
b1
,
BlockNode
b2
)
{
...
...
jadx-core/src/main/java/jadx/core/dex/visitors/typeinference/PostTypeInference.java
View file @
0d509f94
...
...
@@ -88,8 +88,10 @@ public class PostTypeInference {
case
CHECK_CAST:
{
ArgType
castType
=
(
ArgType
)
((
IndexInsnNode
)
insn
).
getIndex
();
RegisterArg
result
=
insn
.
getResult
();
ArgType
resultType
=
result
.
getType
();
// don't override generic types of same base class
boolean
skip
=
castType
.
isObject
()
&&
castType
.
getObject
().
equals
(
result
.
getType
().
getObject
());
boolean
skip
=
castType
.
isObject
()
&&
resultType
.
isObject
()
&&
castType
.
getObject
().
equals
(
resultType
.
getObject
());
if
(!
skip
)
{
// workaround for compiler bug (see TestDuplicateCast)
result
.
getSVar
().
setType
(
castType
);
...
...
jadx-gui/src/main/java/jadx/gui/settings/JadxSettings.java
View file @
0d509f94
...
...
@@ -18,7 +18,7 @@ public class JadxSettings extends JadxCLIArgs {
private
static
final
Font
DEFAULT_FONT
=
new
JLabel
().
getFont
();
static
final
Set
<
String
>
SKIP_FIELDS
=
new
HashSet
<
String
>(
Arrays
.
asList
(
"files"
,
"input"
,
"outputDir"
,
"printHelp"
"files"
,
"input"
,
"outputDir"
,
"
verbose"
,
"
printHelp"
));
private
String
lastOpenFilePath
=
USER_HOME
;
...
...
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