From 6741c3e236e8a3cb812c2028d18d7a7f91bab5f5 Mon Sep 17 00:00:00 2001 From: Michael Buesch Date: Mon, 20 Sep 2010 19:19:57 +0200 Subject: [PATCH] disassembler: Use 4 digits for code address Signed-off-by: Michael Buesch --- disassembler/args.c | 4 ++-- disassembler/main.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/disassembler/args.c b/disassembler/args.c index 45a39b0..08e3a40 100644 --- a/disassembler/args.c +++ b/disassembler/args.c @@ -103,7 +103,7 @@ static void usage(FILE *fd, int argc, char **argv) fprintf(fd, " -a|--arch ARCH The architecture type of the input file (5 or 15)\n"); fprintf(fd, " -f|--format FMT Input file format. FMT must be one of:\n"); fprintf(fd, " raw-le32, raw-be32, b43\n"); - fprintf(fd, " --paddr Print the code addresses\n"); + fprintf(fd, " -p|--paddr Print the code addresses\n"); fprintf(fd, " -u|--unkdec Decode operands of unknown instructions\n"); fprintf(fd, " -d|--debug Print verbose debugging info\n"); fprintf(fd, " Repeat for more verbose debugging\n"); @@ -134,7 +134,7 @@ int parse_args(int argc, char **argv) fprintf(stderr, "Invalid -f|--format\n"); return -1; } - } else if ((res = cmp_arg(argv, &i, "--paddr", NULL, NULL)) == ARG_MATCH) { + } else if ((res = cmp_arg(argv, &i, "--paddr", "-p", NULL)) == ARG_MATCH) { cmdargs.print_addresses = 1; } else if ((res = cmp_arg(argv, &i, "--unkdec", "-u", NULL)) == ARG_MATCH) { cmdargs.unknown_decode = 1; diff --git a/disassembler/main.c b/disassembler/main.c index 601c84a..cf716df 100644 --- a/disassembler/main.c +++ b/disassembler/main.c @@ -803,7 +803,7 @@ static void emit_asm(struct disassembler_context *ctx) switch (stmt->type) { case STMT_INSN: if (cmdargs.print_addresses) - fprintf(outfile, "/* %03X */", addr); + fprintf(outfile, "/* %04X */", addr); fprintf(outfile, "\t%s", stmt->u.insn.name); first = 1; for (i = 0; i < ARRAY_SIZE(stmt->u.insn.operands); i++) { -- 2.31.1