mirror of
https://github.com/genodelabs/genode.git
synced 2024-12-25 00:11:07 +00:00
6a57683e52
The new monitor component at os/src/monitor is the designated successor of the gdb_monitor. This initial version, however, implements only the subset needed to inspect the memory of the monitored component(s). In contrast to the gdb_monitor, the new component supports the monitoring of multiple components, leveraging the sandbox API. It can therefore be used as a drop-in replacement for the init component. Like the gdb_monitor, the new monitor speaks the GDB protocol over Genode's terminal session. But the protocol implementation does not re-use any gdbserver code, sidestepping the complexities of POSIX. There exist two run scripts illustrating the new component. The os/run/monitor.run script exercises memory inspection via the 'm' command by letting a test program monitor itself. The os/run/monitor_gdb.run script allows for the interactive use of GDB to interact with monitored components. Issue #4917
81 lines
1.8 KiB
Plaintext
81 lines
1.8 KiB
Plaintext
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 test/monitor server/terminal_crosslink }
|
|
|
|
create_boot_directory
|
|
|
|
install_config {
|
|
<config>
|
|
<parent-provides>
|
|
<service name="LOG"/>
|
|
<service name="PD"/>
|
|
<service name="IRQ"/>
|
|
<service name="IO_MEM"/>
|
|
<service name="IO_PORT"/>
|
|
<service name="CPU"/>
|
|
<service name="ROM"/>
|
|
<service name="RM"/>
|
|
</parent-provides>
|
|
<default-route>
|
|
<any-service> <parent/> <any-child/> </any-service>
|
|
</default-route>
|
|
<default caps="100"/>
|
|
|
|
<start name="timer">
|
|
<resource name="RAM" quantum="1M"/>
|
|
<provides> <service name="Timer"/> </provides>
|
|
</start>
|
|
|
|
<start name="terminal_crosslink" caps="100">
|
|
<resource name="RAM" quantum="1M"/>
|
|
<provides> <service name="Terminal"/> </provides>
|
|
<config/>
|
|
</start>
|
|
|
|
<start name="monitor" caps="1000">
|
|
<resource name="RAM" quantum="100M"/>
|
|
<config>
|
|
<parent-provides>
|
|
<service name="LOG"/>
|
|
<service name="PD"/>
|
|
<service name="CPU"/>
|
|
<service name="ROM"/>
|
|
<service name="RM"/>
|
|
<service name="Timer"/>
|
|
<service name="Terminal"/>
|
|
</parent-provides>
|
|
<default caps="100"/>
|
|
|
|
<monitor>
|
|
<policy label="test-monitor" stop="no" wx="yes" />
|
|
</monitor>
|
|
|
|
<start name="test-monitor">
|
|
<resource name="RAM" quantum="32M"/>
|
|
<route>
|
|
<service name="PD"> <local/> </service>
|
|
<service name="CPU"> <local/> </service>
|
|
<any-service> <parent/> </any-service>
|
|
</route>
|
|
</start>
|
|
</config>
|
|
</start>
|
|
</config>
|
|
}
|
|
|
|
build_boot_image [build_artifacts]
|
|
|
|
append qemu_args "-nographic "
|
|
|
|
run_genode_until {\[init -> monitor\] child "test-monitor" exited with exit value 0.*\n} 30
|