paul@frank:~/dev/pcsx_rearmed$ gdb-multiarch GNU gdb (Debian 12.1-3) 12.1 Copyright (C) 2022 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later 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-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". (gdb) file ./pcsx Reading symbols from ./pcsx... (gdb) set architecture powerpc:750 The target architecture is set to "powerpc:750". (gdb) set sysroot ~/dev/toolchains/powerpc/powerpc-buildroot-linux-gnu/sysroot/ (gdb) set can-use-hw-watchpoints 0 (gdb) target remote /tmp/foo Remote debugging using /tmp/foo Reading symbols from /home/paul/dev/toolchains/powerpc/powerpc-buildroot-linux-gnu/sysroot/lib/ld.so.1... 0x3f7da5cc in _start () from /home/paul/dev/toolchains/powerpc/powerpc-buildroot-linux-gnu/sysroot/lib/ld.so.1 (gdb) c Continuing. warning: Could not load shared library symbols for 2 libraries, e.g. /home/paul/dev/toolchains/powerpc/powerpc-buildroot-linux-gnu/sysroot/usr/lib/libopcodes-2.38.so. Use the "info sharedlibrary" command to see the complete listing. Do you need "set solib-search-path" or "set sysroot"? warning: File "/home/paul/dev/toolchains/powerpc/powerpc-buildroot-linux-gnu/sysroot/usr/lib/libstdc++.so.6.0.30-gdb.py" 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/paul/dev/toolchains/powerpc/powerpc-buildroot-linux-gnu/sysroot/usr/lib/libstdc++.so.6.0.30-gdb.py line to your configuration file "/home/paul/.config/gdb/gdbinit". To completely disable this security protection add set auto-load safe-path / line to your configuration file "/home/paul/.config/gdb/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" [New Thread 1.7571] [New Thread 1.7572] Thread 1 received signal SIGILL, Illegal instruction. 0x3f72d188 in CPU_haveAltiVec () from /home/paul/dev/toolchains/powerpc/powerpc-buildroot-linux-gnu/sysroot/usr/lib/libSDL-1.2.so.0 (gdb) b lightrec_start_debugger Breakpoint 1 at 0x3f61078c: lightrec_start_debugger. (2 locations) (gdb) c Continuing. Thread 1 hit Breakpoint 1, lightrec_start_debugger () at /home/paul/dev/lightrec/lightrec.c:1337 1337 pr_err("Starting debugger!\n"); (gdb) b _split_branches Breakpoint 2 at 0x3f5b1b38: file lightning.c, line 2640. (gdb) c Continuing. Thread 1 hit Breakpoint 2, 0x3f5b1b38 in _split_branches (_jit=) at lightning.c:2640 2640 for (node = _jitc->head; node; node = next) { (gdb) bt #0 0x3f5b1b38 in _split_branches (_jit=) at lightning.c:2640 #1 _jit_optimize (_jit=_jit@entry=0x40319ff0) at lightning.c:1618 #2 0x3f5b27e0 in _jit_realize (_jit=_jit@entry=0x40319ff0) at lightning.c:1876 #3 0x3f610b70 in lightrec_emit_code (state=0x38c7f010, block=0x40319fc0, size=0x40319fe0, _jit=0x40319ff0) at /home/paul/dev/lightrec/lightrec.c:766 #4 lightrec_compile_block (cstate=0x402d7180, block=block@entry=0x40319fc0) at /home/paul/dev/lightrec/lightrec.c:1438 #5 0x3f612b1c in get_next_block_func (state=0x38c7f010, pc=2148049324) at /home/paul/dev/lightrec/lightrec.c:690 #6 0x38c7e124 in ?? () #7 0x3f612bf4 in lightrec_execute (state=0x3fffe9b0, pc=, target_cycle=) at /home/paul/dev/lightrec/lightrec.c:1595 #8 0x400416c8 in lightrec_plugin_execute_block () at libpcsxcore/lightrec/plugin.c:468 #9 0x40041e8c in lightrec_plugin_execute () at libpcsxcore/lightrec/plugin.c:510 #10 0x4000f114 in main (argc=3, argv=0x3ffff004) at frontend/main.c:690 (gdb) p &((jit_state_t *)0x40319ff0)->comp->blocks.ptr[2].reglive $2 = (jit_regset_t *) 0x403188d8 (gdb) watch *$2 Watchpoint 3: *$2 (gdb) c Continuing. Thread 1 hit Watchpoint 3: *$2 Old value = 0 New value = 32 _jit_setup (block=0x403188d0, _jit=0x40319ff0) at lightning.c:2214 2214 if (value & jit_cc_a0_reg) { (gdb) bt #0 _jit_setup (block=0x403188d0, _jit=0x40319ff0) at lightning.c:2214 #1 _jit_optimize (_jit=_jit@entry=0x40319ff0) at lightning.c:1627 #2 0x3f5b27e0 in _jit_realize (_jit=_jit@entry=0x40319ff0) at lightning.c:1876 #3 0x3f610b70 in lightrec_emit_code (state=0x38c7f010, block=0x40319fc0, size=0x40319fe0, _jit=0x40319ff0) at /home/paul/dev/lightrec/lightrec.c:766 #4 lightrec_compile_block (cstate=0x402d7180, block=block@entry=0x40319fc0) at /home/paul/dev/lightrec/lightrec.c:1438 #5 0x3f612b1c in get_next_block_func (state=0x38c7f010, pc=2148049324) at /home/paul/dev/lightrec/lightrec.c:690 #6 0x38c7e124 in ?? () #7 0x3f612bf4 in lightrec_execute (state=0x3fffe9b0, pc=, target_cycle=) at /home/paul/dev/lightrec/lightrec.c:1595 #8 0x400416c8 in lightrec_plugin_execute_block () at libpcsxcore/lightrec/plugin.c:468 #9 0x40041e8c in lightrec_plugin_execute () at libpcsxcore/lightrec/plugin.c:510 #10 0x4000f114 in main (argc=3, argv=0x3ffff004) at frontend/main.c:690 (gdb) c Continuing. Thread 1 hit Watchpoint 3: *$2 Old value = 32 New value = 16777248 _jit_setup (block=0x403188d0, _jit=0x40319ff0) at lightning.c:2214 2214 if (value & jit_cc_a0_reg) { (gdb) p/t *$2 & (1 << 17) $5 = 0 (gdb) bt #0 _jit_setup (block=0x403188d0, _jit=0x40319ff0) at lightning.c:2214 #1 _jit_optimize (_jit=_jit@entry=0x40319ff0) at lightning.c:1627 #2 0x3f5b27e0 in _jit_realize (_jit=_jit@entry=0x40319ff0) at lightning.c:1876 #3 0x3f610b70 in lightrec_emit_code (state=0x38c7f010, block=0x40319fc0, size=0x40319fe0, _jit=0x40319ff0) at /home/paul/dev/lightrec/lightrec.c:766 #4 lightrec_compile_block (cstate=0x402d7180, block=block@entry=0x40319fc0) at /home/paul/dev/lightrec/lightrec.c:1438 #5 0x3f612b1c in get_next_block_func (state=0x38c7f010, pc=2148049324) at /home/paul/dev/lightrec/lightrec.c:690 #6 0x38c7e124 in ?? () #7 0x3f612bf4 in lightrec_execute (state=0x3fffe9b0, pc=, target_cycle=) at /home/paul/dev/lightrec/lightrec.c:1595 #8 0x400416c8 in lightrec_plugin_execute_block () at libpcsxcore/lightrec/plugin.c:468 #9 0x40041e8c in lightrec_plugin_execute () at libpcsxcore/lightrec/plugin.c:510 #10 0x4000f114 in main (argc=3, argv=0x3ffff004) at frontend/main.c:690 (gdb) c Continuing. Thread 1 hit Watchpoint 3: *$2 Old value = 16777248 New value = 2251791240527904 0x3f5b0d78 in _jit_follow (todo=, block=0x403188d0, _jit=0x40319ff0) at lightning.c:2276 2276 jit_regset_and(&block->regmask, &block->regmask, ®temp); (gdb) p/t *$2 & (1 << 17) $6 = 0 (gdb) bt #0 0x3f5b0d78 in _jit_follow (todo=, block=0x403188d0, _jit=0x40319ff0) at lightning.c:2276 #1 _jit_optimize (_jit=_jit@entry=0x40319ff0) at lightning.c:1639 #2 0x3f5b27e0 in _jit_realize (_jit=_jit@entry=0x40319ff0) at lightning.c:1876 #3 0x3f610b70 in lightrec_emit_code (state=0x38c7f010, block=0x40319fc0, size=0x40319fe0, _jit=0x40319ff0) at /home/paul/dev/lightrec/lightrec.c:766 #4 lightrec_compile_block (cstate=0x402d7180, block=block@entry=0x40319fc0) at /home/paul/dev/lightrec/lightrec.c:1438 #5 0x3f612b1c in get_next_block_func (state=0x38c7f010, pc=2148049324) at /home/paul/dev/lightrec/lightrec.c:690 #6 0x38c7e124 in ?? () #7 0x3f612bf4 in lightrec_execute (state=0x3fffe9b0, pc=, target_cycle=) at /home/paul/dev/lightrec/lightrec.c:1595 #8 0x400416c8 in lightrec_plugin_execute_block () at libpcsxcore/lightrec/plugin.c:468 #9 0x40041e8c in lightrec_plugin_execute () at libpcsxcore/lightrec/plugin.c:510 #10 0x4000f114 in main (argc=3, argv=0x3ffff004) at frontend/main.c:690 (gdb) p/x *$2 $8 = 0x7fffe01000020 (gdb) p/t *$2 & (1 << 17) $9 = 0 (gdb) c Continuing. Thread 1 hit Watchpoint 3: *$2 Old value = 2251791240527904 New value = 2251791241183200 _jit_follow (todo=, block=0x403188d0, _jit=0x40319ff0) at lightning.c:2276 2276 jit_regset_and(&block->regmask, &block->regmask, ®temp); (gdb) p/x *$2 $10 = 0x7fffe0109ffe0 (gdb) p/t *$2 & (1 << 17) $11 = 0 (gdb) bt #0 _jit_follow (todo=, block=0x403188d0, _jit=0x40319ff0) at lightning.c:2276 #1 _jit_optimize (_jit=_jit@entry=0x40319ff0) at lightning.c:1639 #2 0x3f5b27e0 in _jit_realize (_jit=_jit@entry=0x40319ff0) at lightning.c:1876 #3 0x3f610b70 in lightrec_emit_code (state=0x38c7f010, block=0x40319fc0, size=0x40319fe0, _jit=0x40319ff0) at /home/paul/dev/lightrec/lightrec.c:766 #4 lightrec_compile_block (cstate=0x402d7180, block=block@entry=0x40319fc0) at /home/paul/dev/lightrec/lightrec.c:1438 #5 0x3f612b1c in get_next_block_func (state=0x38c7f010, pc=2148049324) at /home/paul/dev/lightrec/lightrec.c:690 #6 0x38c7e124 in ?? () #7 0x3f612bf4 in lightrec_execute (state=0x3fffe9b0, pc=, target_cycle=) at /home/paul/dev/lightrec/lightrec.c:1595 #8 0x400416c8 in lightrec_plugin_execute_block () at libpcsxcore/lightrec/plugin.c:468 #9 0x40041e8c in lightrec_plugin_execute () at libpcsxcore/lightrec/plugin.c:510 #10 0x4000f114 in main (argc=3, argv=0x3ffff004) at frontend/main.c:690 (gdb) c Continuing. Thread 1 hit Watchpoint 3: *$2 Old value = 2251791241183200 New value = 0 0x3f392350 in memset () from /home/paul/dev/toolchains/powerpc/powerpc-buildroot-linux-gnu/sysroot/lib/libc.so.6 (gdb) bt #0 0x3f392350 in memset () from /home/paul/dev/toolchains/powerpc/powerpc-buildroot-linux-gnu/sysroot/lib/libc.so.6 #1 0x3f5a513c in jit_alloc (ptr=0x402dc50c, size=size@entry=384) at jit_memory.c:86 #2 0x3f5ae094 in jit_new_state () at lightning.c:878 #3 0x3f610968 in lightrec_compile_block (cstate=0x402d7180, block=block@entry=0x4031a020) at /home/paul/dev/lightrec/lightrec.c:1364 #4 0x3f612b1c in get_next_block_func (state=0x38c7f010, pc=2148049324) at /home/paul/dev/lightrec/lightrec.c:690 #5 0x38c7e124 in ?? () #6 0x3f612bf4 in lightrec_execute (state=0x3fffe9b0, pc=, target_cycle=) at /home/paul/dev/lightrec/lightrec.c:1595 #7 0x400416c8 in lightrec_plugin_execute_block () at libpcsxcore/lightrec/plugin.c:468 #8 0x40041e8c in lightrec_plugin_execute () at libpcsxcore/lightrec/plugin.c:510 #9 0x4000f114 in main (argc=3, argv=0x3ffff004) at frontend/main.c:690