On Thu Dec 29 21:46:28 2022 +0000, Evan Tang wrote:
I added an implementation for that if you want to look it over (and test it with your tls exe) (The TMP commit I plan to squash onto previous commits before merge, don't worry about the name)
I had a look...
I changed a bit your first patch (about introducing dbg_module in winedbg): - IMO, we should keep the loaded module list in winedbg in sync with dbghelp... so don't have two separate functions... nothing critical, mostly stylish
The last (TMP) didn't work with my local tests. Moreover: - current code (before your patches) didn't expect at all the WOW64 situation (32bit debuggee and 64bit debuggeer). - reduced a bunch of PE format reading by mapping the DLL image and using Rtl* functions that already implement it. - So I reworked it.
You can find the two modified patches attached here [patch.tls](/uploads/d2230ff815ddfa90f674439dfbc52b7d/patch.tls). They've been successfully tested with and without the ntdll patch applied (and in the three cases of bitness: 32/32, 64/64 and 64/32).
So these two patches should be first in serie, and the ntdll last.