Commit ea753c38 authored by Zebediah Figura's avatar Zebediah Figura Committed by Alexandre Julliard

include: Rename the other In*OrderModuleList fields to In*OrderLinks for consistency.

parent 09db718d
...@@ -488,11 +488,11 @@ static int module_iterator_next(MODULE_ITERATOR *iter) ...@@ -488,11 +488,11 @@ static int module_iterator_next(MODULE_ITERATOR *iter)
} }
if (!ReadProcessMemory(iter->process, if (!ReadProcessMemory(iter->process,
CONTAINING_RECORD(iter->current, LDR_DATA_TABLE_ENTRY, InLoadOrderModuleList), CONTAINING_RECORD(iter->current, LDR_DATA_TABLE_ENTRY, InLoadOrderLinks),
&iter->ldr_module, sizeof(iter->ldr_module), NULL)) &iter->ldr_module, sizeof(iter->ldr_module), NULL))
return -1; return -1;
iter->current = iter->ldr_module.InLoadOrderModuleList.Flink; iter->current = iter->ldr_module.InLoadOrderLinks.Flink;
return 1; return 1;
} }
...@@ -569,7 +569,7 @@ BOOL WINAPI K32EnumProcessModules(HANDLE process, HMODULE *lphModule, ...@@ -569,7 +569,7 @@ BOOL WINAPI K32EnumProcessModules(HANDLE process, HMODULE *lphModule,
while (entry != head) while (entry != head)
{ {
PLDR_DATA_TABLE_ENTRY table_entry = (PLDR_DATA_TABLE_ENTRY) PLDR_DATA_TABLE_ENTRY table_entry = (PLDR_DATA_TABLE_ENTRY)
((PBYTE)entry - offsetof(LDR_DATA_TABLE_ENTRY, InLoadOrderModuleList)); ((PBYTE)entry - offsetof(LDR_DATA_TABLE_ENTRY, InLoadOrderLinks));
if (cb >= sizeof(HMODULE)) if (cb >= sizeof(HMODULE))
{ {
*lphModule++ = table_entry->DllBase; *lphModule++ = table_entry->DllBase;
......
...@@ -3815,7 +3815,7 @@ static void test_InMemoryOrderModuleList(void) ...@@ -3815,7 +3815,7 @@ static void test_InMemoryOrderModuleList(void)
entry1 != mark1 && entry2 != mark2; entry1 != mark1 && entry2 != mark2;
entry1 = entry1->Flink, entry2 = entry2->Flink) entry1 = entry1->Flink, entry2 = entry2->Flink)
{ {
module1 = CONTAINING_RECORD(entry1, LDR_DATA_TABLE_ENTRY, InLoadOrderModuleList); module1 = CONTAINING_RECORD(entry1, LDR_DATA_TABLE_ENTRY, InLoadOrderLinks);
module2 = CONTAINING_RECORD(entry2, LDR_DATA_TABLE_ENTRY, InMemoryOrderLinks); module2 = CONTAINING_RECORD(entry2, LDR_DATA_TABLE_ENTRY, InMemoryOrderLinks);
ok(module1 == module2, "expected module1 == module2, got %p and %p\n", module1, module2); ok(module1 == module2, "expected module1 == module2, got %p and %p\n", module1, module2);
} }
......
...@@ -116,11 +116,11 @@ static BOOL fetch_module( DWORD process, DWORD flags, LDR_DATA_TABLE_ENTRY **ldr ...@@ -116,11 +116,11 @@ static BOOL fetch_module( DWORD process, DWORD flags, LDR_DATA_TABLE_ENTRY **ldr
if (!*ldr_mod) break; if (!*ldr_mod) break;
if (!ReadProcessMemory( hProcess, if (!ReadProcessMemory( hProcess,
CONTAINING_RECORD(curr, LDR_DATA_TABLE_ENTRY, CONTAINING_RECORD(curr, LDR_DATA_TABLE_ENTRY,
InLoadOrderModuleList), InLoadOrderLinks),
&(*ldr_mod)[*num], &(*ldr_mod)[*num],
sizeof(LDR_DATA_TABLE_ENTRY), NULL)) sizeof(LDR_DATA_TABLE_ENTRY), NULL))
break; break;
curr = (*ldr_mod)[*num].InLoadOrderModuleList.Flink; curr = (*ldr_mod)[*num].InLoadOrderLinks.Flink;
/* if we cannot fetch the strings, then just ignore this LDR_DATA_TABLE_ENTRY /* if we cannot fetch the strings, then just ignore this LDR_DATA_TABLE_ENTRY
* and continue loading the other ones in the list * and continue loading the other ones in the list
*/ */
......
...@@ -505,7 +505,7 @@ static WINE_MODREF *find_basename_module( LPCWSTR name ) ...@@ -505,7 +505,7 @@ static WINE_MODREF *find_basename_module( LPCWSTR name )
mark = &NtCurrentTeb()->Peb->LdrData->InLoadOrderModuleList; mark = &NtCurrentTeb()->Peb->LdrData->InLoadOrderModuleList;
for (entry = mark->Flink; entry != mark; entry = entry->Flink) for (entry = mark->Flink; entry != mark; entry = entry->Flink)
{ {
LDR_DATA_TABLE_ENTRY *mod = CONTAINING_RECORD(entry, LDR_DATA_TABLE_ENTRY, InLoadOrderModuleList); LDR_DATA_TABLE_ENTRY *mod = CONTAINING_RECORD(entry, LDR_DATA_TABLE_ENTRY, InLoadOrderLinks);
if (RtlEqualUnicodeString( &name_str, &mod->BaseDllName, TRUE )) if (RtlEqualUnicodeString( &name_str, &mod->BaseDllName, TRUE ))
{ {
cached_modref = CONTAINING_RECORD(mod, WINE_MODREF, ldr); cached_modref = CONTAINING_RECORD(mod, WINE_MODREF, ldr);
...@@ -537,7 +537,7 @@ static WINE_MODREF *find_fullname_module( const UNICODE_STRING *nt_name ) ...@@ -537,7 +537,7 @@ static WINE_MODREF *find_fullname_module( const UNICODE_STRING *nt_name )
mark = &NtCurrentTeb()->Peb->LdrData->InLoadOrderModuleList; mark = &NtCurrentTeb()->Peb->LdrData->InLoadOrderModuleList;
for (entry = mark->Flink; entry != mark; entry = entry->Flink) for (entry = mark->Flink; entry != mark; entry = entry->Flink)
{ {
LDR_DATA_TABLE_ENTRY *mod = CONTAINING_RECORD(entry, LDR_DATA_TABLE_ENTRY, InLoadOrderModuleList); LDR_DATA_TABLE_ENTRY *mod = CONTAINING_RECORD(entry, LDR_DATA_TABLE_ENTRY, InLoadOrderLinks);
if (RtlEqualUnicodeString( &name, &mod->FullDllName, TRUE )) if (RtlEqualUnicodeString( &name, &mod->FullDllName, TRUE ))
{ {
cached_modref = CONTAINING_RECORD(mod, WINE_MODREF, ldr); cached_modref = CONTAINING_RECORD(mod, WINE_MODREF, ldr);
...@@ -564,7 +564,7 @@ static WINE_MODREF *find_fileid_module( struct stat *st ) ...@@ -564,7 +564,7 @@ static WINE_MODREF *find_fileid_module( struct stat *st )
mark = &NtCurrentTeb()->Peb->LdrData->InLoadOrderModuleList; mark = &NtCurrentTeb()->Peb->LdrData->InLoadOrderModuleList;
for (entry = mark->Flink; entry != mark; entry = entry->Flink) for (entry = mark->Flink; entry != mark; entry = entry->Flink)
{ {
LDR_DATA_TABLE_ENTRY *mod = CONTAINING_RECORD( entry, LDR_DATA_TABLE_ENTRY, InLoadOrderModuleList ); LDR_DATA_TABLE_ENTRY *mod = CONTAINING_RECORD( entry, LDR_DATA_TABLE_ENTRY, InLoadOrderLinks );
WINE_MODREF *wm = CONTAINING_RECORD( mod, WINE_MODREF, ldr ); WINE_MODREF *wm = CONTAINING_RECORD( mod, WINE_MODREF, ldr );
if (wm->dev == st->st_dev && wm->ino == st->st_ino) if (wm->dev == st->st_dev && wm->ino == st->st_ino)
...@@ -590,7 +590,7 @@ static WINE_MODREF *find_so_module( void *handle ) ...@@ -590,7 +590,7 @@ static WINE_MODREF *find_so_module( void *handle )
mark = &NtCurrentTeb()->Peb->LdrData->InLoadOrderModuleList; mark = &NtCurrentTeb()->Peb->LdrData->InLoadOrderModuleList;
for (entry = mark->Flink; entry != mark; entry = entry->Flink) for (entry = mark->Flink; entry != mark; entry = entry->Flink)
{ {
LDR_DATA_TABLE_ENTRY *mod = CONTAINING_RECORD( entry, LDR_DATA_TABLE_ENTRY, InLoadOrderModuleList ); LDR_DATA_TABLE_ENTRY *mod = CONTAINING_RECORD( entry, LDR_DATA_TABLE_ENTRY, InLoadOrderLinks );
WINE_MODREF *wm = CONTAINING_RECORD( mod, WINE_MODREF, ldr ); WINE_MODREF *wm = CONTAINING_RECORD( mod, WINE_MODREF, ldr );
if (wm->so_handle == handle) return wm; if (wm->so_handle == handle) return wm;
...@@ -1224,7 +1224,7 @@ static WINE_MODREF *alloc_module( HMODULE hModule, const UNICODE_STRING *nt_name ...@@ -1224,7 +1224,7 @@ static WINE_MODREF *alloc_module( HMODULE hModule, const UNICODE_STRING *nt_name
} }
InsertTailList(&NtCurrentTeb()->Peb->LdrData->InLoadOrderModuleList, InsertTailList(&NtCurrentTeb()->Peb->LdrData->InLoadOrderModuleList,
&wm->ldr.InLoadOrderModuleList); &wm->ldr.InLoadOrderLinks);
InsertTailList(&NtCurrentTeb()->Peb->LdrData->InMemoryOrderModuleList, InsertTailList(&NtCurrentTeb()->Peb->LdrData->InMemoryOrderModuleList,
&wm->ldr.InMemoryOrderLinks); &wm->ldr.InMemoryOrderLinks);
/* wait until init is called for inserting into InInitializationOrderModuleList */ /* wait until init is called for inserting into InInitializationOrderModuleList */
...@@ -1474,9 +1474,9 @@ static NTSTATUS process_attach( WINE_MODREF *wm, LPVOID lpReserved ) ...@@ -1474,9 +1474,9 @@ static NTSTATUS process_attach( WINE_MODREF *wm, LPVOID lpReserved )
if ((status = process_attach( wm->deps[i], lpReserved )) != STATUS_SUCCESS) break; if ((status = process_attach( wm->deps[i], lpReserved )) != STATUS_SUCCESS) break;
} }
if (!wm->ldr.InInitializationOrderModuleList.Flink) if (!wm->ldr.InInitializationOrderLinks.Flink)
InsertTailList(&NtCurrentTeb()->Peb->LdrData->InInitializationOrderModuleList, InsertTailList(&NtCurrentTeb()->Peb->LdrData->InInitializationOrderModuleList,
&wm->ldr.InInitializationOrderModuleList); &wm->ldr.InInitializationOrderLinks);
/* Call DLL entry point */ /* Call DLL entry point */
if (status == STATUS_SUCCESS) if (status == STATUS_SUCCESS)
...@@ -1526,7 +1526,7 @@ static void attach_implicitly_loaded_dlls( LPVOID reserved ) ...@@ -1526,7 +1526,7 @@ static void attach_implicitly_loaded_dlls( LPVOID reserved )
mark = &NtCurrentTeb()->Peb->LdrData->InLoadOrderModuleList; mark = &NtCurrentTeb()->Peb->LdrData->InLoadOrderModuleList;
for (entry = mark->Flink; entry != mark; entry = entry->Flink) for (entry = mark->Flink; entry != mark; entry = entry->Flink)
{ {
LDR_DATA_TABLE_ENTRY *mod = CONTAINING_RECORD(entry, LDR_DATA_TABLE_ENTRY, InLoadOrderModuleList); LDR_DATA_TABLE_ENTRY *mod = CONTAINING_RECORD(entry, LDR_DATA_TABLE_ENTRY, InLoadOrderLinks);
if (!(mod->Flags & LDR_IMAGE_IS_DLL)) continue; if (!(mod->Flags & LDR_IMAGE_IS_DLL)) continue;
if (mod->Flags & (LDR_LOAD_IN_PROGRESS | LDR_PROCESS_ATTACHED)) continue; if (mod->Flags & (LDR_LOAD_IN_PROGRESS | LDR_PROCESS_ATTACHED)) continue;
...@@ -1557,7 +1557,7 @@ static void process_detach(void) ...@@ -1557,7 +1557,7 @@ static void process_detach(void)
for (entry = mark->Blink; entry != mark; entry = entry->Blink) for (entry = mark->Blink; entry != mark; entry = entry->Blink)
{ {
mod = CONTAINING_RECORD(entry, LDR_DATA_TABLE_ENTRY, mod = CONTAINING_RECORD(entry, LDR_DATA_TABLE_ENTRY,
InInitializationOrderModuleList); InInitializationOrderLinks);
/* Check whether to detach this DLL */ /* Check whether to detach this DLL */
if ( !(mod->Flags & LDR_PROCESS_ATTACHED) ) if ( !(mod->Flags & LDR_PROCESS_ATTACHED) )
continue; continue;
...@@ -1593,7 +1593,7 @@ static void thread_attach(void) ...@@ -1593,7 +1593,7 @@ static void thread_attach(void)
for (entry = mark->Flink; entry != mark; entry = entry->Flink) for (entry = mark->Flink; entry != mark; entry = entry->Flink)
{ {
mod = CONTAINING_RECORD(entry, LDR_DATA_TABLE_ENTRY, mod = CONTAINING_RECORD(entry, LDR_DATA_TABLE_ENTRY,
InInitializationOrderModuleList); InInitializationOrderLinks);
if ( !(mod->Flags & LDR_PROCESS_ATTACHED) ) if ( !(mod->Flags & LDR_PROCESS_ATTACHED) )
continue; continue;
if ( mod->Flags & LDR_NO_DLL_CALLS ) if ( mod->Flags & LDR_NO_DLL_CALLS )
...@@ -2028,7 +2028,7 @@ static NTSTATUS build_so_dll_module( const WCHAR *load_path, const UNICODE_STRIN ...@@ -2028,7 +2028,7 @@ static NTSTATUS build_so_dll_module( const WCHAR *load_path, const UNICODE_STRIN
if ((status = fixup_imports( wm, load_path ))) if ((status = fixup_imports( wm, load_path )))
{ {
/* the module has only been inserted in the load & memory order lists */ /* the module has only been inserted in the load & memory order lists */
RemoveEntryList(&wm->ldr.InLoadOrderModuleList); RemoveEntryList(&wm->ldr.InLoadOrderLinks);
RemoveEntryList(&wm->ldr.InMemoryOrderLinks); RemoveEntryList(&wm->ldr.InMemoryOrderLinks);
/* FIXME: free the modref */ /* FIXME: free the modref */
return status; return status;
...@@ -2571,7 +2571,7 @@ static NTSTATUS load_native_dll( LPCWSTR load_path, const UNICODE_STRING *nt_nam ...@@ -2571,7 +2571,7 @@ static NTSTATUS load_native_dll( LPCWSTR load_path, const UNICODE_STRING *nt_nam
if (status != STATUS_SUCCESS) if (status != STATUS_SUCCESS)
{ {
/* the module has only be inserted in the load & memory order lists */ /* the module has only be inserted in the load & memory order lists */
RemoveEntryList(&wm->ldr.InLoadOrderModuleList); RemoveEntryList(&wm->ldr.InLoadOrderLinks);
RemoveEntryList(&wm->ldr.InMemoryOrderLinks); RemoveEntryList(&wm->ldr.InMemoryOrderLinks);
/* FIXME: there are several more dangling references /* FIXME: there are several more dangling references
...@@ -3492,7 +3492,7 @@ NTSTATUS WINAPI LdrQueryProcessModuleInformation(PSYSTEM_MODULE_INFORMATION smi, ...@@ -3492,7 +3492,7 @@ NTSTATUS WINAPI LdrQueryProcessModuleInformation(PSYSTEM_MODULE_INFORMATION smi,
mark = &NtCurrentTeb()->Peb->LdrData->InLoadOrderModuleList; mark = &NtCurrentTeb()->Peb->LdrData->InLoadOrderModuleList;
for (entry = mark->Flink; entry != mark; entry = entry->Flink) for (entry = mark->Flink; entry != mark; entry = entry->Flink)
{ {
mod = CONTAINING_RECORD(entry, LDR_DATA_TABLE_ENTRY, InLoadOrderModuleList); mod = CONTAINING_RECORD(entry, LDR_DATA_TABLE_ENTRY, InLoadOrderLinks);
size += sizeof(*sm); size += sizeof(*sm);
if (size <= buf_size) if (size <= buf_size)
{ {
...@@ -3758,7 +3758,7 @@ void WINAPI LdrShutdownThread(void) ...@@ -3758,7 +3758,7 @@ void WINAPI LdrShutdownThread(void)
for (entry = mark->Blink; entry != mark; entry = entry->Blink) for (entry = mark->Blink; entry != mark; entry = entry->Blink)
{ {
mod = CONTAINING_RECORD(entry, LDR_DATA_TABLE_ENTRY, mod = CONTAINING_RECORD(entry, LDR_DATA_TABLE_ENTRY,
InInitializationOrderModuleList); InInitializationOrderLinks);
if ( !(mod->Flags & LDR_PROCESS_ATTACHED) ) if ( !(mod->Flags & LDR_PROCESS_ATTACHED) )
continue; continue;
if ( mod->Flags & LDR_NO_DLL_CALLS ) if ( mod->Flags & LDR_NO_DLL_CALLS )
...@@ -3789,10 +3789,10 @@ void WINAPI LdrShutdownThread(void) ...@@ -3789,10 +3789,10 @@ void WINAPI LdrShutdownThread(void)
*/ */
static void free_modref( WINE_MODREF *wm ) static void free_modref( WINE_MODREF *wm )
{ {
RemoveEntryList(&wm->ldr.InLoadOrderModuleList); RemoveEntryList(&wm->ldr.InLoadOrderLinks);
RemoveEntryList(&wm->ldr.InMemoryOrderLinks); RemoveEntryList(&wm->ldr.InMemoryOrderLinks);
if (wm->ldr.InInitializationOrderModuleList.Flink) if (wm->ldr.InInitializationOrderLinks.Flink)
RemoveEntryList(&wm->ldr.InInitializationOrderModuleList); RemoveEntryList(&wm->ldr.InInitializationOrderLinks);
TRACE(" unloading %s\n", debugstr_w(wm->ldr.FullDllName.Buffer)); TRACE(" unloading %s\n", debugstr_w(wm->ldr.FullDllName.Buffer));
if (!TRACE_ON(module)) if (!TRACE_ON(module))
...@@ -3834,7 +3834,7 @@ static void MODULE_FlushModrefs(void) ...@@ -3834,7 +3834,7 @@ static void MODULE_FlushModrefs(void)
mark = &NtCurrentTeb()->Peb->LdrData->InInitializationOrderModuleList; mark = &NtCurrentTeb()->Peb->LdrData->InInitializationOrderModuleList;
for (entry = mark->Blink; entry != mark; entry = prev) for (entry = mark->Blink; entry != mark; entry = prev)
{ {
mod = CONTAINING_RECORD(entry, LDR_DATA_TABLE_ENTRY, InInitializationOrderModuleList); mod = CONTAINING_RECORD(entry, LDR_DATA_TABLE_ENTRY, InInitializationOrderLinks);
wm = CONTAINING_RECORD(mod, WINE_MODREF, ldr); wm = CONTAINING_RECORD(mod, WINE_MODREF, ldr);
prev = entry->Blink; prev = entry->Blink;
if (!mod->LoadCount) free_modref( wm ); if (!mod->LoadCount) free_modref( wm );
...@@ -3844,7 +3844,7 @@ static void MODULE_FlushModrefs(void) ...@@ -3844,7 +3844,7 @@ static void MODULE_FlushModrefs(void)
mark = &NtCurrentTeb()->Peb->LdrData->InLoadOrderModuleList; mark = &NtCurrentTeb()->Peb->LdrData->InLoadOrderModuleList;
for (entry = mark->Blink; entry != mark; entry = prev) for (entry = mark->Blink; entry != mark; entry = prev)
{ {
mod = CONTAINING_RECORD(entry, LDR_DATA_TABLE_ENTRY, InLoadOrderModuleList); mod = CONTAINING_RECORD(entry, LDR_DATA_TABLE_ENTRY, InLoadOrderLinks);
wm = CONTAINING_RECORD(mod, WINE_MODREF, ldr); wm = CONTAINING_RECORD(mod, WINE_MODREF, ldr);
prev = entry->Blink; prev = entry->Blink;
if (!mod->LoadCount) free_modref( wm ); if (!mod->LoadCount) free_modref( wm );
...@@ -4576,8 +4576,8 @@ void __wine_process_init(void) ...@@ -4576,8 +4576,8 @@ void __wine_process_init(void)
virtual_set_large_address_space(); virtual_set_large_address_space();
/* the main exe needs to be the first in the load order list */ /* the main exe needs to be the first in the load order list */
RemoveEntryList( &wm->ldr.InLoadOrderModuleList ); RemoveEntryList( &wm->ldr.InLoadOrderLinks );
InsertHeadList( &peb->LdrData->InLoadOrderModuleList, &wm->ldr.InLoadOrderModuleList ); InsertHeadList( &peb->LdrData->InLoadOrderModuleList, &wm->ldr.InLoadOrderLinks );
RemoveEntryList( &wm->ldr.InMemoryOrderLinks ); RemoveEntryList( &wm->ldr.InMemoryOrderLinks );
InsertHeadList( &peb->LdrData->InMemoryOrderModuleList, &wm->ldr.InMemoryOrderLinks ); InsertHeadList( &peb->LdrData->InMemoryOrderModuleList, &wm->ldr.InMemoryOrderLinks );
......
...@@ -2319,9 +2319,9 @@ typedef enum _LDR_DLL_LOAD_REASON ...@@ -2319,9 +2319,9 @@ typedef enum _LDR_DLL_LOAD_REASON
typedef struct _LDR_DATA_TABLE_ENTRY typedef struct _LDR_DATA_TABLE_ENTRY
{ {
LIST_ENTRY InLoadOrderModuleList; LIST_ENTRY InLoadOrderLinks;
LIST_ENTRY InMemoryOrderLinks; LIST_ENTRY InMemoryOrderLinks;
LIST_ENTRY InInitializationOrderModuleList; LIST_ENTRY InInitializationOrderLinks;
void* DllBase; void* DllBase;
void* EntryPoint; void* EntryPoint;
ULONG SizeOfImage; ULONG SizeOfImage;
......
...@@ -165,14 +165,14 @@ static BOOL fill_sym_lvalue(const SYMBOL_INFO* sym, ULONG_PTR base, ...@@ -165,14 +165,14 @@ static BOOL fill_sym_lvalue(const SYMBOL_INFO* sym, ULONG_PTR base,
head = &((PEB_LDR_DATA*)peb.LdrData)->InLoadOrderModuleList; head = &((PEB_LDR_DATA*)peb.LdrData)->InLoadOrderModuleList;
do do
{ {
if (!dbg_read_memory(CONTAINING_RECORD(current, LDR_DATA_TABLE_ENTRY, InLoadOrderModuleList), if (!dbg_read_memory(CONTAINING_RECORD(current, LDR_DATA_TABLE_ENTRY, InLoadOrderLinks),
&ldr_module, sizeof(ldr_module))) goto tls_error; &ldr_module, sizeof(ldr_module))) goto tls_error;
if ((DWORD_PTR)ldr_module.DllBase == sym->ModBase) if ((DWORD_PTR)ldr_module.DllBase == sym->ModBase)
{ {
tlsindex = ldr_module.TlsIndex; tlsindex = ldr_module.TlsIndex;
break; break;
} }
current = ldr_module.InLoadOrderModuleList.Flink; current = ldr_module.InLoadOrderLinks.Flink;
} while (current != head); } while (current != head);
addr += tlsindex * sizeof(DWORD_PTR); addr += tlsindex * sizeof(DWORD_PTR);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment