Write out the map header

git-svn-id: https://smali.googlecode.com/svn/trunk@402 55b6fa8a-2a1e-11de-a435-ffa8d773f76a
This commit is contained in:
JesusFreke@JesusFreke.com 2009-08-22 21:52:34 +00:00
parent 6389c5bc6b
commit 66146deb47

View File

@ -85,6 +85,11 @@ public class MapItem extends Item<MapItem> {
/** {@inheritDoc} */
protected void writeItem(AnnotatedOutput out) {
Assert.assertTrue(getOffset() > 0);
Section[] sections = dexFile.getOrderedSections();
out.annotate("map_size: 0x" + Integer.toHexString(sections.length + 2) + " (" +
Integer.toString(sections.length + 2) + ")");
out.writeInt(sections.length + 2);
int index = 0;
out.annotate(0, "[" + index++ + "]");