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
7bd070ae
Commit
7bd070ae
authored
Jan 08, 2024
by
Paul Gofman
Committed by
Alexandre Julliard
Jan 23, 2024
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ntdll: Return STATUS_DEBUGGER_INACTIVE from NtSystemDebugControl() stub.
parent
9dc1ddf8
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
71 additions
and
3 deletions
+71
-3
info.c
dlls/ntdll/tests/info.c
+24
-0
system.c
dlls/ntdll/unix/system.c
+2
-1
system.c
dlls/wow64/system.c
+24
-1
winternl.h
include/winternl.h
+21
-1
No files found.
dlls/ntdll/tests/info.c
View file @
7bd070ae
...
...
@@ -46,6 +46,7 @@ static NTSTATUS (WINAPI * pNtSetInformationDebugObject)(HANDLE,DEBUGOBJECTINFOCL
static
NTSTATUS
(
WINAPI
*
pDbgUiConvertStateChangeStructure
)(
DBGUI_WAIT_STATE_CHANGE
*
,
DEBUG_EVENT
*
);
static
HANDLE
(
WINAPI
*
pDbgUiGetThreadDebugObject
)(
void
);
static
void
(
WINAPI
*
pDbgUiSetThreadDebugObject
)(
HANDLE
);
static
NTSTATUS
(
WINAPI
*
pNtSystemDebugControl
)(
SYSDBG_COMMAND
,
PVOID
,
ULONG
,
PVOID
,
ULONG
,
PULONG
);
static
BOOL
is_wow64
;
static
BOOL
old_wow64
;
...
...
@@ -101,6 +102,7 @@ static void InitFunctionPtrs(void)
NTDLL_GET_PROC
(
DbgUiConvertStateChangeStructure
);
NTDLL_GET_PROC
(
DbgUiGetThreadDebugObject
);
NTDLL_GET_PROC
(
DbgUiSetThreadDebugObject
);
NTDLL_GET_PROC
(
NtSystemDebugControl
);
if
(
!
IsWow64Process
(
GetCurrentProcess
(),
&
is_wow64
))
is_wow64
=
FALSE
;
...
...
@@ -3735,6 +3737,27 @@ static void test_ThreadIsTerminated(void)
ok
(
status
==
STATUS_INVALID_HANDLE
,
"got %#lx.
\n
"
,
status
);
}
static
void
test_system_debug_control
(
void
)
{
NTSTATUS
status
;
int
class
;
for
(
class
=
0
;
class
<
SysDbgMaxInfoClass
;
++
class
)
{
status
=
pNtSystemDebugControl
(
class
,
NULL
,
0
,
NULL
,
0
,
NULL
);
if
(
is_wow64
)
{
/* Most of the calls return STATUS_NOT_IMPLEMENTED on wow64. */
ok
(
status
==
STATUS_DEBUGGER_INACTIVE
||
status
==
STATUS_NOT_IMPLEMENTED
||
status
==
STATUS_INFO_LENGTH_MISMATCH
,
"class %d, got %#lx.
\n
"
,
class
,
status
);
}
else
{
ok
(
status
==
STATUS_DEBUGGER_INACTIVE
||
status
==
STATUS_ACCESS_DENIED
,
"class %d, got %#lx.
\n
"
,
class
,
status
);
}
}
}
START_TEST
(
info
)
{
char
**
argv
;
...
...
@@ -3810,4 +3833,5 @@ START_TEST(info)
test_ThreadEnableAlignmentFaultFixup
();
test_process_instrumentation_callback
();
test_system_debug_control
();
}
dlls/ntdll/unix/system.c
View file @
7bd070ae
...
...
@@ -3461,7 +3461,8 @@ NTSTATUS WINAPI NtSystemDebugControl( SYSDBG_COMMAND command, void *in_buff, ULO
{
FIXME
(
"(%d, %p, %d, %p, %d, %p), stub
\n
"
,
command
,
in_buff
,
(
int
)
in_len
,
out_buff
,
(
int
)
out_len
,
retlen
);
return
STATUS_NOT_IMPLEMENTED
;
return
STATUS_DEBUGGER_INACTIVE
;
}
...
...
dlls/wow64/system.c
View file @
7bd070ae
...
...
@@ -755,7 +755,30 @@ NTSTATUS WINAPI wow64_NtSystemDebugControl( UINT *args )
ULONG
out_len
=
get_ulong
(
&
args
);
ULONG
*
retlen
=
get_ptr
(
&
args
);
return
NtSystemDebugControl
(
command
,
in_buf
,
in_len
,
out_buf
,
out_len
,
retlen
);
switch
(
command
)
{
case
SysDbgBreakPoint
:
case
SysDbgEnableKernelDebugger
:
case
SysDbgDisableKernelDebugger
:
case
SysDbgGetAutoKdEnable
:
case
SysDbgSetAutoKdEnable
:
case
SysDbgGetPrintBufferSize
:
case
SysDbgSetPrintBufferSize
:
case
SysDbgGetKdUmExceptionEnable
:
case
SysDbgSetKdUmExceptionEnable
:
case
SysDbgGetTriageDump
:
case
SysDbgGetKdBlockEnable
:
case
SysDbgSetKdBlockEnable
:
case
SysDbgRegisterForUmBreakInfo
:
case
SysDbgGetUmBreakPid
:
case
SysDbgClearUmBreakPid
:
case
SysDbgGetUmAttachPid
:
case
SysDbgClearUmAttachPid
:
return
NtSystemDebugControl
(
command
,
in_buf
,
in_len
,
out_buf
,
out_len
,
retlen
);
default:
return
STATUS_NOT_IMPLEMENTED
;
/* not implemented on Windows either */
}
}
...
...
include/winternl.h
View file @
7bd070ae
...
...
@@ -3603,7 +3603,27 @@ typedef enum _SYSDBG_COMMAND {
SysDbgReadMsr
,
SysDbgWriteMsr
,
SysDbgReadBusData
,
SysDbgWriteBusData
SysDbgWriteBusData
,
SysDbgCheckLowMemory
,
SysDbgEnableKernelDebugger
,
SysDbgDisableKernelDebugger
,
SysDbgGetAutoKdEnable
,
SysDbgSetAutoKdEnable
,
SysDbgGetPrintBufferSize
,
SysDbgSetPrintBufferSize
,
SysDbgGetKdUmExceptionEnable
,
SysDbgSetKdUmExceptionEnable
,
SysDbgGetTriageDump
,
SysDbgGetKdBlockEnable
,
SysDbgSetKdBlockEnable
,
SysDbgRegisterForUmBreakInfo
,
SysDbgGetUmBreakPid
,
SysDbgClearUmBreakPid
,
SysDbgGetUmAttachPid
,
SysDbgClearUmAttachPid
,
SysDbgGetLiveKernelDump
,
SysDbgKdPullRemoteFile
,
SysDbgMaxInfoClass
}
SYSDBG_COMMAND
,
*
PSYSDBG_COMMAND
;
typedef
struct
_CPTABLEINFO
...
...
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