We used to hide current WineDbg instance when displaying processes' list
(command 'info proc'). This can potentially generate some "dangling"
processes in the hierarchy (related to this WineDbg instance):
- conhost.exe
- start.exe (when launched from unix shell without full path
to winedbg.exe)
Also, print a more comprehensive error message when trying to attach to
itself (now that debugger's PID is more easily available).
Signed-off-by: Eric Pouech <eric.pouech(a)gmail.com>
--
v2: winedbg: No longer hide current WineDbg process from 'info proc'.
https://gitlab.winehq.org/wine/wine/-/merge_requests/339
Fixes The Rising of The Shield Hero: Relieve the Animation hangs on start (and maybe something else with ENIGMA protector).
The protector implements virtual file system which hotpatches a lot of file related functions, in particular, NtOpenFile(). When NtOpenFile() is called from RtlSetCurrentDirectory_U() with peb lock held the hotpatcher takes its own lock and that can deadlock with other threads performing file / path operations ending up in get_full_path_helper() which also takes PEB lock. Once the hotpatcher is initialized the game only sets "." or the same full path as current and may do that rather often.
It seems that reopening the file handle for the same directory is redundant anyway, so probably makes sense to just avoid that part.
--
v4: ntdll: Do not open directory file when setting the same directory path.
https://gitlab.winehq.org/wine/wine/-/merge_requests/256
Currently, the two methods of setting thread names in Windows
(SetThreadDescription() and the 0x406D1388 exception) log to different channels.
I think it would be useful for these to both log to the same +threadname
channel. My thinking is that this would be similar to +debugstr, in that
all messages are human-readable descriptions which would be useful for
debugging crashes.
--
v2: ntdll: Use +threadname channel for SetThreadDescription().
ntdll: Use +threadname channel for thread rename exceptions.
https://gitlab.winehq.org/wine/wine/-/merge_requests/89