1710 Commits

Author SHA1 Message Date
Albert Gorski
8f6f59cc66 Close all smali files after it is finished writing to them.
This is important for instances where smali is invoked through the run method instead of
main.
2016-09-22 23:25:00 -07:00
Ben Gruver
bb062e9336 Fix ReflectionUtils.javaToDexName
Fixes the conversion for primitive and array types
2016-09-22 19:50:27 -07:00
Ben Gruver
1aa9df3867 Fix the ordering of methods in the post-default-method vtable calculation 2016-09-22 19:49:29 -07:00
Ben Gruver
b7f98c8758 Use --check-package-private-access by default for oat files 2016-09-19 09:08:54 -07:00
Ben Gruver
ecd89816b3 Fix up some minor issues with --normalize-virtual-methods 2016-09-19 09:08:54 -07:00
Ben Gruver
815f023e4e Use a class reference for interface methods in the vtable 2016-09-19 09:08:54 -07:00
Ben Gruver
41ba26d00a Improve the canNarrowAfterInstanceOf check when using an empty bootclasspath
If the types in question can't be resolved, we just assume that the
narrowing can't happen.
2016-09-19 09:08:54 -07:00
Ben Gruver
12a3d71759 Add the ability to specify an empty bootclasspath 2016-09-19 09:08:54 -07:00
Ben Gruver
1d26e1be09 Rename the list classpath command to list dependencies 2016-09-19 09:08:54 -07:00
Ben Gruver
31ad2bc100 Refactor how classpath loading works 2016-09-19 09:08:53 -07:00
Ben Gruver
4c77ad7617 Minor fixes to OatVersions.txt 2016-09-19 09:08:53 -07:00
Ben Gruver
86459bbb86 Use the specified api level when loading a dex file in the disassemble command 2016-09-19 09:08:53 -07:00
Ben Gruver
fb10b5731c Add AnalysisArguments.loadClassPathForDexFile 2016-09-19 09:08:53 -07:00
Ben Gruver
7e8afc4d8a Clean up DexInputCommand a bit 2016-09-19 09:08:53 -07:00
Ben Gruver
12a3fd2712 Fix an issue when using the list classpath command with an odex file 2016-09-19 09:08:53 -07:00
Ben Gruver
5544281ed6 Clean up some lint in ClassPath/ClassProto 2016-09-19 09:08:53 -07:00
Ben Gruver
db9f86dfdd Make getRegisterType throw AnalysisException instead of ExceptionWithContext
This will cause MethodAnalyzer to print more information when this occurs
2016-09-19 09:08:53 -07:00
Ben Gruver
26a4f1e603 Fix an issue with instance-of type inference
We should only infer the register type after an if-eqz/nez if it has a
single predecessor that is the instance-of instruction.
2016-09-19 09:08:53 -07:00
Ben Gruver
9ec379a561 Add support for vtable generation for post-default method ART
The interfaces are iterated over in a different order when populating the
vtable
2016-09-19 09:08:53 -07:00
Ben Gruver
d13be24e27 Don't propagate a non-narrowing conversion through a move 2016-09-17 21:30:28 -07:00
Ben Gruver
9f794030da Fix how parameter delegates are handled 2016-09-17 21:30:28 -07:00
Ben Gruver
c12b7e6e00 Change the classpath arguments to be split only by a colon 2016-09-17 21:30:28 -07:00
Ben Gruver
c9c8ddb3ef Don't manually split the classes argument for list vtables 2016-09-17 21:30:28 -07:00
Ben Gruver
fbfe388e40 The list dex command should generate an error when used on a non-zip/oat file 2016-09-17 21:30:28 -07:00
Ben Gruver
d7d995cc2d Remove the now-unused experimental opcodes flag/functionality 2016-09-17 21:30:28 -07:00
Ben Gruver
30bdb7fda9 Do a cleanup pass on the various commands/arguments/help text 2016-09-05 10:07:58 -07:00
Ben Gruver
149e989994 The list field offsets command doesn't need the --check-package-private-access parameter 2016-09-04 14:09:15 -07:00
Ben Gruver
e7e58a6996 Fix reading a dex file from a zip file 2016-09-04 14:00:01 -07:00
Ben Gruver
99394b3daf Rework and fix the --resolve-resources parameter 2016-09-04 13:58:54 -07:00
Ben Gruver
fdfb6d10f4 Update OatVersions.txt to version 86 2016-09-04 11:47:04 -07:00
Ben Gruver
763caf1ef6 Add help verbiage for the new syntax for specifying a specific dex entry
This also pulls up dex input parameter into the base DexInputCommand
2016-08-30 22:36:15 -07:00
Ben Gruver
22a2807101 Implement DexFileFactory.loadAllDexFiles 2016-08-30 22:36:15 -07:00
Ben Gruver
3587c6f2a6 Refactor DexFileFactory and implement new syntax for dex entries 2016-08-30 22:36:15 -07:00
Ben Gruver
41a5b4953c Fix the dump command to work with dex files in an oat file 2016-08-30 22:16:16 -07:00
Ben Gruver
36be93a76a Make DumpCommand a DexInputCommand 2016-08-30 22:16:16 -07:00
Ben Gruver
4254a2073a Use a java 6-friendly string joiner 2016-08-27 12:01:35 -07:00
Ben Gruver
3735d4778f Merge branch 'master' into v2.2_WIP 2016-08-27 12:01:22 -07:00
Ben Gruver
7079014a29 Add more error detail when interfaces can't be fully resolved 2016-08-23 11:38:40 -07:00
Ben Gruver
c9331f2b5b Merge pull request #423 from narayank/invoke-polymorphic
smali/dexlib: deal with invoke-polymorphic / invoke-polymorphic/range.
2016-08-17 17:02:22 -07:00
Narayan Kamath
99b80bbc5a Revert "Add lambda experimental dalvik opcodes"
This reverts commit 144951a9e9e6c87866245f2bdeebf0ebedaa0e38.
2016-08-17 13:15:18 +01:00
Narayan Kamath
afc1f15939 smali/dexlib: deal with invoke-polymorphic / invoke-polymorphic/range.
- Introduces two new instruction formats, 45cc and 4rcc. As the name suggests,
  these instructions are similar to 35c and 3rc, expect that they encode an
  additional constant pool reference in their 4th byte.

- Introduce two new instructions, invoke-polymorphic and
  invoke-polymorphic/range - used to implement signature polymorphism.

- Allow instructions to directly reference the proto_id section of the
  dex file. This involves the introduction of a new kind of reference
  (MethodProtoReference) and has the side effect of cleaning up a fair
  amount of special casing in ProtoPool.

- Disable support for ART version based switches (and remove LambdaTest
  which depends on it). Experimental lambda support and support for ART
  version based switches will be removed in a follow up change.

Bug: 30550796
Test: test-art
Test: ./gradlew build
2016-08-17 13:03:12 +01:00
Ben Gruver
a5d82813f1 Call ContextUtil.getSourcePosition on the debugger manager thread 2016-07-24 15:38:34 -07:00
Ben Gruver
3aad871652 Add more info to troubleshoot crashes related to LazyValue.getValue being null 2016-07-24 15:37:27 -07:00
Ben Gruver
a95d0a43a5 Implement SmaliClass.getPresentation
This fixes an issue when trying to use ctrl+n to find a smali class
2016-07-24 14:37:57 -07:00
Ben Gruver
6f11c52b56 Don't try to resolve smali type references when in dumb mode 2016-07-24 14:06:31 -07:00
Ben Gruver
f8f4e32240 Update smalidea to work with newer versions of IDEA
This moves from using the deprecated DebuggerSupport class to the new
JvmSteppingCommandProvider

This also bumps the minimum required IDEA version to 15
2016-07-24 14:06:31 -07:00
Ben Gruver
2709afc5f8 Bump the version number to 2.1.3 2016-07-16 13:46:49 -07:00
Ben Gruver
c347e68b46 Allow invalid register references in debug items related to locals.
Art doesn't complain about this, so we shouldn't throw an error when
encountering a dex file with something like this.
2016-07-10 21:35:07 -07:00
Ben Gruver
d5c6ffa059 Move existing smali tests to the org.jf.smali package 2016-07-10 20:04:02 -07:00
Ben Gruver
07dc76c03f Switch to jprante's jflex plugin 2016-07-09 13:42:15 -07:00