Permalink
Browse files

changed sym file format

a third column was added to help tell apart labels for code from labels
for data

code labels can't be always recognized correctly; sometimes (e.g. the
fibonacci function in the math example) they show up as other.
  • Loading branch information...
1 parent 648ffb6 commit 3bac6d39558fd87143e1e3b6196ee9e8a36cf034 @chrysn committed Apr 24, 2011
Showing with 2 additions and 2 deletions.
  1. +1 −1 tests/run.sh
  2. +1 −1 tools/output.c
View
@@ -35,7 +35,7 @@ for fn; do
echo; echo "=== $fn ==="
fi
v ../tools/evmcomp $fn || exit 1
- start=$( grep ' main$' ${fn%.evm}.sym | cut -f1 -d' ' )
+ start=$( grep ' main ' ${fn%.evm}.sym | cut -f1 -d' ' )
if $verbose; then
v ../vmsrc/evmdemo $evmopt ${fn%.evm}.bin $start
else
View
@@ -82,7 +82,7 @@ void write_symbols(FILE *f, struct evm_insn_s *insn)
sym->addr = insn->addr;
sym->next = symbols;
symbols = sym;
- fprintf(f, "%04X %s\n", insn->addr, insn->symbol);
+ fprintf(f, "%04X %s (%s)\n", insn->addr, insn->symbol, insn->data_len ? "data" : insn->opcode ? "code" : insn->set_addr ? "address" : "other");
}
write_symbols(f, insn->left);

0 comments on commit 3bac6d3

Please sign in to comment.