diff options
author | Pedro Alves <pedro@palves.net> | 2024-05-03 17:39:16 +0100 |
---|---|---|
committer | Pedro Alves <pedro@palves.net> | 2024-05-03 17:39:17 +0100 |
commit | ccdb88758417d7c196fd12743c59eff31bffafa3 (patch) | |
tree | 2d6e0dd15d24bf282b742a49614bb70051172c47 /COPYING.LIB | |
parent | 67fe874896e575f8f9fd510e73d080cd3281814c (diff) | |
download | binutils-ccdb88758417d7c196fd12743c59eff31bffafa3.zip binutils-ccdb88758417d7c196fd12743c59eff31bffafa3.tar.gz binutils-ccdb88758417d7c196fd12743c59eff31bffafa3.tar.bz2 |
Adjust gdb_continue_to_end for Windows
On Cygwin, supposely single-threaded programs are always
multi-threaded, due to the extra threads spawned by the Cygwin
runtime. Because of that, any gdb_continue_to_end call that doesn't
specify "allow_extra" fails, like so:
(gdb) PASS: gdb.base/langs.exp: show language at main
continue
Continuing.
[Thread 16140.0x1fbc exited with code 0]
[Thread 16140.0x2458 exited with code 0]
[Thread 16140.0x3494 exited with code 0]
[Inferior 1 (process 16140) exited normally]
(gdb) FAIL: gdb.base/langs.exp: continue until exit at first session (the program exited)
Similarly, with this simple program compiled with MinGW:
$ cat ~/sleeper.c
#include <windows.h>
int main ()
{
Sleep (2000);
return 0;
}
and with a MinGW GDB, I see:
(gdb) start
...
(gdb) info threads
Id Target Id Frame
* 1 Thread 15292.0x3850 main () at /home/alves/sleeper.c:5
2 Thread 15292.0x3048 0x00007ff9630d2fb7 in ntdll!ZwWaitForWorkViaWorkerFactory () from C:\Windows\SYSTEM32\ntdll.dll
(gdb) c
Continuing.
[Thread 15292.0x3850 exited with code 0]
[Inferior 1 (process 15292) exited normally]
(gdb)
This commit adjusts gdb_continue_to_end to expect the thread exited
messages, on Cygwin and MinGW.
Change-Id: I5e410a7252c11cd9ecea632f1e00c2a7fcd69098
Approved-By: Andrew Burgess <aburgess@redhat.com>
Diffstat (limited to 'COPYING.LIB')
0 files changed, 0 insertions, 0 deletions