mirror of
https://gitlab.winehq.org/wine/wine.git
synced 2024-11-19 17:06:04 -07:00
winedbg: Fix main module detection in 'info share' command.
Signed-off-by: Eric Pouech <epouech@codeweavers.com>
This commit is contained in:
parent
930776022d
commit
8cbf27659b
Notes:
Alexandre Julliard
2023-12-22 22:00:00 +01:00
Approved-by: Alexandre Julliard (@julliard) Merge-Request: https://gitlab.winehq.org/wine/wine/-/merge_requests/4732
1 changed files with 8 additions and 1 deletions
|
@ -287,7 +287,14 @@ void info_win32_module(DWORD64 base, BOOL multi_machine)
|
|||
|
||||
if (!im.num_used) return;
|
||||
|
||||
machine = im.modules[0].mi.MachineType;
|
||||
/* main module is the first PE module in enumeration */
|
||||
for (i = 0; i < im.num_used; i++)
|
||||
if (im.modules[i].ext_module_info.type == DMT_PE)
|
||||
{
|
||||
machine = im.modules[i].mi.MachineType;
|
||||
break;
|
||||
}
|
||||
if (i == im.num_used) machine = IMAGE_FILE_MACHINE_UNKNOWN;
|
||||
qsort(im.modules, im.num_used, sizeof(im.modules[0]), module_compare);
|
||||
|
||||
if (multi_machine)
|
||||
|
|
Loading…
Reference in a new issue