genode/repos/os/run/monitor_gdb.run
2023-07-14 12:06:31 +02:00

24 lines
587 B
Plaintext

source ${genode_dir}/repos/os/run/monitor_gdb.inc
# sequence of GDB commands to execute at startup
set gdb_cmds ""
append gdb_cmds {-ex "target remote localhost:$local_port" }
append gdb_cmds {-ex "set style enabled off" }
# run GDB
eval spawn [gdb] debug/ld.lib.so -n $gdb_cmds
set gdb_id [list $spawn_id $genode_id]
puts ""
puts "----- test: dump memory -----"
puts ""
run_genode_until {\(gdb\)} 60 $gdb_id
send "x/x 0x1003e8b\n"
run_genode_until {\(gdb\)} 20 $gdb_id
if {![regexp {0x1003e8b:\t0x6f636e6f} $output]} {
puts stderr "*** Error: Dumped memory is not as expected"
}