Eric Pouech : winedbg: When reloading a minidump, recreate all threads from the thread record (and not just the first one).

Alexandre Julliard julliard at wine.codeweavers.com
Mon Mar 5 06:23:34 CST 2007


Module: wine
Branch: master
Commit: 90167f26d31f1921bda27bdd234b5cc21d5d72dc
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=90167f26d31f1921bda27bdd234b5cc21d5d72dc

Author: Eric Pouech <eric.pouech at wanadoo.fr>
Date:   Sun Mar  4 20:10:41 2007 +0100

winedbg: When reloading a minidump, recreate all threads from the thread record (and not just the first one).

---

 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(struct tgt_process_minidump_data* data)
 
     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-cvs mailing list