159 Commits

Author SHA1 Message Date
Ben Gruver
3bfd77dff0 Use the term VtableIndex rather than MethodIndex for invoke-*-quick instructions/formats 2011-11-19 11:39:49 -08:00
Ben Gruver
225535b1c9 Add .gitignore files to exclude the target directory for the various modules 2011-11-19 11:39:45 -08:00
Ben Gruver
bbe539f2d2 Add support for the throw-verification-error opcode 2011-10-09 22:51:39 -04:00
Ben Gruver
cb3e0ea38a Improve the way sparse/packed switch data blocks are found and processed 2011-10-09 01:19:25 -04:00
Ben Gruver
3c4f8094a2 Fix possible issue(?) in IntegerRenderer.writeUnsignedTo 2011-07-15 13:32:36 -04:00
Ben Gruver
74c14ffcca Rename the printLongAsHex and printIntAsHex methods in IndentingWriter for clarity 2011-07-15 13:32:36 -04:00
jesusfreke@jesusfreke.com
baa030c201 Correctly escape any special characters in the value of the .source directive
git-svn-id: https://smali.googlecode.com/svn/trunk@811 55b6fa8a-2a1e-11de-a435-ffa8d773f76a
2011-06-03 01:40:23 +00:00
jesusfreke@jesusfreke.com
a564a1733b Don't forget to check if synthetic accessor comments are disabled
git-svn-id: https://smali.googlecode.com/svn/trunk@810 55b6fa8a-2a1e-11de-a435-ffa8d773f76a
2011-05-20 06:37:17 +00:00
jesusfreke@jesusfreke.com
2f376953b4 Add helper comments for synthetic member accessors
This adds a comment before a synthetic member accessor is called, which
mentions what member in the parent is being accessed

Kudos to jasta for suggesting this feature!

git-svn-id: https://smali.googlecode.com/svn/trunk@809 55b6fa8a-2a1e-11de-a435-ffa8d773f76a
2011-05-20 06:16:22 +00:00
JesusFreke@JesusFreke.com
b9a19bf3f1 Remove deodexerant and related functionality
git-svn-id: https://smali.googlecode.com/svn/trunk@797 55b6fa8a-2a1e-11de-a435-ffa8d773f76a
2010-12-21 17:33:20 +00:00
JesusFreke@JesusFreke.com
4b72225e9d Move the IndentingWriter class to the util project
git-svn-id: https://smali.googlecode.com/svn/trunk@788 55b6fa8a-2a1e-11de-a435-ffa8d773f76a
2010-08-17 13:27:58 +00:00
JesusFreke@JesusFreke.com
bbf4dbba61 Rename fileNameHandler to ClassFileNameHandler and move it to the utils project
git-svn-id: https://smali.googlecode.com/svn/trunk@787 55b6fa8a-2a1e-11de-a435-ffa8d773f76a
2010-08-17 13:27:25 +00:00
JesusFreke@JesusFreke.com
a6e5671a62 Add support for class names that differ only by case on case insensitive file systems
git-svn-id: https://smali.googlecode.com/svn/trunk@784 55b6fa8a-2a1e-11de-a435-ffa8d773f76a
2010-08-02 00:58:12 +00:00
JesusFreke@JesusFreke.com
8913c59363 Fixed issue 37, where the -b option to baksmali wasn't disabling all debug directives
git-svn-id: https://smali.googlecode.com/svn/trunk@764 55b6fa8a-2a1e-11de-a435-ffa8d773f76a
2010-06-26 11:18:41 +00:00
JesusFreke@JesusFreke.com
9c79173818 Incorporate the null check from the previous commit into the containing if statement
git-svn-id: https://smali.googlecode.com/svn/trunk@763 55b6fa8a-2a1e-11de-a435-ffa8d773f76a
2010-06-23 13:31:57 +00:00
JesusFreke@JesusFreke.com
ecc73ab3f5 Fix an NPE when there is a <clinit> with no codeItem
git-svn-id: https://smali.googlecode.com/svn/trunk@762 55b6fa8a-2a1e-11de-a435-ffa8d773f76a
2010-06-23 13:29:50 +00:00
JesusFreke@JesusFreke.com
e01409c11f Change the way unresolvable odex instructions are handled, so that it doesn't cause problems with try/catch blocks
git-svn-id: https://smali.googlecode.com/svn/trunk@737 55b6fa8a-2a1e-11de-a435-ffa8d773f76a
2010-06-12 15:55:44 +00:00
JesusFreke@JesusFreke.com
f7344d33d0 Split the logic for generating the instruction method items depending on whether we need to use the MethodAnalyzer or not
git-svn-id: https://smali.googlecode.com/svn/trunk@736 55b6fa8a-2a1e-11de-a435-ffa8d773f76a
2010-06-12 15:55:36 +00:00
JesusFreke@JesusFreke.com
fbea4e751f Cleaned up imports
git-svn-id: https://smali.googlecode.com/svn/trunk@709 55b6fa8a-2a1e-11de-a435-ffa8d773f76a
2010-04-16 07:26:08 +00:00
JesusFreke@JesusFreke.com
2371e35aae Exit on the first error by default, but add the -I option for ignoring errors and continuing with disassembly
git-svn-id: https://smali.googlecode.com/svn/trunk@701 55b6fa8a-2a1e-11de-a435-ffa8d773f76a
2010-04-03 23:03:25 +00:00
JesusFreke@JesusFreke.com
bde73b303c minor changes to option usage info
git-svn-id: https://smali.googlecode.com/svn/trunk@699 55b6fa8a-2a1e-11de-a435-ffa8d773f76a
2010-04-03 23:03:13 +00:00
JesusFreke@JesusFreke.com
db806b1261 minor reformatting - reorder the options
git-svn-id: https://smali.googlecode.com/svn/trunk@698 55b6fa8a-2a1e-11de-a435-ffa8d773f76a
2010-04-03 23:03:09 +00:00
JesusFreke@JesusFreke.com
c6734e8a60 Fix a typo in the commented out format for a packed-switch structure
git-svn-id: https://smali.googlecode.com/svn/trunk@697 55b6fa8a-2a1e-11de-a435-ffa8d773f76a
2010-04-03 23:03:06 +00:00
JesusFreke@JesusFreke.com
d293bc1eb3 Always read and write files using UTF8
git-svn-id: https://smali.googlecode.com/svn/trunk@696 55b6fa8a-2a1e-11de-a435-ffa8d773f76a
2010-04-03 23:03:01 +00:00
JesusFreke@JesusFreke.com
e861da1285 Fix the output format for the .parameter directive
git-svn-id: https://smali.googlecode.com/svn/trunk@694 55b6fa8a-2a1e-11de-a435-ffa8d773f76a
2010-04-03 23:02:52 +00:00
JesusFreke@JesusFreke.com
c1cc0e0934 Add better support for the case when an odex file has missing classes
git-svn-id: https://smali.googlecode.com/svn/trunk@693 55b6fa8a-2a1e-11de-a435-ffa8d773f76a
2010-04-03 23:02:48 +00:00
JesusFreke@JesusFreke.com
19b601436a Fix the formatting of the instruction offset comment
git-svn-id: https://smali.googlecode.com/svn/trunk@692 55b6fa8a-2a1e-11de-a435-ffa8d773f76a
2010-04-03 23:02:39 +00:00
JesusFreke@JesusFreke.com
baec3bc450 Fix the workaround for the ext.jar BCP special case
git-svn-id: https://smali.googlecode.com/svn/trunk@691 55b6fa8a-2a1e-11de-a435-ffa8d773f76a
2010-04-03 23:02:35 +00:00
JesusFreke@JesusFreke.com
306fe8753a Use the platform specific newline character/string
git-svn-id: https://smali.googlecode.com/svn/trunk@690 55b6fa8a-2a1e-11de-a435-ffa8d773f76a
2010-04-03 23:02:31 +00:00
JesusFreke@JesusFreke.com
adb1511f4e minor linewrap change
git-svn-id: https://smali.googlecode.com/svn/trunk@689 55b6fa8a-2a1e-11de-a435-ffa8d773f76a
2010-04-03 23:02:27 +00:00
JesusFreke@JesusFreke.com
0b2f7d6a57 delete IndentingPrintWriter and refactor everything to use IndentingWriter directly
git-svn-id: https://smali.googlecode.com/svn/trunk@688 55b6fa8a-2a1e-11de-a435-ffa8d773f76a
2010-04-03 23:02:16 +00:00
JesusFreke@JesusFreke.com
6eae34831f Refactor dexlib so that the output is generated directly, instead of using the StringTemplate library
git-svn-id: https://smali.googlecode.com/svn/trunk@681 55b6fa8a-2a1e-11de-a435-ffa8d773f76a
2010-04-03 23:01:17 +00:00
JesusFreke@JesusFreke.com
78bde01ad4 Add the ability to read the dependency information from an odex file, and use those dependencies as the BOOTCLASSPATH by default for odex files
git-svn-id: https://smali.googlecode.com/svn/trunk@679 55b6fa8a-2a1e-11de-a435-ffa8d773f76a
2010-04-03 23:01:03 +00:00
JesusFreke@JesusFreke.com
db26b663aa Change the way the "dead" instructions are handled, so that loops within the dead code are handled properly
git-svn-id: https://smali.googlecode.com/svn/trunk@674 55b6fa8a-2a1e-11de-a435-ffa8d773f76a
2010-03-06 06:12:30 +00:00
JesusFreke@JesusFreke.com
650725bbd3 Check for unreachable instructions and comment them out
git-svn-id: https://smali.googlecode.com/svn/trunk@673 55b6fa8a-2a1e-11de-a435-ffa8d773f76a
2010-03-06 06:12:16 +00:00
JesusFreke@JesusFreke.com
10a9518111 Add additional context information to exceptions when building a MethodDefinition object
git-svn-id: https://smali.googlecode.com/svn/trunk@672 55b6fa8a-2a1e-11de-a435-ffa8d773f76a
2010-03-06 06:12:09 +00:00
JesusFreke@JesusFreke.com
8eaecd53d3 Load all the class path classes using TempClassInfo, before starting to creating the ClassDefs for them
This fixes an issue when a class in a boot class path jar has a superclass that is in a later boot class path jar

git-svn-id: https://smali.googlecode.com/svn/trunk@669 55b6fa8a-2a1e-11de-a435-ffa8d773f76a
2010-03-04 07:44:35 +00:00
JesusFreke@JesusFreke.com
6786055f35 Move the HelpFormatter subclass to the util project and use it for both smali and baksmali
git-svn-id: https://smali.googlecode.com/svn/trunk@667 55b6fa8a-2a1e-11de-a435-ffa8d773f76a
2010-03-03 07:12:06 +00:00
JesusFreke@JesusFreke.com
c616a0dadc Add support for detecting the console width in unix and windows environments, and printing the usage info accordingly
git-svn-id: https://smali.googlecode.com/svn/trunk@666 55b6fa8a-2a1e-11de-a435-ffa8d773f76a
2010-03-03 07:11:32 +00:00
JesusFreke@JesusFreke.com
7bb8ace93b add -V option for baksmali to verify the bytecode
git-svn-id: https://smali.googlecode.com/svn/trunk@664 55b6fa8a-2a1e-11de-a435-ffa8d773f76a
2010-03-03 03:26:53 +00:00
JesusFreke@JesusFreke.com
ef24b31c98 Refactor the MethodAnalyzer API so that the instructions are returned as a read-only list
git-svn-id: https://smali.googlecode.com/svn/trunk@662 55b6fa8a-2a1e-11de-a435-ffa8d773f76a
2010-03-03 03:26:17 +00:00
JesusFreke@JesusFreke.com
00fc68adf2 Update copyright notices
git-svn-id: https://smali.googlecode.com/svn/trunk@644 55b6fa8a-2a1e-11de-a435-ffa8d773f76a
2010-02-22 07:04:58 +00:00
JesusFreke@JesusFreke.com
f25f713426 change the default value for the -r parameter to ARGS|DEST
git-svn-id: https://smali.googlecode.com/svn/trunk@642 55b6fa8a-2a1e-11de-a435-ffa8d773f76a
2010-02-22 07:02:09 +00:00
JesusFreke@JesusFreke.com
819e8b92a0 Allow multiple class path directories to be specified
git-svn-id: https://smali.googlecode.com/svn/trunk@639 55b6fa8a-2a1e-11de-a435-ffa8d773f76a
2010-02-22 07:01:40 +00:00
JesusFreke@JesusFreke.com
e9b722eab0 Misc cleanup
git-svn-id: https://smali.googlecode.com/svn/trunk@638 55b6fa8a-2a1e-11de-a435-ffa8d773f76a
2010-02-22 07:01:23 +00:00
JesusFreke@JesusFreke.com
0c65e0f4f5 Implemented deodex functionality
git-svn-id: https://smali.googlecode.com/svn/trunk@637 55b6fa8a-2a1e-11de-a435-ffa8d773f76a
2010-02-22 00:57:15 +00:00
JesusFreke@JesusFreke.com
2bdbf739bf Add a new option to add a comment line with the code offset for each instruction
git-svn-id: https://smali.googlecode.com/svn/trunk@634 55b6fa8a-2a1e-11de-a435-ffa8d773f76a
2010-02-22 00:56:14 +00:00
JesusFreke@JesusFreke.com
5b908115c0 Refactor options for baksmali
- Identified a set of options that are really only useful for debugging baksmali, and changed the short option character for them to be uppercase'
- Change the option letters for various options
- Don't display the debug options in the main usage info, but only if -? is specified twice (i.e. -??)

git-svn-id: https://smali.googlecode.com/svn/trunk@633 55b6fa8a-2a1e-11de-a435-ffa8d773f76a
2010-02-22 00:56:02 +00:00
JesusFreke@JesusFreke.com
928790f293 remove the "disable interning" functionality in dexlib
- rename the getInterned* methods to intern*
- add a lookup* method to a few item types that performs the same function, except that
it returns null if the item isn't found, instead of interning it

git-svn-id: https://smali.googlecode.com/svn/trunk@632 55b6fa8a-2a1e-11de-a435-ffa8d773f76a
2010-02-22 00:55:50 +00:00
JesusFreke@JesusFreke.com
f5defb97c0 Allow additional bootclasspath files to be added to the default, by prepending the bootclasspath value with a :
git-svn-id: https://smali.googlecode.com/svn/trunk@630 55b6fa8a-2a1e-11de-a435-ffa8d773f76a
2010-02-15 02:01:08 +00:00