JesusFreke@JesusFreke.com
c604ed6c1a
Add .hashcode and .equals to EncodedCatchHandler and EncodedTypeAddrPair, so that the TryListBuilder can build a unique hash to avoid duplicate EncodedCatchHandler entries
...
git-svn-id: https://smali.googlecode.com/svn/trunk@424 55b6fa8a-2a1e-11de-a435-ffa8d773f76a
2009-08-28 03:58:42 +00:00
JesusFreke@JesusFreke.com
0da75f71eb
Initialize the offset of ClassDefItems to -1 before placing them
...
git-svn-id: https://smali.googlecode.com/svn/trunk@423 55b6fa8a-2a1e-11de-a435-ffa8d773f76a
2009-08-26 04:42:18 +00:00
JesusFreke@JesusFreke.com
e88cdf2010
If the ArrayData pseudo instruction has an odd size, write out a final padding byte
...
git-svn-id: https://smali.googlecode.com/svn/trunk@422 55b6fa8a-2a1e-11de-a435-ffa8d773f76a
2009-08-26 03:08:55 +00:00
JesusFreke@JesusFreke.com
59cc9d09b7
Sort the ClassDefItems by offset after placing them
...
git-svn-id: https://smali.googlecode.com/svn/trunk@421 55b6fa8a-2a1e-11de-a435-ffa8d773f76a
2009-08-26 03:07:57 +00:00
JesusFreke@JesusFreke.com
af88d65aac
Compare values using compareTo, not compareValue
...
git-svn-id: https://smali.googlecode.com/svn/trunk@420 55b6fa8a-2a1e-11de-a435-ffa8d773f76a
2009-08-26 02:38:23 +00:00
JesusFreke@JesusFreke.com
97da4a7699
Check for nulls
...
git-svn-id: https://smali.googlecode.com/svn/trunk@419 55b6fa8a-2a1e-11de-a435-ffa8d773f76a
2009-08-25 02:33:40 +00:00
JesusFreke@JesusFreke.com
3c48a886bd
Add padding if needed
...
git-svn-id: https://smali.googlecode.com/svn/trunk@418 55b6fa8a-2a1e-11de-a435-ffa8d773f76a
2009-08-25 02:33:18 +00:00
JesusFreke@JesusFreke.com
4da483a55b
use assert. duh
...
git-svn-id: https://smali.googlecode.com/svn/trunk@417 55b6fa8a-2a1e-11de-a435-ffa8d773f76a
2009-08-25 02:14:35 +00:00
JesusFreke@JesusFreke.com
e9c67dbb9c
use unsigned shift while writing an unsigned leb128
...
git-svn-id: https://smali.googlecode.com/svn/trunk@416 55b6fa8a-2a1e-11de-a435-ffa8d773f76a
2009-08-25 01:16:26 +00:00
JesusFreke@JesusFreke.com
2773319471
Fixes for a few instruction formats that have a blank byte after the opcode
...
git-svn-id: https://smali.googlecode.com/svn/trunk@415 55b6fa8a-2a1e-11de-a435-ffa8d773f76a
2009-08-25 00:58:14 +00:00
JesusFreke@JesusFreke.com
c74042b943
Add a convenience method that accepts a string instead of a StringIdItem
...
git-svn-id: https://smali.googlecode.com/svn/trunk@414 55b6fa8a-2a1e-11de-a435-ffa8d773f76a
2009-08-24 05:48:14 +00:00
JesusFreke@JesusFreke.com
3687f27ddd
When interning an item, don't forget to add the item to the items list
...
git-svn-id: https://smali.googlecode.com/svn/trunk@413 55b6fa8a-2a1e-11de-a435-ffa8d773f76a
2009-08-24 05:47:29 +00:00
JesusFreke@JesusFreke.com
7eca83ddb6
Various changes mostly relating to changing the getInterned* item methods to accept lists instead of arrays
...
git-svn-id: https://smali.googlecode.com/svn/trunk@412 55b6fa8a-2a1e-11de-a435-ffa8d773f76a
2009-08-24 05:46:45 +00:00
JesusFreke@JesusFreke.com
eb21bb1783
use java's assert
...
git-svn-id: https://smali.googlecode.com/svn/trunk@411 55b6fa8a-2a1e-11de-a435-ffa8d773f76a
2009-08-24 05:45:10 +00:00
JesusFreke@JesusFreke.com
83e6f4bb60
Changed the "from-scratch" constructor in the format classes to a static emit method
...
git-svn-id: https://smali.googlecode.com/svn/trunk@410 55b6fa8a-2a1e-11de-a435-ffa8d773f76a
2009-08-24 05:42:49 +00:00
JesusFreke@JesusFreke.com
f75a5c351c
Change getInternedAnnotationDirectoryItem to accept lists of composite item+annotation objects instead of separate arrays of everything
...
git-svn-id: https://smali.googlecode.com/svn/trunk@409 55b6fa8a-2a1e-11de-a435-ffa8d773f76a
2009-08-23 20:08:52 +00:00
JesusFreke@JesusFreke.com
ea64b6e653
Change TypeListItem constructor to take an array rather than a list, to be consistent with other classes
...
git-svn-id: https://smali.googlecode.com/svn/trunk@408 55b6fa8a-2a1e-11de-a435-ffa8d773f76a
2009-08-23 07:11:42 +00:00
JesusFreke@JesusFreke.com
11503ec26e
Merged in DebugInfoBuilder.java from the prior dexlib, and fixed it up to work with the new dexlib
...
git-svn-id: https://smali.googlecode.com/svn/trunk@407 55b6fa8a-2a1e-11de-a435-ffa8d773f76a
2009-08-23 06:28:54 +00:00
JesusFreke@JesusFreke.com
3080fb1bfc
Merged in TryListBuilder.java from the prior dexlib, and fixed it up to work with the new dexlib
...
git-svn-id: https://smali.googlecode.com/svn/trunk@406 55b6fa8a-2a1e-11de-a435-ffa8d773f76a
2009-08-23 05:05:04 +00:00
JesusFreke@JesusFreke.com
1877b664de
When making a ClassDataItem from scratch, sort the fields and methods
...
git-svn-id: https://smali.googlecode.com/svn/trunk@405 55b6fa8a-2a1e-11de-a435-ffa8d773f76a
2009-08-23 03:43:19 +00:00
JesusFreke@JesusFreke.com
b90597bd9b
When making a ClassDefItem from scratch, sort the static field initializers appropriately
...
git-svn-id: https://smali.googlecode.com/svn/trunk@404 55b6fa8a-2a1e-11de-a435-ffa8d773f76a
2009-08-23 03:41:27 +00:00
JesusFreke@JesusFreke.com
f49271eb8f
Include the size of the map header during placement
...
git-svn-id: https://smali.googlecode.com/svn/trunk@403 55b6fa8a-2a1e-11de-a435-ffa8d773f76a
2009-08-22 22:00:50 +00:00
JesusFreke@JesusFreke.com
66146deb47
Write out the map header
...
git-svn-id: https://smali.googlecode.com/svn/trunk@402 55b6fa8a-2a1e-11de-a435-ffa8d773f76a
2009-08-22 21:52:34 +00:00
JesusFreke@JesusFreke.com
6389c5bc6b
Fix an issue with how encoded booleans are written
...
git-svn-id: https://smali.googlecode.com/svn/trunk@401 55b6fa8a-2a1e-11de-a435-ffa8d773f76a
2009-08-21 07:02:15 +00:00
JesusFreke@JesusFreke.com
cf483d2e13
- Remove duplicate annotation of the padding
...
- fix the calculation of the encoded handlers size, based on the presence or absence of the catch all handler
git-svn-id: https://smali.googlecode.com/svn/trunk@400 55b6fa8a-2a1e-11de-a435-ffa8d773f76a
2009-08-21 06:54:12 +00:00
JesusFreke@JesusFreke.com
b133198ba8
Write the debug info offset, not index
...
git-svn-id: https://smali.googlecode.com/svn/trunk@399 55b6fa8a-2a1e-11de-a435-ffa8d773f76a
2009-08-21 06:14:33 +00:00
JesusFreke@JesusFreke.com
4d68e05fb5
Changes to dump annotation format
...
git-svn-id: https://smali.googlecode.com/svn/trunk@398 55b6fa8a-2a1e-11de-a435-ffa8d773f76a
2009-08-21 02:50:07 +00:00
JesusFreke@JesusFreke.com
d9dd571427
Changes to dump annotation format
...
git-svn-id: https://smali.googlecode.com/svn/trunk@397 55b6fa8a-2a1e-11de-a435-ffa8d773f76a
2009-08-12 06:05:03 +00:00
JesusFreke@JesusFreke.com
97df898839
Implemented getFileSize(), getDataSize() and getDataOffset()
...
git-svn-id: https://smali.googlecode.com/svn/trunk@396 55b6fa8a-2a1e-11de-a435-ffa8d773f76a
2009-08-11 08:13:35 +00:00
JesusFreke@JesusFreke.com
1a5d95115b
redid annotations for HeaderItem
...
git-svn-id: https://smali.googlecode.com/svn/trunk@395 55b6fa8a-2a1e-11de-a435-ffa8d773f76a
2009-08-11 08:12:55 +00:00
JesusFreke@JesusFreke.com
f5f30468ad
refactored the options a bit
...
git-svn-id: https://smali.googlecode.com/svn/trunk@394 55b6fa8a-2a1e-11de-a435-ffa8d773f76a
2009-08-11 08:12:23 +00:00
JesusFreke@JesusFreke.com
a7ea38929b
use the offset for the CodeItem, not the index
...
git-svn-id: https://smali.googlecode.com/svn/trunk@393 55b6fa8a-2a1e-11de-a435-ffa8d773f76a
2009-08-11 05:26:59 +00:00
JesusFreke@JesusFreke.com
5c0670b2da
Don't write out the value_type in ArrayEncodedSubValue
...
git-svn-id: https://smali.googlecode.com/svn/trunk@392 55b6fa8a-2a1e-11de-a435-ffa8d773f76a
2009-08-11 05:24:56 +00:00
JesusFreke@JesusFreke.com
99d01fb803
Fixed the writing logic
...
git-svn-id: https://smali.googlecode.com/svn/trunk@391 55b6fa8a-2a1e-11de-a435-ffa8d773f76a
2009-08-11 05:20:40 +00:00
JesusFreke@JesusFreke.com
0cd5e5258b
Missed writing some fields
...
git-svn-id: https://smali.googlecode.com/svn/trunk@390 55b6fa8a-2a1e-11de-a435-ffa8d773f76a
2009-08-11 04:52:38 +00:00
JesusFreke@JesusFreke.com
5240d96f41
Fixed an issue with the logic that determines if the padding field should be written before the tries/handlers
...
git-svn-id: https://smali.googlecode.com/svn/trunk@389 55b6fa8a-2a1e-11de-a435-ffa8d773f76a
2009-08-11 04:48:34 +00:00
JesusFreke@JesusFreke.com
89c6442752
and yet more assertion tweakage
...
git-svn-id: https://smali.googlecode.com/svn/trunk@388 55b6fa8a-2a1e-11de-a435-ffa8d773f76a
2009-08-11 04:34:30 +00:00
JesusFreke@JesusFreke.com
3f81d20782
more assertion tweakage
...
git-svn-id: https://smali.googlecode.com/svn/trunk@387 55b6fa8a-2a1e-11de-a435-ffa8d773f76a
2009-08-11 04:13:09 +00:00
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
3c23129eec
Added support for writing parameter registers with the p<n> syntax
...
git-svn-id: https://smali.googlecode.com/svn/trunk@376 55b6fa8a-2a1e-11de-a435-ffa8d773f76a
2009-08-08 23:44:28 +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