$ gdb /home/fctorial/src/fuchsia/fuchsia/out/core.qemu-x64.zircon/kernel-x64-clang/obj/kernel/zircon.elf
GNU gdb (GDB) 9.2
Copyright (C) 2020 Free Software Foundation, Inc.
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 "x86_64-unknown-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
Find the GDB manual and other documentation resources online at:
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from /home/fctorial/src/fuchsia/fuchsia/out/core.qemu-x64.zircon/kernel-x64-clang/obj/kernel/zircon.elf...
warning: File "/home/fctorial/src/fuchsia/fuchsia/zircon/kernel/scripts/
zircon.elf-gdb.py" auto-loading has been declined by your `auto-load safe-path' set to "$debugdir:$datadir/auto-load:/nix/store/hxs99j1kx878pxxw5lbdarml69r5f1qb-gcc-9.3.0-lib".
To enable execution of this file add
add-auto-load-safe-path /home/fctorial/src/fuchsia/fuchsia/zircon/kernel/scripts/
zircon.elf-gdb.pyline to your configuration file "/home/fctorial/.gdbinit".
To completely disable this security protection add
set auto-load safe-path /
line to your configuration file "/home/fctorial/.gdbinit".
For more information about this security protection see the
"Auto-loading safe path" section in the GDB manual. E.g., run from the shell:
info "(gdb)Auto-loading safe path"
(gdb) target extended-remote :1234
Remote debugging using :1234
0x000000000000fff0 in ?? ()
(gdb) break _start
Breakpoint 1 at 0xffffffff80100050: file ../../zircon/kernel/arch/x86/start.S, line 55.
(gdb) break lk_main
Breakpoint 2 at 0xffffffff80101640: file ../../zircon/kernel/top/main.cc, line 51.
(gdb) continue
Continuing.
[Inferior 1 (process 1) exited normally]
Remote communication error. Target disconnected.: Connection reset by peer.
(gdb)
On typing continue, the os boots as normal without hitting any breakpoints. The command line shows up, and on killing qemu 'process exited normally' message appears in gdb.