Changes to dump annotation format

git-svn-id: https://smali.googlecode.com/svn/trunk@397 55b6fa8a-2a1e-11de-a435-ffa8d773f76a
This commit is contained in:
JesusFreke@JesusFreke.com 2009-08-12 06:05:03 +00:00
parent 97df898839
commit d9dd571427
3 changed files with 12 additions and 2 deletions

View File

@ -519,6 +519,11 @@ public class DexFile
* signature and checksum in the header
*/
public void writeTo(AnnotatedOutput out) {
out.annotate(0, "-----------------------------");
out.annotate(0, "header item");
out.annotate(0, "-----------------------------");
out.annotate(0, " ");
HeaderItem.writeTo(out);
int sectionsPosition = 0;

View File

@ -95,7 +95,7 @@ public abstract class Item<T extends Item> implements Comparable<T> {
assert out.getCursor() == offset;
if (out.annotates()) {
out.annotate(0, "[0x" + Integer.toHexString(index) + "] " + this.getItemType().TypeName);
out.annotate(0, "[" + index + "] " + this.getItemType().TypeName);
}
out.indent();

View File

@ -106,13 +106,18 @@ public abstract class Section<T extends Item> {
* @param out the <code>AnnotatedOutput</code> object to write to
*/
protected void writeTo(AnnotatedOutput out) {
out.annotate(0, " ");
out.annotate(0, "-----------------------------");
out.annotate(0, this.ItemType.TypeName + " section");
out.annotate(0, "-----------------------------");
out.annotate(0, " ");
for (Item item: items) {
assert item!=null;
out.alignTo(ItemType.ItemAlignment);
item.writeTo(out);
out.annotate(0, " ");
}
out.annotate(0, " ");
}
/**