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
1e5eee0f
Commit
1e5eee0f
authored
May 24, 2021
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ntdll: Fetch the debug channels from the PEB memory block on the PE side.
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
d389da09
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
30 additions
and
4 deletions
+30
-4
thread.c
dlls/ntdll/thread.c
+29
-1
loader.c
dlls/ntdll/unix/loader.c
+0
-1
unixlib.h
dlls/ntdll/unixlib.h
+1
-2
No files found.
dlls/ntdll/thread.c
View file @
1e5eee0f
...
...
@@ -37,6 +37,16 @@ WINE_DECLARE_DEBUG_CHANNEL(thread);
struct
_KUSER_SHARED_DATA
*
user_shared_data
=
(
void
*
)
0x7ffe0000
;
static
int
nb_debug_options
;
static
struct
__wine_debug_channel
*
debug_options
;
static
void
init_options
(
void
)
{
unsigned
int
offset
=
page_size
*
(
sizeof
(
void
*
)
/
4
);
debug_options
=
(
struct
__wine_debug_channel
*
)((
char
*
)
NtCurrentTeb
()
->
Peb
+
offset
);
while
(
debug_options
[
nb_debug_options
].
name
[
0
])
nb_debug_options
++
;
}
/***********************************************************************
* __wine_dbg_get_channel_flags (NTDLL.@)
...
...
@@ -45,7 +55,25 @@ struct _KUSER_SHARED_DATA *user_shared_data = (void *)0x7ffe0000;
*/
unsigned
char
__cdecl
__wine_dbg_get_channel_flags
(
struct
__wine_debug_channel
*
channel
)
{
return
unix_funcs
->
dbg_get_channel_flags
(
channel
);
int
min
,
max
,
pos
,
res
;
unsigned
char
default_flags
;
if
(
!
debug_options
)
init_options
();
min
=
0
;
max
=
nb_debug_options
-
1
;
while
(
min
<=
max
)
{
pos
=
(
min
+
max
)
/
2
;
res
=
strcmp
(
channel
->
name
,
debug_options
[
pos
].
name
);
if
(
!
res
)
return
debug_options
[
pos
].
flags
;
if
(
res
<
0
)
max
=
pos
-
1
;
else
min
=
pos
+
1
;
}
/* no option for this channel */
default_flags
=
debug_options
[
nb_debug_options
].
flags
;
if
(
channel
->
flags
&
(
1
<<
__WINE_DBCL_INIT
))
channel
->
flags
=
default_flags
;
return
default_flags
;
}
/***********************************************************************
...
...
dlls/ntdll/unix/loader.c
View file @
1e5eee0f
...
...
@@ -1840,7 +1840,6 @@ static struct unix_funcs unix_funcs =
init_builtin_dll
,
init_unix_lib
,
unwind_builtin_dll
,
__wine_dbg_get_channel_flags
,
__wine_dbg_strdup
,
__wine_dbg_output
,
__wine_dbg_header
,
...
...
dlls/ntdll/unixlib.h
View file @
1e5eee0f
...
...
@@ -26,7 +26,7 @@
struct
_DISPATCHER_CONTEXT
;
/* increment this when you change the function table */
#define NTDLL_UNIXLIB_VERSION 12
0
#define NTDLL_UNIXLIB_VERSION 12
1
struct
unix_funcs
{
...
...
@@ -80,7 +80,6 @@ struct unix_funcs
CONTEXT
*
context
);
/* debugging functions */
unsigned
char
(
CDECL
*
dbg_get_channel_flags
)(
struct
__wine_debug_channel
*
channel
);
const
char
*
(
CDECL
*
dbg_strdup
)(
const
char
*
str
);
int
(
CDECL
*
dbg_output
)(
const
char
*
str
);
int
(
CDECL
*
dbg_header
)(
enum
__wine_debug_class
cls
,
struct
__wine_debug_channel
*
channel
,
...
...
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