65 Commits

Author SHA1 Message Date
JesusFreke@JesusFreke.com
d8b31a17ae tweak assertions
git-svn-id: https://smali.googlecode.com/svn/trunk@386 55b6fa8a-2a1e-11de-a435-ffa8d773f76a
2009-08-11 04:12:39 +00:00
JesusFreke@JesusFreke.com
8922ca1c4c Align the offset before placing the map item
git-svn-id: https://smali.googlecode.com/svn/trunk@385 55b6fa8a-2a1e-11de-a435-ffa8d773f76a
2009-08-11 02:58:00 +00:00
JesusFreke@JesusFreke.com
ae7235f8df Fixed issue with size calculation in placeValue
git-svn-id: https://smali.googlecode.com/svn/trunk@384 55b6fa8a-2a1e-11de-a435-ffa8d773f76a
2009-08-11 02:56:41 +00:00
JesusFreke@JesusFreke.com
9cbb91a1be Fixed issue with size calculation in placeValue
git-svn-id: https://smali.googlecode.com/svn/trunk@383 55b6fa8a-2a1e-11de-a435-ffa8d773f76a
2009-08-11 02:34:50 +00:00
JesusFreke@JesusFreke.com
ba70af346f - added logic to keep the sections in the same place if the "in place" option is on
- added a null check to fix a null pointer exception

git-svn-id: https://smali.googlecode.com/svn/trunk@382 55b6fa8a-2a1e-11de-a435-ffa8d773f76a
2009-08-10 07:04:33 +00:00
JesusFreke@JesusFreke.com
2a8fa1a3b3 - added logic to check for registers in the debug info that are encoded as a signed LEB128, and keep the same format if the "preserve signed registers" option is on
- fixed several placement/write issues in the debug info

git-svn-id: https://smali.googlecode.com/svn/trunk@381 55b6fa8a-2a1e-11de-a435-ffa8d773f76a
2009-08-10 07:03:10 +00:00
JesusFreke@JesusFreke.com
d269393753 Fixed size calculation in placeItem
git-svn-id: https://smali.googlecode.com/svn/trunk@380 55b6fa8a-2a1e-11de-a435-ffa8d773f76a
2009-08-10 06:59:19 +00:00
JesusFreke@JesusFreke.com
14f02f4884 Fixed size calculation in placeItem
git-svn-id: https://smali.googlecode.com/svn/trunk@379 55b6fa8a-2a1e-11de-a435-ffa8d773f76a
2009-08-10 06:58:04 +00:00
JesusFreke@JesusFreke.com
626c1fed54 Fixed space issue in exception text
git-svn-id: https://smali.googlecode.com/svn/trunk@378 55b6fa8a-2a1e-11de-a435-ffa8d773f76a
2009-08-10 06:57:26 +00:00
JesusFreke@JesusFreke.com
9f6bc080a4 Added asserts to check if items are being placed in the original locations, when writing a dex file "in place"
git-svn-id: https://smali.googlecode.com/svn/trunk@377 55b6fa8a-2a1e-11de-a435-ffa8d773f76a
2009-08-10 06:57:05 +00:00
JesusFreke@JesusFreke.com
b7399b7fb3 Changed parent of CodeItem to EncodedMethod instead of MethodIdItem
git-svn-id: https://smali.googlecode.com/svn/trunk@375 55b6fa8a-2a1e-11de-a435-ffa8d773f76a
2009-08-08 22:53:52 +00:00
JesusFreke@JesusFreke.com
b99bf47d67 added getParent() method for CodeItem
git-svn-id: https://smali.googlecode.com/svn/trunk@374 55b6fa8a-2a1e-11de-a435-ffa8d773f76a
2009-08-08 21:29:02 +00:00
JesusFreke@JesusFreke.com
bc2e69f5b2 add check for null parameters value in calcHashcode()
git-svn-id: https://smali.googlecode.com/svn/trunk@369 55b6fa8a-2a1e-11de-a435-ffa8d773f76a
2009-08-06 06:47:52 +00:00
JesusFreke@JesusFreke.com
cc8c2cee0b Use the .getBytes(String) form
git-svn-id: https://smali.googlecode.com/svn/trunk@365 55b6fa8a-2a1e-11de-a435-ffa8d773f76a
2009-08-05 05:50:11 +00:00
JesusFreke@JesusFreke.com
5805483912 Fix an issue when calculating the line and address diff
git-svn-id: https://smali.googlecode.com/svn/trunk@361 55b6fa8a-2a1e-11de-a435-ffa8d773f76a
2009-08-05 04:22:13 +00:00
JesusFreke@JesusFreke.com
1e4a0716f4 Use the bytecode address, not the start offset within the encoded debug info
git-svn-id: https://smali.googlecode.com/svn/trunk@359 55b6fa8a-2a1e-11de-a435-ffa8d773f76a
2009-08-05 04:07:48 +00:00
JesusFreke@JesusFreke.com
0deaf0b93a Store the class annotations
git-svn-id: https://smali.googlecode.com/svn/trunk@357 55b6fa8a-2a1e-11de-a435-ffa8d773f76a
2009-08-05 03:56:06 +00:00
JesusFreke@JesusFreke.com
190924d10c Copied in the pom.xml from the previous dexlib
git-svn-id: https://smali.googlecode.com/svn/trunk@356 55b6fa8a-2a1e-11de-a435-ffa8d773f76a
2009-08-05 03:28:17 +00:00
JesusFreke@JesusFreke.com
83b80f81d3 Move new dexlib to trunk
git-svn-id: https://smali.googlecode.com/svn/trunk@355 55b6fa8a-2a1e-11de-a435-ffa8d773f76a
2009-08-05 03:23:36 +00:00
JesusFreke@JesusFreke.com
02017677b7 removing old dexlib
git-svn-id: https://smali.googlecode.com/svn/trunk@354 55b6fa8a-2a1e-11de-a435-ffa8d773f76a
2009-08-05 03:22:53 +00:00
JesusFreke@JesusFreke.com
e5f232f28d Fixed typo in EncodedMethod
git-svn-id: https://smali.googlecode.com/svn/trunk@288 55b6fa8a-2a1e-11de-a435-ffa8d773f76a
2009-07-28 01:49:23 +00:00
JesusFreke@JesusFreke.com
aaf4c4062a Fixed an issue with the handling of large line numbers (larger than a signed short)
git-svn-id: https://smali.googlecode.com/svn/trunk@231 55b6fa8a-2a1e-11de-a435-ffa8d773f76a
2009-07-03 02:13:54 +00:00
JesusFreke@JesusFreke.com
c6573dfb98 Removed unneeded support for making a stream
git-svn-id: https://smali.googlecode.com/svn/trunk@226 55b6fa8a-2a1e-11de-a435-ffa8d773f76a
2009-06-28 19:57:02 +00:00
JesusFreke@JesusFreke.com
a537069854 Improved version handling
git-svn-id: https://smali.googlecode.com/svn/trunk@225 55b6fa8a-2a1e-11de-a435-ffa8d773f76a
2009-06-27 04:43:53 +00:00
JesusFreke@JesusFreke.com
44682fe235 Fixed an issue where the parent references were not being populated when interning an item
git-svn-id: https://smali.googlecode.com/svn/trunk@215 55b6fa8a-2a1e-11de-a435-ffa8d773f76a
2009-06-23 06:15:43 +00:00
JesusFreke@JesusFreke.com
fdef6422d2 - Fixed an issue when trying to set a null AnnotationDirectoryItem to a ClassDefItem
- Fixed an issue when interning a CodeItem with no debug info
- Fixed an issue where the MapItem wasn't getting added to the dex file  correctly when creating a dex file from scratch

git-svn-id: https://smali.googlecode.com/svn/trunk@213 55b6fa8a-2a1e-11de-a435-ffa8d773f76a
2009-06-23 02:37:34 +00:00
JesusFreke@JesusFreke.com
281b510a9c - started writing javadoc documentation
- cleanup of DexFile, and related refactoring


git-svn-id: https://smali.googlecode.com/svn/trunk@211 55b6fa8a-2a1e-11de-a435-ffa8d773f76a
2009-06-23 01:44:36 +00:00
JesusFreke@JesusFreke.com
ec857fcecd - Added the ability to sort the offsetted sections in a way that guarantees a unique order for a given set of items (helpful when trying to compare dex files)
- Fixed an issue with decodeLong in NumberUtils


git-svn-id: https://smali.googlecode.com/svn/trunk@209 55b6fa8a-2a1e-11de-a435-ffa8d773f76a
2009-06-22 07:57:13 +00:00
JesusFreke@JesusFreke.com
6ccb8b3d2b Added a hashCode and equals method, so that interning annotations that reference items works correctly
git-svn-id: https://smali.googlecode.com/svn/trunk@208 55b6fa8a-2a1e-11de-a435-ffa8d773f76a
2009-06-21 23:43:34 +00:00
JesusFreke@JesusFreke.com
0871036088 Misc cleanup/refactoring
git-svn-id: https://smali.googlecode.com/svn/trunk@206 55b6fa8a-2a1e-11de-a435-ffa8d773f76a
2009-06-21 20:38:03 +00:00
JesusFreke@JesusFreke.com
56d16a23f6 Misc cleanup/refactoring
git-svn-id: https://smali.googlecode.com/svn/trunk@205 55b6fa8a-2a1e-11de-a435-ffa8d773f76a
2009-06-21 20:12:57 +00:00
JesusFreke@JesusFreke.com
bf4ca730cc Misc cleanup/refactoring
git-svn-id: https://smali.googlecode.com/svn/trunk@204 55b6fa8a-2a1e-11de-a435-ffa8d773f76a
2009-06-21 20:07:36 +00:00
JesusFreke@JesusFreke.com
cb83d271e5 Misc cleanup/refactoring
git-svn-id: https://smali.googlecode.com/svn/trunk@203 55b6fa8a-2a1e-11de-a435-ffa8d773f76a
2009-06-21 20:06:46 +00:00
JesusFreke@JesusFreke.com
f730ada982 Misc cleanup
git-svn-id: https://smali.googlecode.com/svn/trunk@202 55b6fa8a-2a1e-11de-a435-ffa8d773f76a
2009-06-21 08:22:27 +00:00
JesusFreke@JesusFreke.com
ed91584410 Misc cleanup
git-svn-id: https://smali.googlecode.com/svn/trunk@201 55b6fa8a-2a1e-11de-a435-ffa8d773f76a
2009-06-21 08:03:39 +00:00
JesusFreke@JesusFreke.com
b797aa581a Removed TODO
git-svn-id: https://smali.googlecode.com/svn/trunk@200 55b6fa8a-2a1e-11de-a435-ffa8d773f76a
2009-06-21 07:58:47 +00:00
JesusFreke@JesusFreke.com
64a2d18b6f Tidied up the place method
git-svn-id: https://smali.googlecode.com/svn/trunk@199 55b6fa8a-2a1e-11de-a435-ffa8d773f76a
2009-06-21 06:40:02 +00:00
JesusFreke@JesusFreke.com
b1a620218e Fixed some issues regarding how the header and map section were being writter
git-svn-id: https://smali.googlecode.com/svn/trunk@198 55b6fa8a-2a1e-11de-a435-ffa8d773f76a
2009-06-21 06:21:45 +00:00
JesusFreke@JesusFreke.com
87160fc91d Fixed an issue with the 35c format, where it returned the wrong value for the 4th register
git-svn-id: https://smali.googlecode.com/svn/trunk@197 55b6fa8a-2a1e-11de-a435-ffa8d773f76a
2009-06-21 06:19:27 +00:00
JesusFreke@JesusFreke.com
9685e92ac0 Fixed an issue where all catch items in a method were using the same set of handlers, instead of using the correct set of handlers for each region
git-svn-id: https://smali.googlecode.com/svn/trunk@194 55b6fa8a-2a1e-11de-a435-ffa8d773f76a
2009-06-21 02:43:03 +00:00
JesusFreke@JesusFreke.com
a950eddc2a Added a flag and logic to preserve the signed leb128 encoded registers in the debug info, for dumping purposes
git-svn-id: https://smali.googlecode.com/svn/trunk@182 55b6fa8a-2a1e-11de-a435-ffa8d773f76a
2009-06-20 21:34:51 +00:00
JesusFreke@JesusFreke.com
4517100574 removed unneeded values in the ItemType enumeration
git-svn-id: https://smali.googlecode.com/svn/trunk@181 55b6fa8a-2a1e-11de-a435-ffa8d773f76a
2009-06-20 20:30:57 +00:00
JesusFreke@JesusFreke.com
8c568e2b37 - added logic to set the offset and index of items when reading them in, in order to support an immediate write without having to call place (for dumping)
- moved the logic in MapItem that sorts the items for the various sections from writeTo() to place(), so that the order of items aren't changed when doing a read then immediate write (for dumping)
- changed the logic in makeBlankMapItem to get the map values from the MapValue enum, instead of hard coded values
- added logic to the OffsettedSection so that it sorts the item list by offset after reading it in, so that they items are in the same order as in the file it just read in (for dumping)

git-svn-id: https://smali.googlecode.com/svn/trunk@180 55b6fa8a-2a1e-11de-a435-ffa8d773f76a
2009-06-20 20:30:12 +00:00
JesusFreke@JesusFreke.com
1401347994 removed superfluous methods
git-svn-id: https://smali.googlecode.com/svn/trunk@179 55b6fa8a-2a1e-11de-a435-ffa8d773f76a
2009-06-20 20:24:21 +00:00
JesusFreke@JesusFreke.com
1af01ba107 changed the logic that reads in the sections to read them in a specific order, because some sections depend on others being read in first (i.e. several things depend on the string data)
git-svn-id: https://smali.googlecode.com/svn/trunk@178 55b6fa8a-2a1e-11de-a435-ffa8d773f76a
2009-06-20 20:23:12 +00:00
JesusFreke@JesusFreke.com
4ec387882d changed the logic that generates escaped strings to always use the /uxxxx format, instead of the 3 digital octal escape
git-svn-id: https://smali.googlecode.com/svn/trunk@177 55b6fa8a-2a1e-11de-a435-ffa8d773f76a
2009-06-20 20:14:15 +00:00
JesusFreke@JesusFreke.com
78314beef2 - Fixed an issue with debug info decoding, when it encountered an "end local" instruction for a register/local that hadn't been declared previously by a .local directive. This assumably happens when "ending" a parameter, in order to reuse that register for something else
git-svn-id: https://smali.googlecode.com/svn/trunk@176 55b6fa8a-2a1e-11de-a435-ffa8d773f76a
2009-06-20 20:13:10 +00:00
JesusFreke@JesusFreke.com
8bb1d77b66 - Fixed an issue when decoding the index for instructions that contain an indexed item references
git-svn-id: https://smali.googlecode.com/svn/trunk@175 55b6fa8a-2a1e-11de-a435-ffa8d773f76a
2009-06-20 20:02:58 +00:00
JesusFreke@JesusFreke.com
57b919fdf2 Fixed issue when reading an array-data pseudo instruction whose data ended in the middle of a 2-byte word
git-svn-id: https://smali.googlecode.com/svn/trunk@173 55b6fa8a-2a1e-11de-a435-ffa8d773f76a
2009-06-20 19:57:29 +00:00
JesusFreke@JesusFreke.com
3c9013f9c0 Added support for parameter names and annotations
git-svn-id: https://smali.googlecode.com/svn/trunk@172 55b6fa8a-2a1e-11de-a435-ffa8d773f76a
2009-06-19 05:40:35 +00:00