Remove noux_gdb.run script

This interactive run script is not regularly tested nor used.

Issue #3696
This commit is contained in:
Norman Feske 2020-03-17 14:50:43 +01:00
parent c086bba71a
commit 951f484fad
2 changed files with 0 additions and 273 deletions

View File

@ -1,62 +0,0 @@
#
# Utility functions for run scripts using Noux GDB
#
#
# Return the name of the Noux GDB package for the configured platform
#
proc noux_gdb_pkg_name { } {
if {[have_spec arm]} {
return "gdb_arm"
} elseif {[have_spec x86]} {
return "gdb_x86"
}
}
#
# Create a tar archive for a Noux application and its shared libraries (unstripped)
#
proc create_binary_tar { application_name application_binaries } {
foreach application_binary ${application_binaries} {
exec tar ufv bin/${application_name}.tar -h -C debug ${application_binary}
}
}
#
# Create a tar archive for the source code of a Noux application and its shared
# libraries.
#
# Currently, directories need to have their own tar records
#
proc create_source_tar { application_name application_binaries } {
exec mkdir -p bin/${application_name}-src
foreach application_binary $application_binaries {
set binary debug/[kernel_specific_binary ${application_binary} silent]
puts "archive sources of $binary"
set source_files [ exec [cross_dev_prefix]objdump -dl $binary | grep "^/.*:.*" | sed -e "s/:.*//" | uniq ]
foreach source_file ${source_files} {
# resolve '..' to avoid problems with 'tar' with parts like '/a/b/../'
# where '/a' exists, but '/a/b' does not
set source_file [file normalize ${source_file}]
if [file exists ${source_file}] {
set dirname [ exec dirname ${source_file}]
exec mkdir -p bin/${application_name}-src${dirname}
exec ln -sf ${source_file} bin/${application_name}-src${source_file}
}
}
}
exec tar chf bin/${application_name}-src.tar -C bin/${application_name}-src .
}
#
# Create tar archives for binaries and source code of a Noux application
#
proc create_binary_and_source_tars { application_name application_binaries } {
create_binary_tar ${application_name} ${application_binaries}
create_source_tar ${application_name} ${application_binaries}
}

View File

@ -1,211 +0,0 @@
if {!([have_spec nova])} {
puts "\nThe Noux GDB scenario is only supported for NOVA\n"
exit 0
}
create_boot_directory
import_from_depot [depot_user]/src/[base_src] \
[depot_user]/pkg/[drivers_interactive_pkg] \
[depot_user]/pkg/terminal \
[depot_user]/src/init \
[depot_user]/src/libc \
[depot_user]/src/ncurses \
[depot_user]/src/noux \
[depot_user]/src/posix \
[depot_user]/src/stdcxx
source ${genode_dir}/repos/ports/run/noux_gdb.inc
if {[have_spec arm]} { set tool_prefix "genode-arm-" }
if {[have_spec x86]} { set tool_prefix "genode-x86-" }
#
# Uncomment the following line when working on the GDB source code. Otherwise,
# the package may get recompiled, yet it does not get reinstalled into 'bin/'.
#
#exec rm -rf noux-pkg/[noux_gdb_pkg_name]/ bin/[noux_gdb_pkg_name]/
set build_components {
server/terminal_crosslink
app/gdb_monitor
}
lappend build_components "lib/gdbserver_platform-$::env(KERNEL)"
lappend_if [have_spec nova] build_components lib/ld/nova
lappend_if [have_spec foc] build_components lib/ld/foc
lappend build_components noux-pkg/[noux_gdb_pkg_name]
# the application to be debugged with GDB
lappend build_components test/gdb_monitor
set gdb_target_binary_name test-gdb_monitor
build $build_components
# 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
}
# names of the binaries needed for the GDB monitor test
set gdb_target_binaries {
test-gdb_monitor
ld.lib.so
libc.lib.so vfs.lib.so
libm.lib.so
posix.lib.so
}
lappend gdb_target_binaries ${gdb_target_binary_name}
create_binary_and_source_tars ${gdb_target_binary_name} ${gdb_target_binaries}
append config {
<config verbose="yes">
<parent-provides>
<service name="ROM"/>
<service name="LOG"/>
<service name="RM"/>
<service name="CPU"/>
<service name="PD"/>
<service name="IRQ"/>
<service name="IO_PORT"/>
<service name="IO_MEM"/>
</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="drivers" caps="1000">
<resource name="RAM" quantum="32M" constrain_phys="yes"/>
<binary name="init"/>
<route>
<service name="ROM" label="config"> <parent label="drivers.config"/> </service>
<service name="Timer"> <child name="timer"/> </service>
<any-service> <parent/> </any-service>
</route>
<provides>
<service name="Input"/> <service name="Framebuffer"/>
</provides>
</start>
<start name="terminal_noux">
<binary name="terminal"/>
<resource name="RAM" quantum="2M"/>
<provides><service name="Terminal"/></provides>
<route>
<service name="ROM" label="config"> <parent label="terminal.config"/> </service>
<any-service> <parent/> <any-child/> </any-service>
</route>
</start>
<start name="terminal_gdb">
<binary name="terminal_crosslink"/>
<resource name="RAM" quantum="1M"/>
<provides> <service name="Terminal"/> </provides>
</start>
<start name="gdb_monitor" caps="200">
<resource name="RAM" quantum="16M"/>
<route>
<service name="Terminal"><child name="terminal_gdb"/></service>
<any-service><parent/><any-child/></any-service>
</route>
<config>
<vfs> <dir name="dev"> <log/> <terminal/> </dir> </vfs>
<libc stdout="/dev/log" stderr="/dev/log"/> }
append config "
<target name=\"${gdb_target_binary_name}\"> "
append config {
<config>
<vfs> <dir name="dev"> <log/> </dir> </vfs>
<libc stdout="/dev/log" stderr="/dev/log"/>
</config>
</target>
<preserve name="RAM" quantum="5M"/>
</config>
</start>
<start name="noux" caps="300">
<resource name="RAM" quantum="1G"/>
<route>
<service name="Terminal" label="">
<child name="terminal_noux"/>
</service>
<service name="Terminal" label="/dev/gdb">
<child name="terminal_gdb"/>
</service>
<any-service><parent/><any-child/></any-service>
</route>
<config>
<fstab> }
append config "
<tar name=\"[noux_gdb_pkg_name].tar\" at=\"/\"/>"
append config {
<dir name="dev"><terminal name="gdb" label="/dev/gdb"/></dir>
<dir name="gdb"> }
append config "
<tar name=\"${gdb_target_binary_name}.tar\"/>
<dir name=\"src\"> <tar name=\"${gdb_target_binary_name}-src.tar\"/> </dir> "
append config {
</dir>
</fstab> }
append config "
<start name=\"/bin/${tool_prefix}gdb\">
<arg value=\"/gdb/ld.lib.so\"/> "
append config {
<arg value="-ex" /><arg value="set interactive-mode off" />
<arg value="-ex" /><arg value="directory /gdb/src" />
<arg value="-ex" /><arg value="target remote /dev/gdb" />
<arg value="-ex" /><arg value="b binary_ready_hook_for_gdb" />
<arg value="-ex" /><arg value="c" />
<arg value="-ex" /><arg value="delete 1" /> }
append config "
<arg value=\"-ex\" /><arg value=\"file /gdb/${gdb_target_binary_name}\" /> "
append config {
<arg value="-ex" /><arg value="b main" />
<arg value="-ex" /><arg value="set solib-search-path /gdb" />
<arg value="-ex" /><arg value="sharedlibrary" />
<arg value="-ex" /><arg value="c" />
<arg value="-ex" /><arg value="delete 2" />
<arg value="-ex" /><arg value="set interactive-mode auto" />
</start>
</config>
</start>
</config>
}
install_config $config
#
# Boot modules
#
# evaluated by the run tool
proc binary_name_gdbserver_platform_lib_so { } {
return "gdbserver_platform-$::env(KERNEL).lib.so"
}
set boot_modules {
terminal_crosslink
expat.lib.so
libc_pipe.lib.so
gdb_monitor gdbserver_platform.lib.so test-gdb_monitor
test-gdb_monitor.tar test-gdb_monitor-src.tar
}
lappend boot_modules [noux_gdb_pkg_name].tar
build_boot_image $boot_modules
run_genode_until forever