Bug 23514 - target.c: default_thread_architecture: Assertion failed, while trying to record remote x86_64
Summary: target.c: default_thread_architecture: Assertion failed, while trying to reco...
Status: RESOLVED FIXED
Alias: None
Product: gdb
Classification: Unclassified
Component: remote (show other bugs)
Version: 8.1.1
: P2 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-08-11 19:20 UTC by Emil Gedda
Modified: 2020-07-31 08:44 UTC (History)
1 user (show)

See Also:
Host:
Target:
Build:
Last reconfirmed:


Attachments
gdb coredump (2.10 MB, application/x-lz4)
2018-08-11 19:20 UTC, Emil Gedda
Details

Note You need to log in before you can comment on or make changes to this bug.
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.