This is the mail archive of the gdb-prs@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug remote/17397] i686-w64-mingw32 remote multiprocess debugging: thread.c:1002: internal-error: switch_to_thread: Assertion `inf != NULL' failed.


https://sourceware.org/bugzilla/show_bug.cgi?id=17397

--- Comment #13 from Andrew Cook <ariscop at gmail dot com> ---
It works first time because thread events will be used, on reconnect though it
has to use qfThreadInfo

when parsing thread info replies it uses remote_add_inferior, which opts to
call inferior_appeared and change the current inferiors pid rather than adding
a new inferior, causing the bug

Notice how if i switch to inferior 1 before reconnecting, after reconnect it
has inferior 2's pid:

(gdb) target extended-remote :9999
Remote debugging using :9999
Reading /usr/bin/true from remote target...
warning: File transfers from remote targets can be slow. Use "set sysroot" to
access files locally instead.
Reading /usr/bin/true from remote target...
Reading symbols from target:/usr/bin/true...Reading /usr/bin/true.debug from
remote target...
Reading /usr/bin/.debug/true.debug from remote target...
Missing separate debuginfo for target:/usr/bin/true
Try: dnf --enablerepo='*debug*' install
/usr/lib/debug/.build-id/8f/4432d7828c91a0b6650a74e10a4678c8e5fc48.debug
Reading symbols from target:/usr/bin/true...(no debugging symbols
found)...done.
(no debugging symbols found)...done.
Reading /lib64/ld-linux-x86-64.so.2 from remote target...
Reading /lib64/ld-linux-x86-64.so.2 from remote target...
Reading symbols from target:/lib64/ld-linux-x86-64.so.2...Reading symbols from
/usr/lib/debug/usr/lib64/ld-2.23.so.debug...done.
done.
0x00007ffff7dd9c80 in _start () from target:/lib64/ld-linux-x86-64.so.2
(gdb) add-inferior
Added inferior 2
(gdb) inferior 2
[Switching to inferior 2 [<null>] (<noexec>)]
(gdb) file /bin/true
Reading symbols from /bin/true...Reading symbols from /bin/true...(no debugging
symbols found)...done.
(no debugging symbols found)...done.
Missing separate debuginfos, use: dnf debuginfo-install
coreutils-8.25-5.fc24.x86_64
(gdb) b main
Breakpoint 1 at 0x14d0 (2 locations)
(gdb) r
Starting program: /usr/bin/true 
Reading /lib64/ld-linux-x86-64.so.2 from remote target...
Reading /lib64/ld-linux-x86-64.so.2 from remote target...
Reading /lib64/libc.so.6 from remote target...

Thread 2.1 "true" hit Breakpoint 1, 0x00005555555554d0 in main ()
(gdb) info inferiors
  Num  Description       Executable        
  1    process 6433      target:/usr/bin/true 
* 2    process 6502      /usr/bin/true     
(gdb) inferior 1
[Switching to inferior 1 [process 6433] (target:/usr/bin/true)]
[Switching to thread 1.1 (Thread 6433.6433)] 
#0  0x00007ffff7dd9c80 in _start () from target:/lib64/ld-linux-x86-64.so.2
(gdb) disconnect
Ending remote debugging.
(gdb) target extended-remote :9999
`target:/usr/bin/true' has disappeared; keeping its symbols.
Remote debugging using :9999
Reading /lib64/libc.so.6 from remote target...
Reading /lib64/ld-linux-x86-64.so.2 from remote target...
Reading symbols from target:/lib64/libc.so.6...Reading symbols from
/usr/lib/debug/usr/lib64/libc-2.23.so.debug...done.
done.
Reading symbols from target:/lib64/ld-linux-x86-64.so.2...Reading symbols from
/usr/lib/debug/usr/lib64/ld-2.23.so.debug...done.
done.
Reading /lib64/ld-linux-x86-64.so.2 from remote target...
0x00005555555554d0 in main ()
(gdb) info inferiors
  Num  Description       Executable        
* 1    process 6502      /usr/bin/true     
  2    <null>            /usr/bin/true     
(gdb) info threads
  Id   Target Id         Frame 
  1.1  Thread 6433.6433 "true" 
../../gdb/thread.c:1447: internal-error: switch_to_thread: Assertion `inf !=
NULL' failed.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]