From 56bc02c7a22fe20f66d30ba5befdfb0f7856e095 Mon Sep 17 00:00:00 2001 From: Amaury Pouly Date: Fri, 22 Jul 2011 15:45:08 +0000 Subject: sbtools: add missing cariage return, implement boot mode command, add C++ style comments support git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30192 a1c6a512-1295-4272-9138-f99709370657 --- utils/sbtools/sbtoelf.c | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) (limited to 'utils/sbtools/sbtoelf.c') diff --git a/utils/sbtools/sbtoelf.c b/utils/sbtools/sbtoelf.c index 851189f05e..f421f83848 100644 --- a/utils/sbtools/sbtoelf.c +++ b/utils/sbtools/sbtoelf.c @@ -224,7 +224,15 @@ static void extract_section(int data_sec, char name[5], byte *buf, int size, con color(GREY); printf("[Bad checksum]"); } - + if(hdr->flags != 0) + { + color(GREY); + printf("["); + color(BLUE); + printf("f=%x", hdr->flags); + color(GREY); + printf("] "); + } if(hdr->opcode == SB_INST_LOAD) { struct sb_instruction_load_t *load = (struct sb_instruction_load_t *)&buf[pos]; @@ -612,8 +620,16 @@ static void extract(unsigned long filesize) printf("cnt=0x%08x", tag->len); color(OFF);printf(" | "); color(YELLOW); - printf("flg=0x%08x\n", tag->flags); + printf("flg=0x%08x", tag->flags); color(OFF); + if(tag->hdr.flags & SB_INST_LAST_TAG) + { + printf(" | "); + color(RED); + printf(" Last section"); + color(OFF); + } + printf("\n"); offset += sizeof(struct sb_instruction_tag_t); char name[5]; -- cgit v1.2.3