Line 330... |
Line 330... |
`-t'
|
`-t'
|
`--trace'
|
`--trace'
|
Dump instruction just executed and any register/memory location
|
Dump instruction just executed and any register/memory location
|
chaged after each instruction (one line per instruction).
|
chaged after each instruction (one line per instruction).
|
|
|
|
`--trace-physical'
|
|
`--trace-virtual'
|
|
When tracing instructions, show the physical address
|
|
(`--trace-physical') and/or the virtual address
|
|
(`--trace-virtual') of the instruction being executed. Both flags
|
|
may be specified, in which case both physical and virtual
|
|
addresses are shown, physical first.
|
|
|
|
Note: Either or both flags may be specified without
|
|
`--trace', to indicate how addresses should be shown if
|
|
subsequently enabled by a `SIGUSER1' signal or `l.nop 8'
|
|
opcode (*note Trace Generation: Trace Generation.).
|
|
|
`-f FILE'
|
`-f FILE'
|
`--file=FILE'
|
`--file=FILE'
|
Read configuration commands from the specified file, looking first
|
Read configuration commands from the specified file, looking first
|
in the current directory, and otherwise in the `$HOME/.or1k'
|
in the current directory, and otherwise in the `$HOME/.or1k'
|
directory. If this argument is not specified, the file `sim.cfg'
|
directory. If this argument is not specified, the file `sim.cfg'
|
Line 517... |
Line 530... |
2.4 Trace Generation
|
2.4 Trace Generation
|
====================
|
====================
|
|
|
An execution trace can be generated at run time with options passed by
|
An execution trace can be generated at run time with options passed by
|
the command line, or via the operating system's signal passing
|
the command line, or via the operating system's signal passing
|
mechanism.
|
mechanism, or by `l.nop' opcodes in an application program.
|
|
|
The following, passed at run time, can be used to create an execution
|
The following flag can be used to create an execution dump.
|
dump.
|
|
|
|
`-t'
|
`-t'
|
`--trace'
|
`--trace'
|
Dump instruction just executed and any register/memory location
|
Dump instruction just executed and any register/memory location
|
chaged after each instruction (one line per instruction).
|
changed after each instruction (one line per instruction). Each
|
|
line starts with either "S" or "U" to indicate whether the
|
|
processor was in supervisor or user mode _when the instruction
|
|
completed_. It is worth bearing in mind that tracing happens at
|
|
completion of instruction execution and shows the state at that
|
|
time.
|
|
|
Passing a signal `SIGUSR1' while the simulator is running toggles trace
|
Passing a signal `SIGUSR1' while the simulator is running toggles trace
|
generation. This can be done with the following command, assuming
|
generation. This can be done with the following command, assuming
|
Or1ksim's executable name is `or32-elf-sim':
|
Or1ksim's executable name is `or32-elf-sim':
|
|
|
Line 545... |
Line 562... |
command to toggle execution trace generation:
|
command to toggle execution trace generation:
|
|
|
ps a | grep or32-elf-sim
|
ps a | grep or32-elf-sim
|
kill -SIGUSR1 _process-number_
|
kill -SIGUSR1 _process-number_
|
|
|
|
Tracing can also be enabled and disabled from within a target program
|
|
using the `l.nop 8' and `l.nop 9' opcodes to enable and disable tracing
|
|
respectively.
|
|
|
|
By default tracing will show the virtual address of each instruction
|
|
traced. This may be controlled by two options, `--trace-physical' to
|
|
show the physical address and/or `--trace-virtual' to show the virtual
|
|
address. If neither is specified, the virtual address is shown.
|
|
|
|
Note: Either or both flags may be specified without `--trace', to
|
|
indicate how addresses should be shown if subsequently enabled by a
|
|
`SIGUSER1' signal or `l.nop 8' opcode.
|
|
|
|
|
File: or1ksim.info, Node: Simulator Library, Next: Ethernet TUN/TAP Interface, Prev: Trace Generation, Up: Usage
|
File: or1ksim.info, Node: Simulator Library, Next: Ethernet TUN/TAP Interface, Prev: Trace Generation, Up: Usage
|
|
|
2.5 Simulator Library
|
2.5 Simulator Library
|
=====================
|
=====================
|
Line 3843... |
Line 3873... |
|