2023-06-28 14:56:31 +00:00
|
|
|
source ${genode_dir}/repos/os/run/monitor_gdb.inc
|
2023-05-08 14:57:57 +00:00
|
|
|
|
|
|
|
# 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]
|
|
|
|
|
2023-06-28 14:56:31 +00:00
|
|
|
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"
|
|
|
|
}
|