proc platform_supported { } { if {[have_spec x86_64] && [have_board pc]} { if {![have_spec linux] && ![have_spec foc] && ![have_spec sel4]} { return 1 } } return 0 } if {![platform_supported]} { puts "Run script is not supported on this platform" exit 0 } build { core lib/ld init timer monitor drivers/uart test/log } create_boot_directory install_config { } build_boot_image [build_artifacts] set local_port 5555 # qemu config append qemu_args " -display none " # 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 {.*\[init -> monitor -> first-test-log\].*} 30 set genode_id [output_spawn_id] # 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" } # test for dumping memory append gdb_cmds {-ex "x/x 0x1003e8b" } # run GDB eval spawn [gdb] debug/ld.lib.so -n $gdb_cmds set gdb_id [list $spawn_id $genode_id] # show output of both GDB and Genode, supply user input to GDB interact -i $gdb_id $genode_id