mirror of
https://github.com/ringtailsoftware/uvm32.git
synced 2026-06-05 22:43:39 +00:00
Add cmdline option to host <file.bin> [max_instrs_to_run], to set instruction meter.
Allow a host to continue after a hung error, if it wants to.
So, a program with while(1) {} can be run indefinitely.
This commit is contained in:
parent
bbf5ccafb6
commit
ee2ba56423
1 changed files with 6 additions and 1 deletions
|
|
@ -103,7 +103,12 @@ static void get_safeptr(uvm32_state_t *vmst, uint32_t addr, uint32_t len, uvm32_
|
||||||
|
|
||||||
uint32_t uvm32_run(uvm32_state_t *vmst, uvm32_evt_t *evt, uint32_t instr_meter) {
|
uint32_t uvm32_run(uvm32_state_t *vmst, uvm32_evt_t *evt, uint32_t instr_meter) {
|
||||||
uint32_t num_instr = 0;
|
uint32_t num_instr = 0;
|
||||||
// uvm32_evt_syscall_buf_t b;
|
|
||||||
|
if (vmst->status == UVM32_STATUS_ERROR) {
|
||||||
|
// vm is in an error state, but user wants to continue
|
||||||
|
// most likely after UVM32_ERR_HUNG
|
||||||
|
vmst->status = UVM32_STATUS_PAUSED;
|
||||||
|
}
|
||||||
|
|
||||||
if (vmst->status != UVM32_STATUS_PAUSED) {
|
if (vmst->status != UVM32_STATUS_PAUSED) {
|
||||||
setStatusErr(vmst, UVM32_ERR_NOTREADY);
|
setStatusErr(vmst, UVM32_ERR_NOTREADY);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue