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
b8c7dec6
Commit
b8c7dec6
authored
Mar 24, 2010
by
Vincent Povirk
Committed by
Alexandre Julliard
Mar 24, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mscoree: Add a setting to access mono's tracing functionality.
parent
929bac96
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
0 deletions
+19
-0
mscoree_main.c
dlls/mscoree/mscoree_main.c
+19
-0
No files found.
dlls/mscoree/mscoree_main.c
View file @
b8c7dec6
...
@@ -144,6 +144,11 @@ __int32 WINAPI _CorExeMain(void)
...
@@ -144,6 +144,11 @@ __int32 WINAPI _CorExeMain(void)
PROCESS_INFORMATION
pi
;
PROCESS_INFORMATION
pi
;
WCHAR
*
mono_exe
,
*
cmd_line
;
WCHAR
*
mono_exe
,
*
cmd_line
;
DWORD
size
,
exit_code
;
DWORD
size
,
exit_code
;
static
const
WCHAR
WINE_MONO_TRACE
[]
=
{
'W'
,
'I'
,
'N'
,
'E'
,
'_'
,
'M'
,
'O'
,
'N'
,
'O'
,
'_'
,
'T'
,
'R'
,
'A'
,
'C'
,
'E'
,
0
};
static
const
WCHAR
trace_switch_start
[]
=
{
'"'
,
'-'
,
'-'
,
't'
,
'r'
,
'a'
,
'c'
,
'e'
,
'='
,
0
};
static
const
WCHAR
trace_switch_end
[]
=
{
'"'
,
' '
,
0
};
int
trace_size
;
WCHAR
trace_setting
[
256
];
if
(
!
(
mono_exe
=
get_mono_exe
()))
if
(
!
(
mono_exe
=
get_mono_exe
()))
{
{
...
@@ -151,7 +156,13 @@ __int32 WINAPI _CorExeMain(void)
...
@@ -151,7 +156,13 @@ __int32 WINAPI _CorExeMain(void)
return
-
1
;
return
-
1
;
}
}
trace_size
=
GetEnvironmentVariableW
(
WINE_MONO_TRACE
,
trace_setting
,
sizeof
(
trace_setting
)
/
sizeof
(
WCHAR
));
size
=
(
lstrlenW
(
mono_exe
)
+
lstrlenW
(
GetCommandLineW
())
+
1
)
*
sizeof
(
WCHAR
);
size
=
(
lstrlenW
(
mono_exe
)
+
lstrlenW
(
GetCommandLineW
())
+
1
)
*
sizeof
(
WCHAR
);
if
(
trace_size
)
size
+=
(
trace_size
+
lstrlenW
(
trace_switch_start
)
+
lstrlenW
(
trace_switch_end
))
*
sizeof
(
WCHAR
);
if
(
!
(
cmd_line
=
HeapAlloc
(
GetProcessHeap
(),
0
,
size
)))
if
(
!
(
cmd_line
=
HeapAlloc
(
GetProcessHeap
(),
0
,
size
)))
{
{
HeapFree
(
GetProcessHeap
(),
0
,
mono_exe
);
HeapFree
(
GetProcessHeap
(),
0
,
mono_exe
);
...
@@ -160,6 +171,14 @@ __int32 WINAPI _CorExeMain(void)
...
@@ -160,6 +171,14 @@ __int32 WINAPI _CorExeMain(void)
lstrcpyW
(
cmd_line
,
mono_exe
);
lstrcpyW
(
cmd_line
,
mono_exe
);
HeapFree
(
GetProcessHeap
(),
0
,
mono_exe
);
HeapFree
(
GetProcessHeap
(),
0
,
mono_exe
);
if
(
trace_size
)
{
lstrcatW
(
cmd_line
,
trace_switch_start
);
lstrcatW
(
cmd_line
,
trace_setting
);
lstrcatW
(
cmd_line
,
trace_switch_end
);
}
lstrcatW
(
cmd_line
,
GetCommandLineW
());
lstrcatW
(
cmd_line
,
GetCommandLineW
());
TRACE
(
"new command line: %s
\n
"
,
debugstr_w
(
cmd_line
));
TRACE
(
"new command line: %s
\n
"
,
debugstr_w
(
cmd_line
));
...
...
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