Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
7d2cd2fe
Commit
7d2cd2fe
authored
Sep 23, 2015
by
Dmitry Timoshkov
Committed by
Alexandre Julliard
Oct 01, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ntdll: Print process id in the loader log if requested.
Signed-off-by:
Dmitry Timoshkov
<
dmitry@baikal.ru
>
parent
451156b4
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
0 deletions
+23
-0
loader.c
dlls/ntdll/loader.c
+23
-0
No files found.
dlls/ntdll/loader.c
View file @
7d2cd2fe
...
...
@@ -49,6 +49,7 @@ WINE_DECLARE_DEBUG_CHANNEL(relay);
WINE_DECLARE_DEBUG_CHANNEL
(
snoop
);
WINE_DECLARE_DEBUG_CHANNEL
(
loaddll
);
WINE_DECLARE_DEBUG_CHANNEL
(
imports
);
WINE_DECLARE_DEBUG_CHANNEL
(
pid
);
#ifdef _WIN64
#define DEFAULT_SECURITY_COOKIE_64 (((ULONGLONG)0x00002b99 << 32) | 0x2ddfa232)
...
...
@@ -1036,8 +1037,12 @@ static void call_tls_callbacks( HMODULE module, UINT reason )
for
(
callback
=
(
const
PIMAGE_TLS_CALLBACK
*
)
dir
->
AddressOfCallBacks
;
*
callback
;
callback
++
)
{
if
(
TRACE_ON
(
relay
))
{
if
(
TRACE_ON
(
pid
))
DPRINTF
(
"%04x:"
,
GetCurrentProcessId
()
);
DPRINTF
(
"%04x:Call TLS callback (proc=%p,module=%p,reason=%s,reserved=0)
\n
"
,
GetCurrentThreadId
(),
*
callback
,
module
,
reason_names
[
reason
]
);
}
__TRY
{
call_dll_entry_point
(
(
DLLENTRYPROC
)
*
callback
,
module
,
reason
,
NULL
);
...
...
@@ -1045,14 +1050,22 @@ static void call_tls_callbacks( HMODULE module, UINT reason )
__EXCEPT_ALL
{
if
(
TRACE_ON
(
relay
))
{
if
(
TRACE_ON
(
pid
))
DPRINTF
(
"%04x:"
,
GetCurrentProcessId
()
);
DPRINTF
(
"%04x:exception in TLS callback (proc=%p,module=%p,reason=%s,reserved=0)
\n
"
,
GetCurrentThreadId
(),
callback
,
module
,
reason_names
[
reason
]
);
}
return
;
}
__ENDTRY
if
(
TRACE_ON
(
relay
))
{
if
(
TRACE_ON
(
pid
))
DPRINTF
(
"%04x:"
,
GetCurrentProcessId
()
);
DPRINTF
(
"%04x:Ret TLS callback (proc=%p,module=%p,reason=%s,reserved=0)
\n
"
,
GetCurrentThreadId
(),
*
callback
,
module
,
reason_names
[
reason
]
);
}
}
}
...
...
@@ -1079,6 +1092,8 @@ static NTSTATUS MODULE_InitDLL( WINE_MODREF *wm, UINT reason, LPVOID lpReserved
size_t
len
=
min
(
wm
->
ldr
.
BaseDllName
.
Length
,
sizeof
(
mod_name
)
-
sizeof
(
WCHAR
)
);
memcpy
(
mod_name
,
wm
->
ldr
.
BaseDllName
.
Buffer
,
len
);
mod_name
[
len
/
sizeof
(
WCHAR
)]
=
0
;
if
(
TRACE_ON
(
pid
))
DPRINTF
(
"%04x:"
,
GetCurrentProcessId
()
);
DPRINTF
(
"%04x:Call PE DLL (proc=%p,module=%p %s,reason=%s,res=%p)
\n
"
,
GetCurrentThreadId
(),
entry
,
module
,
debugstr_w
(
mod_name
),
reason_names
[
reason
],
lpReserved
);
...
...
@@ -1095,8 +1110,12 @@ static NTSTATUS MODULE_InitDLL( WINE_MODREF *wm, UINT reason, LPVOID lpReserved
__EXCEPT_ALL
{
if
(
TRACE_ON
(
relay
))
{
if
(
TRACE_ON
(
pid
))
DPRINTF
(
"%04x:"
,
GetCurrentProcessId
()
);
DPRINTF
(
"%04x:exception in PE entry point (proc=%p,module=%p,reason=%s,res=%p)
\n
"
,
GetCurrentThreadId
(),
entry
,
module
,
reason_names
[
reason
],
lpReserved
);
}
status
=
GetExceptionCode
();
}
__ENDTRY
...
...
@@ -1105,9 +1124,13 @@ static NTSTATUS MODULE_InitDLL( WINE_MODREF *wm, UINT reason, LPVOID lpReserved
to the dll. We cannot assume that this module has not been
deleted. */
if
(
TRACE_ON
(
relay
))
{
if
(
TRACE_ON
(
pid
))
DPRINTF
(
"%04x:"
,
GetCurrentProcessId
()
);
DPRINTF
(
"%04x:Ret PE DLL (proc=%p,module=%p %s,reason=%s,res=%p) retval=%x
\n
"
,
GetCurrentThreadId
(),
entry
,
module
,
debugstr_w
(
mod_name
),
reason_names
[
reason
],
lpReserved
,
retv
);
}
else
TRACE
(
"(%p,%s,%p) - RETURN %d
\n
"
,
module
,
reason_names
[
reason
],
lpReserved
,
retv
);
return
status
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment