hello_mxtask: Added config for gdb and qemu.

This commit is contained in:
Michael Müller
2022-07-21 13:43:32 +02:00
parent 668ea3f253
commit f76aaa0abf

View File

@@ -105,4 +105,50 @@ set boot_modules {
append_platform_drv_boot_modules
build_boot_image $boot_modules
append qemu_args "-nographic -m 64"
#
# Execute test case
#
#
set local_port 5555
# qemu config
append qemu_args " -display none -m 8000M "
# connect comport 0 to stdio
append qemu_args " -serial stdio "
# connect comport 1 with TCP port $local_port
append qemu_args " -serial chardev:uart "
append qemu_args " -chardev socket,id=uart,port=$local_port,host=localhost,server,nowait,ipv4 "
run_genode_until {.*Remote debugging using /dev/terminal.*} 30
puts "GDB monitor is up, starting GDB in a new terminal"
source ${genode_dir}/repos/ports/run/gdb_monitor.inc
# GDB loads symbols from 'debug/ld.lib.so'
if { [have_spec nova] } {
exec ln -sf ld-nova.lib.so debug/ld.lib.so
}
if { [have_spec foc] } {
exec ln -sf ld-foc.lib.so debug/ld.lib.so
}
set gdb_target_binary "test-gdb_monitor"
# sequence of GDB commands to execute at startup
set gdb_cmds ""
append gdb_cmds "-ex \"target remote localhost:$local_port\" "
append gdb_cmds [gdb_initial_breakpoint_cmds $gdb_target_binary]
# ask the user for confirmations again
append gdb_cmds {-ex "set interactive-mode auto" }
puts "command: [gdb] debug/ld.lib.so $gdb_cmds"
exec [terminal] -e "bash -lc \'[gdb] debug/ld.lib.so $gdb_cmds\'" &
interact -i [output_spawn_id]