[PATCH] [WineDbg]: when reloading a minidump, recreate all threads from the thread

Eric Pouech eric.pouech at wanadoo.fr
Sun Mar 4 13:10:41 CST 2007


record (and not just the first one)

Please use this version instead of previous one (crapola, twice this
week-end...)

A+
---

 programs/winedbg/tgt_minidump.c |   11 +++++++----
 1 files changed, 7 insertions(+), 4 deletions(-)

diff --git a/programs/winedbg/tgt_minidump.c b/programs/winedbg/tgt_minidump.c
index 34e5b17..5df7c99 100644
--- a/programs/winedbg/tgt_minidump.c
+++ b/programs/winedbg/tgt_minidump.c
@@ -283,11 +283,14 @@ static enum dbg_start minidump_do_reload
 
     if (MiniDumpReadDumpStream(data->mapping, ThreadListStream, &dir, &stream, &size))
     {
-        MINIDUMP_THREAD_LIST*     mtl = (MINIDUMP_THREAD_LIST*)stream;
-        MINIDUMP_THREAD*          mt = &mtl->Threads[0];
+        MINIDUMP_THREAD_LIST*   mtl = (MINIDUMP_THREAD_LIST*)stream;
+        ULONG                   i;
 
-        dbg_add_thread(dbg_curr_process, mt->ThreadId, NULL, 
-                       (void*)(DWORD_PTR)mt->Teb);
+        for (i = 0; i < mtl->NumberOfThreads; i++)
+        {
+            dbg_add_thread(dbg_curr_process, mtl->Threads[i].ThreadId, NULL,
+                           (void*)(DWORD_PTR)mtl->Threads[i].Teb);
+        }
     }
     /* first load ELF modules, then do the PE ones */
     if (MiniDumpReadDumpStream(data->mapping, Wine_ElfModuleListStream, &dir,



More information about the wine-patches mailing list