I am planning on using gdb_monitor to debug components I write, but it doesn't seem to work. I have tried all the run scripts, and none of them succeed at attaching the debugger. I looked for any recent applicable commits in genodelabs/master, but none of them are more recent than the 16.05 release which my personal repo is currently based on. Here is the output from gdb_monitor.run:
int main(): --- create local services --- int main(): --- start init --- int main(): transferred 86 MB to init [init] parent provides [init] service "ROM" [init] service "RAM" [init] service "IRQ" [init] service "IO_MEM" [init] service "IO_PORT" [init] service "PD" [init] service "RM" [init] service "CPU" [init] service "LOG" [init] child "timer" [init] RAM quota: 1863680 [init] ELF binary: timer [init] priority: 0 [init] provides service Timer [init] child "uart_drv" [init] RAM quota: 1863680 [init] ELF binary: uart_drv [init] priority: 0 [init] provides service Terminal [init] provides service Uart [init] child "gdb_monitor" [init] RAM quota: 3960832 [init] ELF binary: gdb_monitor [init] priority: 0 [init] child "timer" announces service "Timer" [init -> uart_drv] --- i8250 UART driver started --- [init] child "uart_drv" announces service "Uart" [init] child "uart_drv" announces service "Terminal" [init -> gdb_monitor] usinGDB monitor is up, starting GDB spawn /usr/local/genode-gcc/bin/genode-x86-gdb bin/ld.lib.so -n -ex target remote localhost:5555 -ex set interactive-mode off -ex b binary_ready_hook_for_gdb -ex c -ex delete 1 -ex file bin/test-gdb_monitor -ex b main -ex set solib-search-path bin -ex sharedlibrary -ex c -ex delete 2 2&>1
----- test: breakpoint in 'main()' -----
g the pipe libc plugin [init -> gdb_monitor] int sigaction(int, const sigaction*, sigaction*): sigaction not implemented [init -> gdb_monitor] Process target created; pid = 1 [init -> gdb_monitor] unsupported ioctl (request=0x40047477) [init -> gdb_monitor] unsupported ioctl (request=0x80047476) [init -> uart_drv] Baudrate is not defined. Use default 115200 GNU gdb (GDB) 7.3.1 Copyright (C) 2011 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html
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-unknown-linux-gnu --target=x86_64-pc-elf". For bug reporting instructions, please see: http://www.gnu.org/software/gdb/bugs/... Reading symbols from /home/kingtux/genode/build/nova_x86_64/bin/ld.lib.so...[init -> gdb_monitor] Remote debugging using /dev/terminal [init -> gdb_monitor] fcntl(): command 4 args 66 not supported - terminal [init -> gdb_monitor] fcntl(): command 6 args 4294967295 not supported - terminal int main(): --- init created, waiting for exit condition --- done. Don't know how to attach. Try "help target". GDB can't read core files on this machine. localhost:5555: Connection timed out. Breakpoint 1 at 0xafd10: file /home/kingtux/genode/repos/base/src/lib/ldso/debug.cc, line 21. The program is not being run. Load new symbol table from "/home/kingtux/genode/build/nova_x86_64/bin/test-gdb_monitor"? (y or n) [answered Y; input not from terminal] Reading symbols from /home/kingtux/genode/build/nova_x86_64/bin/test-gdb_monitor...done. Breakpoint 2 at 0x1001678: file /home/kingtux/genode/repos/ports/src/test/gdb_monitor/main.cc, line 93. The program is not being run. (gdb) *** Error: Breakpoint in main() did not trigger Makefile:261: recipe for target 'run/gdb_monitor' failed make: *** [run/gdb_monitor] Error 255
Hello,
the following line looks suspicious.
On Wed, Jun 29, 2016 at 11:17:13PM -0600, Nobody III wrote:
localhost:5555: Connection timed out.
The run script instructs Qemu to listen on localhost:5555 and redirect the data stream to a emulated serial device in the VM. The issue seems unrelated to the Genode system. What's your Qemu version? I personally build Qemu 2.3.1 (git hash dfa83a6ba) from the sources with
./configure --target-list=i386-softmmu,x86_64-softmmu,arm-softmmu \ --disable-docs --disable-vnc-tls --disable-vnc-ws --disable-uuid && \ make -j
and the GDB related tests work flawlessly with 16.05.
Regards
Thanks. Upgrading Qemu fixed the problem.
On Thu, Jun 30, 2016 at 1:06 AM, Christian Helmuth < christian.helmuth@...1...> wrote:
Hello,
the following line looks suspicious.
On Wed, Jun 29, 2016 at 11:17:13PM -0600, Nobody III wrote:
localhost:5555: Connection timed out.
The run script instructs Qemu to listen on localhost:5555 and redirect the data stream to a emulated serial device in the VM. The issue seems unrelated to the Genode system. What's your Qemu version? I personally build Qemu 2.3.1 (git hash dfa83a6ba) from the sources with
./configure --target-list=i386-softmmu,x86_64-softmmu,arm-softmmu \ --disable-docs --disable-vnc-tls --disable-vnc-ws --disable-uuid && \ make -j
and the GDB related tests work flawlessly with 16.05.
Regards
Christian Helmuth Genode Labs
http://www.genode-labs.com/ · http://genode.org/ https://twitter.com/GenodeLabs · /ˈdʒiː.nəʊd/
Genode Labs GmbH · Amtsgericht Dresden · HRB 28424 · Sitz Dresden Geschäftsführer: Dr.-Ing. Norman Feske, Christian Helmuth
Attend Shape: An AT&T Tech Expo July 15-16. Meet us at AT&T Park in San Francisco, CA to explore cutting-edge tech and listen to tech luminaries present their vision of the future. This family event has something for everyone, including kids. Get more information and register today. http://sdm.link/attshape _______________________________________________ genode-main mailing list genode-main@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/genode-main