# Renode TLib Workflow (Placeholder)

Commands here are subject to change.

* [Building](#building)
* [Running Qemu without debugging](#running-qemu-without-debugging)
* [Running Qemu with debugging](#running-qemu-with-debugging)
* [Running gdb for Qemu](#running-gdb-for-qemu)
  * [Run gdb on the target elf](#run-gdb-on-the-target-elf)
* [Running gdb for Renode](#running-gdb-for-renode)
  * [Setup .gdbinit file](#setup-.gdbinit-file)
* [Running Renode](#running-renode)

## Building

```
m springbok
m qemu_clean qemu
m renode_clean renode
```

Note: as we continually make changes to renode, will have to `m renode_clean renode` to apply updates:

`m renode_clean renode`


## Running Qemu without debugging

```
qemu_sim_springbok ./out/springbok/test_vsetvl/test_vsetvl.elf
```

## Running Qemu with debugging

```
qemu_sim_springbok ./out/springbok/test_vsetvl/test_vsetvl.elf -s -S
```

## Running gdb for Qemu

### Run gdb on the target elf

Note, same as for Renode but with `target remote :1234`

```sh
riscv32-unknown-elf-gdb out/springbok/test_vsetvl/test_vsetvl.elf \
  -ex "target remote :1234" \
  -ex "layout split" \
  -ex "b main" \
  -ex "c"
```
## Running gdb for Renode

```sh
riscv32-unknown-elf-gdb out/springbok/test_vsetvl/test_vsetvl.elf \
  -ex "target remote :3333" \
  -ex "monitor start" \
  -ex "sysbus.cpu2 IsHalted False" \
  -ex "layout split" \
  -ex "b main" \
  -ex "c"
```
### Setup .gdbinit file

Save the following to `${HOME}/.gdbinit`:

```
set auto-load safe-path /
handle SIGXCPU SIG33 SIG35 SIG36 SIG37 SIG38 SIGPWR nostop noprint

define mono_backtrace
 select-frame 0
 set $i = 0
 while ($i < $arg0)
   set $foo = (char*) mono_pmip ($pc)
   if ($foo)
     printf "#%d %p in %s\n", $i, $pc, $foo
   else
     frame
   end
   up-silently
   set $i = $i + 1
 end
end

define mono_stack
 set $mono_thread = mono_thread_current ()
 if ($mono_thread == 0x00)
   printf "No mono thread associated with this thread\n"
 else
   set $ucp = malloc (sizeof (ucontext_t))
   call (void) getcontext ($ucp)
   call (void) mono_print_thread_dump ($ucp)
   call (void) free ($ucp)
 end
end
```


## Running Renode

```sh
gdb -ex "set breakpoint pending on" \
  -ex "set pagination off" \
  -ex "b helper_vsetvl" \
  -ex "layout split" \
  -ex "r" \
  --args mono \
  --debug out/host/renode/Renode.exe  \
  -e "\$bin=@out/springbok/test_vsetvl/test_vsetvl.elf; i @sim/config/springbok.resc;" \
  --disable-xwt \
  --console
```

