Hello,
I have recently began looking at Genode for a project I am working on and I am
having trouble with running the GDB run scripts. So far I have experimented
with the following three:
- monitor
- monitor_gdb
- monitor_gdb_interactive
NOTE The command that I used to run is the following:
make -C build/x86_64 run/<run script> KERNEL=hw BOARD=pc
The monitor script runs successfully. However, the monitor_gdb script crashes
soon after launch with the warning that too many hardware breakpoints have
already been set (see corresponding log below) . The monitor_gdb_interactive
script launches a terminal for a brief second, however it too crashes (I
presume it is the same error as with the monitor_gdb script). I have attached
the corresponding log files below.
I have not altered any of the run scripts. The only changes I made were to the
build/x86_64/etc/build.conf file which I have attached below.
I would also like to mention that I tried to run:
make -C build/x86_64 run/<run script> KERNEL=linux BOARD=linux
but it also failed (see log below).
Any help will be greatly appreciated!
Kind regards,
Rumen Mitov
including /home/rumen/genode/tool/run/power_on/linux
including /home/rumen/genode/tool/run/log/linux
including /home/rumen/genode/tool/run/boot_dir/linux
including /home/rumen/genode/repos/os/run/monitor.run
Run script is not supported on this platform
including /home/rumen/genode/tool/run/power_on/qemu
including /home/rumen/genode/tool/run/log/qemu
including /home/rumen/genode/tool/run/image/iso
including /home/rumen/genode/tool/run/boot_dir/hw
including /home/rumen/genode/repos/os/run/monitor_gdb_interactive.run
update depot: /home/rumen/genode/tool/depot/create genodelabs/bin/x86_64/base-hw-pc genodelabs/bin/x86_64/init genodelabs/bin/x86_64/monitor genodelabs/bin/x86_64/sandbox CROSS_DEV_PREFIX=/usr/local/genode/tool/23.05/bin/genode-x86- DEPOT_DIR=/home/rumen/genode/depot UPDATE_VERSIONS=1 FORCE=1 REBUILD= CCACHE=1 -j4
make[1]: Entering directory '/home/rumen/genode/build/x86_64'
[00;33mcreated[0m genodelabs/api/monitor/2024-05-28
[00;33mcreated[0m genodelabs/api/base-hw/2024-05-28
[00;33mcreated[0m genodelabs/api/os/2024-05-28
[00;33mcreated[0m genodelabs/api/report_session/2023-05-26
[00;33mcreated[0m genodelabs/api/sandbox/2023-10-03
[00;33mcreated[0m genodelabs/api/base/2024-05-28
[00;33mcreated[0m genodelabs/api/terminal_session/2023-05-26
[00;33mcreated[0m genodelabs/api/timer_session/2023-10-03
[00;33mcreated[0m genodelabs/src/init/2024-05-28
[00;33mcreated[0m genodelabs/src/sandbox/2024-05-28
[00;33mcreated[0m genodelabs/src/monitor/2024-05-28
[00;33mcreated[0m genodelabs/src/base-hw-pc/2024-05-28
make[1]: Leaving directory '/home/rumen/genode/build/x86_64'
building targets: lib/ld test/monitor_gdb test/log drivers/uart
spawn make lib/ld test/monitor_gdb test/log drivers/uart
make[1]: Entering directory '/home/rumen/genode/build/x86_64'
Skip target drivers/uart/spec/pbxa9 because it requires 'arm_v7'
[00;33mLibrary[0m ld.abi.so
[00;33mLibrary[0m ldso_so_support.lib.a
[00;33mLibrary[0m base-hw-common.lib.a
[00;33mLibrary[0m startup-hw.lib.a
[00;33mLibrary[0m syscall-hw.lib.a
[00;33mLibrary[0m cxx.lib.a
[00;33mLibrary[0m timeout-hw.lib.a
[00;33mLibrary[0m base-hw.lib.a
[00;33mLibrary[0m ld-hw.lib.so
[00;33mLibrary[0m ld.lib.so
[00;33mLibrary[0m base.lib.a
[01;33mProgram[0m drivers/uart/spec/x86/pc_uart_drv
[01;33mProgram[0m test/log/test-log
[01;33mProgram[0m test/monitor_gdb/test-monitor_gdb
make[1]: Leaving directory '/home/rumen/genode/build/x86_64'
genode build completed
checking configuration syntax
CHECK init
using 'ld-hw.lib.so' as 'ld.lib.so'
core link address is 0xffffffc000000000
install bootloader
creating ISO image...
spawn qemu-system-x86_64 -s -display none -serial stdio -serial chardev:uart -chardev socket,id=uart,port=5555,host=localhost,server,nowait,ipv4 -m 800 -cdrom var/run/monitor_gdb_interactive.iso -machine q35 -cpu Nehalem-v2 -net nic,model=e1000,netdev=net0 -netdev user,id=net0
qemu-system-x86_64: -chardev socket,id=uart,port=5555,host=localhost,server,nowait,ipv4: warning: short-form boolean option 'server' deprecated
Please use server=on instead
qemu-system-x86_64: -chardev socket,id=uart,port=5555,host=localhost,server,nowait,ipv4: warning: short-form boolean option 'nowait' deprecated
Please use wait=off instead
qemu-system-x86_64: -chardev socket,id=uart,port=5555,host=localhost,server,nowait,ipv4: warning: short-form boolean option 'ipv4' deprecated
Please use ipv4=on instead
qemu-system-x86_64: warning: TCG doesn't support requested feature: CPUID.07H:EDX.spec-ctrl [bit 26]
Bender Version 0.9-beta7-51-g28ba2ad-dirty
Patching BDA with I/O port 0x3f8.
Bender: Hello World.
[0m
kernel initialized[0m
[34mWarning: TSC: family 6 Intel platform info reports bus frequency of 0[0m
[34mWarning: TSC: calibration not yet implemented, using fixed value of 2400 MHz[0m
Genode 24.05[0m
787 MiB RAM and 64533 caps assigned to init[0m
[init -> terminal] --- UART driver started ---[0m[0m
[init -> terminal] open IRQ 3[0m
[init -> terminal] [0m[0m
[init -> terminal] [34mWarning: baud_rate 0 not supported, set to default[0m
[init -> terminal] [0m[0m
[init -> monitor] monitor ready[0m[0m
[init -> monitor -> test-log] hex range: [0e00,1680)[0m[0m
[init -> monitor -> test-log] empty hex range: [0abc0000,0abc0000) (empty!)[0m[0m
[init -> monitor -> test-log] hex range to limit: [f8,ff][0m[0m
[init -> monitor -> test-log] invalid hex range: [f8,08) (overflow!)[0m[0m
[init -> monitor -> test-log] negative hex char: 0xfe[0m[0m
[init -> monitor -> test-log] positive hex char: 0x02[0m[0m
[init -> monitor -> test-log] floating point: 1.70[0m[0m
[init -> monitor -> test-log] multiarg string: "parent -> child.7"[0m[0m
[init -> monitor -> test-log] String(Hex(3)): 0x3[0m[0m
[init -> monitor -> test-log] Very long messages:[0m[0m
[init -> monitor -> test-log -> log] 1.....................................................................................................................................................................................................................................2[0m
[init -> monitor -> test-log] 3.....................................................................................................................................................................................................................................4[0m
[init -> monitor -> test-log] 5.....................................................................................................................................................................................................................................6[0m
[init -> monitor -> test-log] [0m[0m
[init -> monitor -> test-log] Test done.[0m[0m
qemu-system-x86_64: terminating on signal 2
Run script execution successful.
including /home/rumen/genode/tool/run/power_on/qemu
including /home/rumen/genode/tool/run/log/qemu
including /home/rumen/genode/tool/run/image/iso
including /home/rumen/genode/tool/run/boot_dir/hw
including /home/rumen/genode/repos/os/run/monitor_gdb.run
update depot: /home/rumen/genode/tool/depot/create genodelabs/bin/x86_64/base-hw-pc genodelabs/bin/x86_64/init genodelabs/bin/x86_64/monitor genodelabs/bin/x86_64/sandbox CROSS_DEV_PREFIX=/usr/local/genode/tool/23.05/bin/genode-x86- DEPOT_DIR=/home/rumen/genode/depot UPDATE_VERSIONS=1 FORCE=1 REBUILD= CCACHE=1 -j4
make[1]: Entering directory '/home/rumen/genode/build/x86_64'
[00;33mcreated[0m genodelabs/api/monitor/2024-05-28
[00;33mcreated[0m genodelabs/api/base-hw/2024-05-28
[00;33mcreated[0m genodelabs/api/os/2024-05-28
[00;33mcreated[0m genodelabs/api/report_session/2023-05-26
[00;33mcreated[0m genodelabs/api/sandbox/2023-10-03
[00;33mcreated[0m genodelabs/api/base/2024-05-28
[00;33mcreated[0m genodelabs/api/terminal_session/2023-05-26
[00;33mcreated[0m genodelabs/api/timer_session/2023-10-03
[00;33mcreated[0m genodelabs/src/init/2024-05-28
[00;33mcreated[0m genodelabs/src/sandbox/2024-05-28
[00;33mcreated[0m genodelabs/src/monitor/2024-05-28
[00;33mcreated[0m genodelabs/src/base-hw-pc/2024-05-28
make[1]: Leaving directory '/home/rumen/genode/build/x86_64'
building targets: lib/ld test/monitor_gdb test/log drivers/uart
spawn make lib/ld test/monitor_gdb test/log drivers/uart
make[1]: Entering directory '/home/rumen/genode/build/x86_64'
Skip target drivers/uart/spec/pbxa9 because it requires 'arm_v7'
[00;33mLibrary[0m ld.abi.so
[00;33mLibrary[0m ldso_so_support.lib.a
[00;33mLibrary[0m base-hw-common.lib.a
[00;33mLibrary[0m startup-hw.lib.a
[00;33mLibrary[0m syscall-hw.lib.a
[00;33mLibrary[0m cxx.lib.a
[00;33mLibrary[0m timeout-hw.lib.a
[00;33mLibrary[0m base-hw.lib.a
[00;33mLibrary[0m ld-hw.lib.so
[00;33mLibrary[0m ld.lib.so
[00;33mLibrary[0m base.lib.a
[01;33mProgram[0m drivers/uart/spec/x86/pc_uart_drv
[01;33mProgram[0m test/log/test-log
[01;33mProgram[0m test/monitor_gdb/test-monitor_gdb
make[1]: Leaving directory '/home/rumen/genode/build/x86_64'
genode build completed
checking configuration syntax
CHECK init
using 'ld-hw.lib.so' as 'ld.lib.so'
core link address is 0xffffffc000000000
install bootloader
creating ISO image...
spawn qemu-system-x86_64 -s -display none -serial stdio -serial chardev:uart -chardev socket,id=uart,port=5555,host=localhost,server,nowait,ipv4 -m 800 -cdrom var/run/monitor_gdb.iso -machine q35 -cpu Nehalem-v2 -net nic,model=e1000,netdev=net0 -netdev user,id=net0
qemu-system-x86_64: -chardev socket,id=uart,port=5555,host=localhost,server,nowait,ipv4: warning: short-form boolean option 'server' deprecated
Please use server=on instead
qemu-system-x86_64: -chardev socket,id=uart,port=5555,host=localhost,server,nowait,ipv4: warning: short-form boolean option 'nowait' deprecated
Please use wait=off instead
qemu-system-x86_64: -chardev socket,id=uart,port=5555,host=localhost,server,nowait,ipv4: warning: short-form boolean option 'ipv4' deprecated
Please use ipv4=on instead
qemu-system-x86_64: warning: TCG doesn't support requested feature: CPUID.07H:EDX.spec-ctrl [bit 26]
Bender Version 0.9-beta7-51-g28ba2ad-dirty
Patching BDA with I/O port 0x3f8.
Bender: Hello World.
[0m
kernel initialized[0m
[34mWarning: TSC: family 6 Intel platform info reports bus frequency of 0[0m
[34mWarning: TSC: calibration not yet implemented, using fixed value of 2400 MHz[0m
Genode 24.05[0m
787 MiB RAM and 64533 caps assigned to init[0m
[init -> terminal] --- UART driver started ---[0m[0m
[init -> terminal] open IRQ 3[0m
[init -> terminal] [0m[0m
[init -> terminal] [34mWarning: baud_rate 0 not supported, set to default[0m
[init -> terminal] [0m[0m
[init -> monitor] monitor ready[0m[0m
spawn /usr/local/genode/tool/23.05/bin/genode-x86-gdb debug/ld.lib.so -n -ex set pagination off -ex set style enabled off -ex set interactive-mode off -ex set solib-search-path debug -ex set non-stop on -ex target extended-remote localhost:5555 -ex b binary_ready_hook_for_gdb -ex c -ex delete 1 -ex thread 2 -ex file debug/test-monitor_gdb
----- test: breakpoint in 'Main::Main()' -----
[init -> monitor -> test-log] hex range: [0e00,1680)[0m[0m
[init -> monitor -> test-log] empty hex range: [0abc0000,0abc0000) (empty!)[0m[0m
[init -> monitor -> test-log] hex range to limit: [f8,ff][0m[0m
[init -> monitor -> test-log] invalid hex range: [f8,08) (overflow!)[0m[0m
[init -> monitor -> test-log] negative hex char: 0xfe[0m[0m
[init -> monitor -> test-log] positive hex char: 0x02[0m[0m
[init -> monitor -> test-log] floating point: 1.70[0m[0m
[init -> monitor -> test-log] multiarg string: "parent -> child.7"[0m[0m
[init -> monitor -> test-log] String(Hex(3)): 0x3[0m[0m
[init -> monitor -> test-log] Very long messages:[0m[0m
[init -> monitor -> test-log -> log] 1.....................................................................................................................................................................................................................................2[0m
[init -> monitor -> test-log] 3.....................................................................................................................................................................................................................................4[0m
[init -> monitor -> test-log] 5.....................................................................................................................................................................................................................................6[0m
[init -> monitor -> test-log] [0m[0m
[init -> monitor -> test-log] Test done.[0m[0m
[35;1mGNU gdb (GDB) 13.1[m
Copyright (C) 2023 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <[32mhttp://gnu.org/licenses/gpl.html[m>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "--host=x86_64-pc-linux-gnu --target=x86_64-pc-elf".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
[32m<https://www.gnu.org/software/gdb/bugs/>[m.
Find the GDB manual and other documentation resources online at:
<[32mhttp://www.gnu.org/software/gdb/documentation/[m>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from [32mdebug/ld.lib.so[m...
Reading symbols from [32m/home/rumen/genode/build/x86_64/var/libcache/ld-hw/ld-hw.lib.so.debug[m...
Remote debugging using localhost:5555
[New inferior 2]
warning: No executable has been specified and target does not support
determining executable automatically. Try using the "file" command.
Thread 1.1 "test-monitor_gdb" stopped.
_start () at /home/rumen/genode/repos/base/src/lib/startup/spec/x86_64/crt0.s:43
43 leaq _GLOBAL_OFFSET_TABLE_(%rip), %r15
Breakpoint 1 at 0xd31e0: file /home/rumen/genode/repos/base/src/lib/ldso/debug.cc, line 21.
Continuing.
warning: No executable has been specified and target does not support
determining executable automatically. Try using the "file" command.
[New Thread 1.2]
Thread 1.2 "ep" hit Breakpoint 1, binary_ready_hook_for_gdb () at /home/rumen/genode/repos/base/src/lib/ldso/debug.cc:21
21 void binary_ready_hook_for_gdb() { }
[Switching to thread 1.2 (Thread 1.2)]
#0 binary_ready_hook_for_gdb () at /home/rumen/genode/repos/base/src/lib/ldso/debug.cc:21
21 void binary_ready_hook_for_gdb() { }
A program is being debugged already.
Are you sure you want to change the file? (y or n) [answered Y; input not from terminal]
Load new symbol table from "debug/test-monitor_gdb"? (y or n) [answered Y; input not from terminal]
Reading symbols from debug/test-monitor_gdb...
Reading symbols from /home/rumen/genode/build/x86_64/test/monitor_gdb/test-monitor_gdb.debug...
warning: remote target does not support file transfer, attempting to access files from local filesystem.
Reading symbols from /home/rumen/genode/build/x86_64/var/libcache/ld-hw/ld-hw.lib.so.stripped...
Reading symbols from /home/rumen/genode/build/x86_64/var/libcache/ld-hw/ld-hw.lib.so.debug...
warning: Unable to find dynamic linker breakpoint function.
GDB will be unable to debug shared library initializers
and track explicitly loaded dynamic code.
[?2004h(gdb) b Main::Main
[?2004l
Breakpoint 2 at 0x1000466: file /home/rumen/genode/repos/os/src/test/monitor_gdb/main.cc, line 77.
Note: automatically using hardware breakpoints for read-only addresses.
Warning:
Cannot insert hardware breakpoint 2.
Could not insert hardware breakpoints:
You may have requested too many hardware breakpoints/watchpoints.
[?2004h(gdb) c
[?2004l
Continuing.
Warning:
Cannot insert hardware breakpoint 2.
Could not insert hardware breakpoints:
You may have requested too many hardware breakpoints/watchpoints.
Command aborted.
[?2004h(gdb)
GENODE_DIR := /home/rumen/genode
BASE_DIR := $(GENODE_DIR)/repos/base
CONTRIB_DIR := $(GENODE_DIR)/contrib
# enable parallel build
MAKE += -j4
# enable use of compiler cache
CCACHE := yes
##
## Run-tool configuration
##
# create depot archives and update recipe versions automatically
RUN_OPT += --depot-auto-update
# kernel to use (nova, hw, sel4, linux, or foc)
#KERNEL ?= nova
# board to use (pc or linux)
BOARD ?= pc
# local variable for run-tool arguments that depend on the used board
BOARD_RUN_OPT(linux) = --include power_on/linux --include log/linux
BOARD_RUN_OPT(pc) = $(QEMU_RUN_OPT)
# local variable for run-tool arguments used for running scenarios in Qemu
QEMU_RUN_OPT := --include power_on/qemu --include log/qemu --include image/iso
##
## Qemu arguments, effective when using the run tool's 'power_on/qemu' back end
##
# enable GDB stub
QEMU_OPT += -s
#
# Prevent Qemu from using KVM
#
# Note: On some systems, the '-no-kvm' command-line argument is not included
# in 'qemu-system-x86_64', resulting in the error '-no-kvm: invalid option'.
# To resolve this issue, comment out or remove the QEMU_OPT line below.
#
#QEMU_OPT += -no-kvm
# enable KVM full virtualization support in Qemu
#QEMU_OPT += -enable-kvm
# use time-tested graphics backend
#QEMU_OPT += -display sdl
# add kernel-specific Qemu arguments
QEMU_OPT += $(QEMU_OPT(${KERNEL}))
ifdef BOARD
RUN_OPT += ${BOARD_RUN_OPT(${BOARD})}
endif
ifdef KERNEL
RUN_OPT += --include boot_dir/$(KERNEL)
endif
##
## Kernel-specific repository
##
ifdef KERNEL
REPOSITORIES += $(GENODE_DIR)/repos/base-$(KERNEL)
endif
##
## Repositories needed for the default demo scenario
##
REPOSITORIES += $(GENODE_DIR)/repos/base
REPOSITORIES += $(GENODE_DIR)/repos/os
REPOSITORIES += $(GENODE_DIR)/repos/demo
##
## Optional repositories
##
#
# Ports of popular open-source libraries and the C library.
#
# Make sure to execute 'make prepare' in 'libports' prior building.
#
REPOSITORIES += $(GENODE_DIR)/repos/libports
#
# Ports of popular 3rd-party applications
#
# The 'ports' repository depends on 'libc' and 'libports'.
# Make sure to execute 'make prepare' in 'ports' prior building.
#
REPOSITORIES += $(GENODE_DIR)/repos/ports
#
# Ports of the Linux TCP/IP stack and Linux drivers (USB) from the Linux kernel
#
REPOSITORIES += $(GENODE_DIR)/repos/dde_linux
#
# NetBSD file-system support
#
REPOSITORIES += $(GENODE_DIR)/repos/dde_rump
#
# High-level Genode-specific services and applications
#
# The 'gems' repository depends on 'libc' and 'libports'.
#
REPOSITORIES += $(GENODE_DIR)/repos/gems
#
# Collection of community-maintained components
#
# Please follow the instructions provided at:
#
# https://github.com/genodelabs/genode-world
#
REPOSITORIES += $(GENODE_DIR)/repos/world
#
# Drivers for x86 PC
#
REPOSITORIES += $(GENODE_DIR)/repos/pc
#
# Drivers ported from the OpenBSD
#
REPOSITORIES += $(GENODE_DIR)/repos/dde_bsd
#
# Drivers ported from iPXE
#
REPOSITORIES += $(GENODE_DIR)/repos/dde_ipxe
_______________________________________________
users mailing list -- users@lists.genode.org
To unsubscribe send an email to users-le...@lists.genode.org
Archived at
https://lists.genode.org/mailman3/hyperkitty/list/users@lists.genode.org/message/5I5NAB5ZOAHP2EYN6OKN3Z3SCJLW7T4V/