Commit Graph

889 Commits

Author SHA1 Message Date
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
149225a27f Set the Bytes attribute multiple times, instead of using an array of bytes
git-svn-id: https://smali.googlecode.com/svn/trunk@373 55b6fa8a-2a1e-11de-a435-ffa8d773f76a
2009-08-08 21:14:37 +00:00
fdf48625bb Refactor instruction 35c to set the Registers attribute multiple times, instead of setting it to an array
git-svn-id: https://smali.googlecode.com/svn/trunk@372 55b6fa8a-2a1e-11de-a435-ffa8d773f76a
2009-08-07 07:06:47 +00:00
7885a819a0 refactor ClassDefinition to use template attributes instead of object parameters
git-svn-id: https://smali.googlecode.com/svn/trunk@371 55b6fa8a-2a1e-11de-a435-ffa8d773f76a
2009-08-07 06:48:37 +00:00
fa7e91bff2 refactor the references to use template attributes instead of object parameters
git-svn-id: https://smali.googlecode.com/svn/trunk@370 55b6fa8a-2a1e-11de-a435-ffa8d773f76a
2009-08-06 07:15:50 +00:00
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
a3cf936fc2 refactor all the encoded value stuff to use template attributes instead of object properties
git-svn-id: https://smali.googlecode.com/svn/trunk@368 55b6fa8a-2a1e-11de-a435-ffa8d773f76a
2009-08-06 06:47:07 +00:00
cc32387e75 Fix for filled array pseudo instruction
git-svn-id: https://smali.googlecode.com/svn/trunk@367 55b6fa8a-2a1e-11de-a435-ffa8d773f76a
2009-08-06 05:22:20 +00:00
7ab77bc90b Refactoring baksmali so that the template attributes are passed in, instead of relying on reflection to get attributes from an object
git-svn-id: https://smali.googlecode.com/svn/trunk@366 55b6fa8a-2a1e-11de-a435-ffa8d773f76a
2009-08-06 05:03:52 +00:00
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
814580d4cf The stored offset is a relative offset from the position of the instruction, not an absolute offset
git-svn-id: https://smali.googlecode.com/svn/trunk@364 55b6fa8a-2a1e-11de-a435-ffa8d773f76a
2009-08-05 05:35:11 +00:00
416b72fc74 StringTemplate does't seem to want to iterate over the byte array returned by the iterator, but it works if you return an object and access the byte array as an attribute
git-svn-id: https://smali.googlecode.com/svn/trunk@363 55b6fa8a-2a1e-11de-a435-ffa8d773f76a
2009-08-05 05:33:53 +00:00
9596186473 - Return individual items from the iterator, instead of returning the same object every time
- Simplify PackedSwitchMethodItem, so that it just returns the target as a string, instead of an object

git-svn-id: https://smali.googlecode.com/svn/trunk@362 55b6fa8a-2a1e-11de-a435-ffa8d773f76a
2009-08-05 05:31:51 +00:00
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
866267dfb7 Store the string values, not the objects
git-svn-id: https://smali.googlecode.com/svn/trunk@360 55b6fa8a-2a1e-11de-a435-ffa8d773f76a
2009-08-05 04:21:38 +00:00
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
8140e9fca2 The annotation visibility should be lowercase
git-svn-id: https://smali.googlecode.com/svn/trunk@358 55b6fa8a-2a1e-11de-a435-ffa8d773f76a
2009-08-05 03:56:34 +00:00
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
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
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
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