Fix showtrace.py for changed objdump output format

Signed-off-by: Clifford Wolf <clifford@clifford.at>
This commit is contained in:
Clifford Wolf 2018-05-25 21:13:14 +02:00
parent 1cc9784d71
commit 4fed27fc16
2 changed files with 2 additions and 2 deletions

View File

@ -281,7 +281,7 @@ Support for the timer is always disabled when ENABLE_IRQ is set to 0.
#### ENABLE_TRACE (default = 0)
Produce an execution trace using the `trace_valid` and `trace_data` output ports.
For a demontration of this feature run `make testbench.vcd` to create a trace file
For a demontration of this feature run `make test_vcd` to create a trace file
and then run `python3 showtrace.py testbench.trace firmware/firmware.elf` to decode
it.

View File

@ -11,7 +11,7 @@ with subprocess.Popen(["riscv32-unknown-elf-objdump", "-d", elf_filename], stdou
while True:
line = proc.stdout.readline().decode("ascii")
if line == '': break
match = re.match(r'^\s*([0-9a-f]+):\s+(\S+)\s*(.*)', line)
match = re.match(r'^\s*([0-9a-f]+):\s+([0-9a-f]+)\s*(.*)', line)
if match: insns[int(match.group(1), 16)] = (int(match.group(2), 16), match.group(3).replace("\t", " "))
with open(trace_filename, "r") as f: