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
b3c8d5d3
Commit
b3c8d5d3
authored
Apr 03, 2019
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ntdll: Use static debug info before initialization is done.
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
890d1b81
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
6 deletions
+12
-6
debugtools.c
dlls/ntdll/debugtools.c
+12
-1
thread.c
dlls/ntdll/thread.c
+0
-5
No files found.
dlls/ntdll/debugtools.c
View file @
b3c8d5d3
...
...
@@ -43,11 +43,18 @@ WINE_DECLARE_DEBUG_CHANNEL(timestamp);
static
struct
__wine_debug_functions
default_funcs
;
/* ---------------------------------------------------------------------- */
static
BOOL
init_done
;
static
struct
debug_info
initial_info
;
/* debug info for initial thread */
/* get the debug info pointer for the current thread */
static
inline
struct
debug_info
*
get_info
(
void
)
{
if
(
!
init_done
)
{
if
(
!
initial_info
.
str_pos
)
initial_info
.
str_pos
=
initial_info
.
strings
;
if
(
!
initial_info
.
out_pos
)
initial_info
.
out_pos
=
initial_info
.
output
;
return
&
initial_info
;
}
return
ntdll_get_thread_data
()
->
debug_info
;
}
...
...
@@ -199,5 +206,9 @@ static const struct __wine_debug_functions funcs =
*/
void
debug_init
(
void
)
{
if
(
!
initial_info
.
str_pos
)
initial_info
.
str_pos
=
initial_info
.
strings
;
if
(
!
initial_info
.
out_pos
)
initial_info
.
out_pos
=
initial_info
.
output
;
ntdll_get_thread_data
()
->
debug_info
=
&
initial_info
;
init_done
=
TRUE
;
__wine_dbg_set_functions
(
&
funcs
,
&
default_funcs
,
sizeof
(
funcs
)
);
}
dlls/ntdll/thread.c
View file @
b3c8d5d3
...
...
@@ -163,7 +163,6 @@ void thread_init(void)
LARGE_INTEGER
now
;
NTSTATUS
status
;
struct
ntdll_thread_data
*
thread_data
;
static
struct
debug_info
debug_info
;
/* debug info for initial thread */
virtual_init
();
...
...
@@ -231,13 +230,9 @@ void thread_init(void)
thread_data
->
reply_fd
=
-
1
;
thread_data
->
wait_fd
[
0
]
=
-
1
;
thread_data
->
wait_fd
[
1
]
=
-
1
;
thread_data
->
debug_info
=
&
debug_info
;
signal_init_thread
(
teb
);
virtual_init_threading
();
debug_info
.
str_pos
=
debug_info
.
strings
;
debug_info
.
out_pos
=
debug_info
.
output
;
debug_init
();
/* setup the server connection */
...
...
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