Gdb misdetects threads (SA_ONSTACK?)
Valery Ushakov <[email protected]>
| Newsgroups | gmane.os.netbsd.devel.toolchain |
|---|---|
| Message-ID | <Y7Qdhhp8pXtxiD/[email protected]> |
On a ~month old current, GNU gdb (GDB) 11.0.50.20200914-git seems to get very confused. My uninformed guess is it's alternative stacks for signal handlers that confuse it and make it think a program is threaded when it's not. E.g. $ gdb -q --args ./Self ... Reading symbols from ./Self... (No debugging symbols found in ./Self) (gdb) r ... ^C Thread 2 received signal SIGINT, Interrupt. [Switching to process 1470] 0x0818be0e in zone::flushZombies() () (gdb) info threads Id Target Id Frame 1 LWP 1470 of process 1470 "" 0x0818be0e in zone::flushZombies() () * 2 process 1470 0x0818be0e in zone::flushZombies() () (gdb) display/i $eip 1: x/i $eip => 0x818be0e <_ZN4zone12flushZombiesEv+86>: mov %eax,-0x20(%ebp) (gdb) si [New process 1470] /home/uwe/work/netbsd/ro/src/external/gpl3/gdb/lib/libgdb/../../dist/gdb/infrun.c:5683: internal-error: int finish_step_over(execution_control_state*): Assertion `ecs->event_thread->control.trap_expected' failed. A problem internal to GDB has been detected, further debugging may prove unreliable. Quit this debugging session? (y or n) (gdb) display/i $eip 1: x/i $eip => 0x818be0e <_ZN4zone12flushZombiesEv+86>: mov %eax,-0x20(%ebp) (gdb) si [New process 1470] /home/uwe/work/netbsd/ro/src/external/gpl3/gdb/lib/libgdb/../../dist/gdb/infrun.c:5683: internal-error: int finish_step_over(execution_control_state*): Assertion `ecs->event_thread->control.trap_expected' failed. A problem internal to GDB has been detected, further debugging may prove unreliable. Quit this debugging session? (y or n) -uwe