sherlock@m1:~/repos/qemu/build$ gdb qemu-riscv64 GNU gdb (Ubuntu 9.2-0ubuntu1~20.04) 9.2 Copyright (C) 2020 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 "aarch64-linux-gnu". Type "show configuration" for configuration details. For bug reporting instructions, please see: <http://www.gnu.org/software/gdb/bugs/>. Find the GDB manual and other documentation resources online at: <http://www.gnu.org/software/gdb/documentation/>.
For help, type "help". Type "apropos word" to search for commands related to "word"... Reading symbols from qemu-riscv64... warning: File "/home/sherlock/repos/qemu/.gdbinit" auto-loading has been declined by your `auto-load safe-path' set to "$debugdir:$datadir/auto-load". To enable execution of this file add add-auto-load-safe-path /home/sherlock/repos/qemu/.gdbinit line to your configuration file "/home/sherlock/.gdbinit". To completely disable this security protection add set auto-load safe-path / line to your configuration file "/home/sherlock/.gdbinit". For more information about this security protection see the --Type <RET> for more, q to quit, c to continue without paging-- "Auto-loading safe path" section in the GDB manual. E.g., run from the shell: info "(gdb)Auto-loading safe path" (gdb) set args ~/a.out (gdb) b tcg_gen_code Breakpoint 1 at 0x179e68: file ../tcg/tcg.c, line 4159. (gdb) r Starting program: /home/sherlock/repos/qemu/build/qemu-riscv64 ~/a.out [Thread debugging using libthread_db enabled] Using host libthread_db library "/lib/aarch64-linux-gnu/libthread_db.so.1". [New Thread 0xfffff7971150 (LWP 548388)]
Thread 1 "qemu-riscv64" hit Breakpoint 1, tcg_gen_code (s=0xaaaaaae88e88 <tcg_init_ctx>, tb=tb@entry=0xffffe8000080 <code_gen_buffer+52>) at ../tcg/tcg.c:4159 warning: Source file is more recent than executable. 4159 { (gdb) bt #0 tcg_gen_code (s=0xaaaaaae88e88 <tcg_init_ctx>, tb=tb@entry=0xffffe8000080 <code_gen_buffer+52>) at ../tcg/tcg.c:4159 #1 0x0000aaaaaac1a3b4 in tb_gen_code (cpu=cpu@entry=0xaaaaaaec7d90, pc=pc@entry=66376, cs_base=cs_base@entry=0, flags=flags@entry=24832, cflags=0) at ../accel/tcg/translate-all.c:1496 #2 0x0000aaaaaac563fc in cpu_exec (cpu=cpu@entry=0xaaaaaaec7d90) at ../accel/tcg/cpu-exec.c:945 #3 0x0000aaaaaab5e224 in cpu_loop (env=0xaaaaaaed0110) at ../linux-user/riscv/cpu_loop.c:37 #4 0x0000aaaaaab484b8 in main (argc=<optimized out>, argv=<optimized out>, envp=<optimized out>) at ../linux-user/main.c:885 (gdb)