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

Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Zebediah Figura 2020-04-23 20:17:34 -05:00 committed by Alexandre Julliard
parent 09db718d99
commit ea753c384e
6 changed files with 31 additions and 31 deletions

View File

@ -488,11 +488,11 @@ static int module_iterator_next(MODULE_ITERATOR *iter)
}
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))
return -1;
iter->current = iter->ldr_module.InLoadOrderModuleList.Flink;
iter->current = iter->ldr_module.InLoadOrderLinks.Flink;
return 1;
}
@ -569,7 +569,7 @@ BOOL WINAPI K32EnumProcessModules(HANDLE process, HMODULE *lphModule,
while (entry != head)
{
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))
{
*lphModule++ = table_entry->DllBase;

View File

@ -3815,7 +3815,7 @@ static void test_InMemoryOrderModuleList(void)
entry1 != mark1 && entry2 != mark2;
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);
ok(module1 == module2, "expected module1 == module2, got %p and %p\n", module1, module2);
}

View File

@ -116,11 +116,11 @@ static BOOL fetch_module( DWORD process, DWORD flags, LDR_DATA_TABLE_ENTRY **ldr
if (!*ldr_mod) break;
if (!ReadProcessMemory( hProcess,
CONTAINING_RECORD(curr, LDR_DATA_TABLE_ENTRY,
InLoadOrderModuleList),
InLoadOrderLinks),
&(*ldr_mod)[*num],
sizeof(LDR_DATA_TABLE_ENTRY), NULL))
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
* and continue loading the other ones in the list
*/

View File

@ -505,7 +505,7 @@ static WINE_MODREF *find_basename_module( LPCWSTR name )
mark = &NtCurrentTeb()->Peb->LdrData->InLoadOrderModuleList;
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 ))
{
cached_modref = CONTAINING_RECORD(mod, WINE_MODREF, ldr);
@ -537,7 +537,7 @@ static WINE_MODREF *find_fullname_module( const UNICODE_STRING *nt_name )
mark = &NtCurrentTeb()->Peb->LdrData->InLoadOrderModuleList;
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 ))
{
cached_modref = CONTAINING_RECORD(mod, WINE_MODREF, ldr);
@ -564,7 +564,7 @@ static WINE_MODREF *find_fileid_module( struct stat *st )
mark = &NtCurrentTeb()->Peb->LdrData->InLoadOrderModuleList;
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 );
if (wm->dev == st->st_dev && wm->ino == st->st_ino)
@ -590,7 +590,7 @@ static WINE_MODREF *find_so_module( void *handle )
mark = &NtCurrentTeb()->Peb->LdrData->InLoadOrderModuleList;
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 );
if (wm->so_handle == handle) return wm;
@ -1224,7 +1224,7 @@ static WINE_MODREF *alloc_module( HMODULE hModule, const UNICODE_STRING *nt_name
}
InsertTailList(&NtCurrentTeb()->Peb->LdrData->InLoadOrderModuleList,
&wm->ldr.InLoadOrderModuleList);
&wm->ldr.InLoadOrderLinks);
InsertTailList(&NtCurrentTeb()->Peb->LdrData->InMemoryOrderModuleList,
&wm->ldr.InMemoryOrderLinks);
/* wait until init is called for inserting into InInitializationOrderModuleList */
@ -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 (!wm->ldr.InInitializationOrderModuleList.Flink)
if (!wm->ldr.InInitializationOrderLinks.Flink)
InsertTailList(&NtCurrentTeb()->Peb->LdrData->InInitializationOrderModuleList,
&wm->ldr.InInitializationOrderModuleList);
&wm->ldr.InInitializationOrderLinks);
/* Call DLL entry point */
if (status == STATUS_SUCCESS)
@ -1526,7 +1526,7 @@ static void attach_implicitly_loaded_dlls( LPVOID reserved )
mark = &NtCurrentTeb()->Peb->LdrData->InLoadOrderModuleList;
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_LOAD_IN_PROGRESS | LDR_PROCESS_ATTACHED)) continue;
@ -1557,7 +1557,7 @@ static void process_detach(void)
for (entry = mark->Blink; entry != mark; entry = entry->Blink)
{
mod = CONTAINING_RECORD(entry, LDR_DATA_TABLE_ENTRY,
InInitializationOrderModuleList);
InInitializationOrderLinks);
/* Check whether to detach this DLL */
if ( !(mod->Flags & LDR_PROCESS_ATTACHED) )
continue;
@ -1593,7 +1593,7 @@ static void thread_attach(void)
for (entry = mark->Flink; entry != mark; entry = entry->Flink)
{
mod = CONTAINING_RECORD(entry, LDR_DATA_TABLE_ENTRY,
InInitializationOrderModuleList);
InInitializationOrderLinks);
if ( !(mod->Flags & LDR_PROCESS_ATTACHED) )
continue;
if ( mod->Flags & LDR_NO_DLL_CALLS )
@ -2028,7 +2028,7 @@ static NTSTATUS build_so_dll_module( const WCHAR *load_path, const UNICODE_STRIN
if ((status = fixup_imports( wm, load_path )))
{
/* the module has only been inserted in the load & memory order lists */
RemoveEntryList(&wm->ldr.InLoadOrderModuleList);
RemoveEntryList(&wm->ldr.InLoadOrderLinks);
RemoveEntryList(&wm->ldr.InMemoryOrderLinks);
/* FIXME: free the modref */
return status;
@ -2571,7 +2571,7 @@ static NTSTATUS load_native_dll( LPCWSTR load_path, const UNICODE_STRING *nt_nam
if (status != STATUS_SUCCESS)
{
/* the module has only be inserted in the load & memory order lists */
RemoveEntryList(&wm->ldr.InLoadOrderModuleList);
RemoveEntryList(&wm->ldr.InLoadOrderLinks);
RemoveEntryList(&wm->ldr.InMemoryOrderLinks);
/* FIXME: there are several more dangling references
@ -3492,7 +3492,7 @@ NTSTATUS WINAPI LdrQueryProcessModuleInformation(PSYSTEM_MODULE_INFORMATION smi,
mark = &NtCurrentTeb()->Peb->LdrData->InLoadOrderModuleList;
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);
if (size <= buf_size)
{
@ -3758,7 +3758,7 @@ void WINAPI LdrShutdownThread(void)
for (entry = mark->Blink; entry != mark; entry = entry->Blink)
{
mod = CONTAINING_RECORD(entry, LDR_DATA_TABLE_ENTRY,
InInitializationOrderModuleList);
InInitializationOrderLinks);
if ( !(mod->Flags & LDR_PROCESS_ATTACHED) )
continue;
if ( mod->Flags & LDR_NO_DLL_CALLS )
@ -3789,10 +3789,10 @@ void WINAPI LdrShutdownThread(void)
*/
static void free_modref( WINE_MODREF *wm )
{
RemoveEntryList(&wm->ldr.InLoadOrderModuleList);
RemoveEntryList(&wm->ldr.InLoadOrderLinks);
RemoveEntryList(&wm->ldr.InMemoryOrderLinks);
if (wm->ldr.InInitializationOrderModuleList.Flink)
RemoveEntryList(&wm->ldr.InInitializationOrderModuleList);
if (wm->ldr.InInitializationOrderLinks.Flink)
RemoveEntryList(&wm->ldr.InInitializationOrderLinks);
TRACE(" unloading %s\n", debugstr_w(wm->ldr.FullDllName.Buffer));
if (!TRACE_ON(module))
@ -3834,7 +3834,7 @@ static void MODULE_FlushModrefs(void)
mark = &NtCurrentTeb()->Peb->LdrData->InInitializationOrderModuleList;
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);
prev = entry->Blink;
if (!mod->LoadCount) free_modref( wm );
@ -3844,7 +3844,7 @@ static void MODULE_FlushModrefs(void)
mark = &NtCurrentTeb()->Peb->LdrData->InLoadOrderModuleList;
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);
prev = entry->Blink;
if (!mod->LoadCount) free_modref( wm );
@ -4576,8 +4576,8 @@ void __wine_process_init(void)
virtual_set_large_address_space();
/* the main exe needs to be the first in the load order list */
RemoveEntryList( &wm->ldr.InLoadOrderModuleList );
InsertHeadList( &peb->LdrData->InLoadOrderModuleList, &wm->ldr.InLoadOrderModuleList );
RemoveEntryList( &wm->ldr.InLoadOrderLinks );
InsertHeadList( &peb->LdrData->InLoadOrderModuleList, &wm->ldr.InLoadOrderLinks );
RemoveEntryList( &wm->ldr.InMemoryOrderLinks );
InsertHeadList( &peb->LdrData->InMemoryOrderModuleList, &wm->ldr.InMemoryOrderLinks );

View File

@ -2319,9 +2319,9 @@ typedef enum _LDR_DLL_LOAD_REASON
typedef struct _LDR_DATA_TABLE_ENTRY
{
LIST_ENTRY InLoadOrderModuleList;
LIST_ENTRY InLoadOrderLinks;
LIST_ENTRY InMemoryOrderLinks;
LIST_ENTRY InInitializationOrderModuleList;
LIST_ENTRY InInitializationOrderLinks;
void* DllBase;
void* EntryPoint;
ULONG SizeOfImage;

View File

@ -165,14 +165,14 @@ static BOOL fill_sym_lvalue(const SYMBOL_INFO* sym, ULONG_PTR base,
head = &((PEB_LDR_DATA*)peb.LdrData)->InLoadOrderModuleList;
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;
if ((DWORD_PTR)ldr_module.DllBase == sym->ModBase)
{
tlsindex = ldr_module.TlsIndex;
break;
}
current = ldr_module.InLoadOrderModuleList.Flink;
current = ldr_module.InLoadOrderLinks.Flink;
} while (current != head);
addr += tlsindex * sizeof(DWORD_PTR);