Bug 23514

Summary: target.c: default_thread_architecture: Assertion failed, while trying to record remote x86_64
Product: gdb Reporter: Emil Gedda <emil.gedda>
Component: remoteAssignee: Not yet assigned to anyone <unassigned>
Status: RESOLVED FIXED    
Severity: normal CC: emil.gedda
Priority: P2    
Version: 8.1.1   
Target Milestone: ---   
Host: Target:
Build: Last reconfirmed:
Attachments: gdb coredump

Description Emil Gedda 2018-08-11 19:20:11 UTC
Created attachment 11180 [details]
gdb coredump

By setting `record-full` on a remote qemu-system-x86_64 target and then continuing, gdb crashes with:

    target.c:3132: internal-error: gdbarch* default_thread_architecture(target_ops*, ptid_t): Assertion `inf != NULL' failed.
    A problem internal to GDB has been detected,
    further debugging may prove unreliable.
    Quit this debugging session? (y or n) y

    This is a bug, please report it.  For instructions, see:
    <http://www.gnu.org/software/gdb/bugs/>.

    target.c:3132: internal-error: gdbarch* default_thread_architecture(target_ops*, ptid_t): Assertion `inf != NULL' failed.
    A problem internal to GDB has been detected,
    further debugging may prove unreliable.


How to reproduce:

   $ qemu-system-x86_64 -S -s &
   $ gdb -q
   (gdb) target remote :1234
   ...
   (gdb) target record-full
   (gdb) c


Which will crash gdb 8.1.1. This happens regardless of what disk image is given to qemy-system-x86_64
Attached is a lz4 compressed coredump of gdb.
Comment 1 Emil Gedda 2020-07-31 08:44:17 UTC
This seems to be fixed when testing with gdb 9.1
The fix seems to have been disallowing `target record-full` on a remote qemu target.

...
(gdb) target remote :1234
Remote debugging using :1234
(gdb) target record-full
Process record: the current architecture doesn't support record function.