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
7f9faf10
Commit
7f9faf10
authored
Jul 05, 2019
by
Jacek Caban
Committed by
Alexandre Julliard
Jul 05, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ntdll: Implement DbgUiIssueRemoteBreakin.
Signed-off-by:
Jacek Caban
<
jacek@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
b37eb06b
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
59 additions
and
12 deletions
+59
-12
misc.c
dlls/ntdll/misc.c
+0
-8
ntdll.spec
dlls/ntdll/ntdll.spec
+1
-1
process.c
dlls/ntdll/process.c
+29
-0
server.c
dlls/ntdll/server.c
+5
-0
server_protocol.h
include/wine/server_protocol.h
+8
-2
winternl.h
include/winternl.h
+2
-0
protocol.def
server/protocol.def
+7
-1
thread.c
server/thread.c
+1
-0
trace.c
server/trace.c
+6
-0
No files found.
dlls/ntdll/misc.c
View file @
7f9faf10
...
@@ -584,14 +584,6 @@ ULONG WINAPIV EtwTraceMessage( TRACEHANDLE handle, ULONG flags, LPGUID guid, USH
...
@@ -584,14 +584,6 @@ ULONG WINAPIV EtwTraceMessage( TRACEHANDLE handle, ULONG flags, LPGUID guid, USH
return
ret
;
return
ret
;
}
}
/***********************************************************************
* DbgUiRemoteBreakin (NTDLL.@)
*/
void
WINAPI
DbgUiRemoteBreakin
(
void
*
arg
)
{
FIXME
(
"stub
\n
"
);
}
NTSTATUS
WINAPI
NtCreateLowBoxToken
(
HANDLE
*
token_handle
,
HANDLE
existing_token_handle
,
ACCESS_MASK
desired_access
,
NTSTATUS
WINAPI
NtCreateLowBoxToken
(
HANDLE
*
token_handle
,
HANDLE
existing_token_handle
,
ACCESS_MASK
desired_access
,
OBJECT_ATTRIBUTES
*
object_attributes
,
SID
*
package_sid
,
ULONG
capability_count
,
OBJECT_ATTRIBUTES
*
object_attributes
,
SID
*
package_sid
,
ULONG
capability_count
,
SID_AND_ATTRIBUTES
*
capabilities
,
ULONG
handle_count
,
HANDLE
*
handle
)
SID_AND_ATTRIBUTES
*
capabilities
,
ULONG
handle_count
,
HANDLE
*
handle
)
...
...
dlls/ntdll/ntdll.spec
View file @
7f9faf10
...
@@ -39,7 +39,7 @@
...
@@ -39,7 +39,7 @@
@ stub DbgUiConvertStateChangeStructure
@ stub DbgUiConvertStateChangeStructure
# @ stub DbgUiDebugActiveProcess
# @ stub DbgUiDebugActiveProcess
# @ stub DbgUiGetThreadDebugObject
# @ stub DbgUiGetThreadDebugObject
# @ stub DbgUiIssueRemoteBreakin
@ stdcall DbgUiIssueRemoteBreakin(long)
@ stdcall DbgUiRemoteBreakin(ptr)
@ stdcall DbgUiRemoteBreakin(ptr)
# @ stub DbgUiSetThreadDebugObject
# @ stub DbgUiSetThreadDebugObject
# @ stub DbgUiStopDebugging
# @ stub DbgUiStopDebugging
...
...
dlls/ntdll/process.c
View file @
7f9faf10
...
@@ -1365,3 +1365,32 @@ done:
...
@@ -1365,3 +1365,32 @@ done:
RtlFreeHeap
(
GetProcessHeap
(),
0
,
unixdir
);
RtlFreeHeap
(
GetProcessHeap
(),
0
,
unixdir
);
return
status
;
return
status
;
}
}
/***********************************************************************
* DbgUiRemoteBreakin (NTDLL.@)
*/
void
WINAPI
DbgUiRemoteBreakin
(
void
*
arg
)
{
TRACE
(
"
\n
"
);
if
(
NtCurrentTeb
()
->
Peb
->
BeingDebugged
)
DbgBreakPoint
();
RtlExitUserThread
(
STATUS_SUCCESS
);
}
/***********************************************************************
* DbgUiIssueRemoteBreakin (NTDLL.@)
*/
NTSTATUS
WINAPI
DbgUiIssueRemoteBreakin
(
HANDLE
process
)
{
apc_call_t
call
;
apc_result_t
result
;
NTSTATUS
status
;
TRACE
(
"(%p)
\n
"
,
process
);
memset
(
&
call
,
0
,
sizeof
(
call
)
);
call
.
type
=
APC_BREAK_PROCESS
;
status
=
server_queue_process_apc
(
process
,
&
call
,
&
result
);
if
(
status
)
return
status
;
return
result
.
break_process
.
status
;
}
dlls/ntdll/server.c
View file @
7f9faf10
...
@@ -575,6 +575,11 @@ BOOL invoke_apc( const apc_call_t *call, apc_result_t *result )
...
@@ -575,6 +575,11 @@ BOOL invoke_apc( const apc_call_t *call, apc_result_t *result )
else
result
->
create_thread
.
status
=
STATUS_INVALID_PARAMETER
;
else
result
->
create_thread
.
status
=
STATUS_INVALID_PARAMETER
;
break
;
break
;
}
}
case
APC_BREAK_PROCESS
:
result
->
type
=
APC_BREAK_PROCESS
;
result
->
break_process
.
status
=
RtlCreateUserThread
(
NtCurrentProcess
(),
NULL
,
FALSE
,
NULL
,
0
,
0
,
DbgUiRemoteBreakin
,
NULL
,
NULL
,
NULL
);
break
;
default:
default:
server_protocol_error
(
"get_apc_request: bad type %d
\n
"
,
call
->
type
);
server_protocol_error
(
"get_apc_request: bad type %d
\n
"
,
call
->
type
);
break
;
break
;
...
...
include/wine/server_protocol.h
View file @
7f9faf10
...
@@ -449,7 +449,8 @@ enum apc_type
...
@@ -449,7 +449,8 @@ enum apc_type
APC_VIRTUAL_UNLOCK
,
APC_VIRTUAL_UNLOCK
,
APC_MAP_VIEW
,
APC_MAP_VIEW
,
APC_UNMAP_VIEW
,
APC_UNMAP_VIEW
,
APC_CREATE_THREAD
APC_CREATE_THREAD
,
APC_BREAK_PROCESS
};
};
typedef
union
typedef
union
...
@@ -638,6 +639,11 @@ typedef union
...
@@ -638,6 +639,11 @@ typedef union
thread_id_t
tid
;
thread_id_t
tid
;
obj_handle_t
handle
;
obj_handle_t
handle
;
}
create_thread
;
}
create_thread
;
struct
{
enum
apc_type
type
;
unsigned
int
status
;
}
break_process
;
}
apc_result_t
;
}
apc_result_t
;
enum
irp_type
enum
irp_type
...
@@ -6702,6 +6708,6 @@ union generic_reply
...
@@ -6702,6 +6708,6 @@ union generic_reply
struct
resume_process_reply
resume_process_reply
;
struct
resume_process_reply
resume_process_reply
;
};
};
#define SERVER_PROTOCOL_VERSION 58
5
#define SERVER_PROTOCOL_VERSION 58
6
#endif
/* __WINE_WINE_SERVER_PROTOCOL_H */
#endif
/* __WINE_WINE_SERVER_PROTOCOL_H */
include/winternl.h
View file @
7f9faf10
...
@@ -2294,6 +2294,8 @@ NTSYSAPI void WINAPI DbgUserBreakPoint(void);
...
@@ -2294,6 +2294,8 @@ NTSYSAPI void WINAPI DbgUserBreakPoint(void);
#endif
/* __i386__ && __GNUC__ */
#endif
/* __i386__ && __GNUC__ */
NTSYSAPI
NTSTATUS
WINAPIV
DbgPrint
(
LPCSTR
fmt
,
...);
NTSYSAPI
NTSTATUS
WINAPIV
DbgPrint
(
LPCSTR
fmt
,
...);
NTSYSAPI
NTSTATUS
WINAPIV
DbgPrintEx
(
ULONG
iComponentId
,
ULONG
Level
,
LPCSTR
fmt
,
...);
NTSYSAPI
NTSTATUS
WINAPIV
DbgPrintEx
(
ULONG
iComponentId
,
ULONG
Level
,
LPCSTR
fmt
,
...);
NTSYSAPI
NTSTATUS
WINAPI
DbgUiIssueRemoteBreakin
(
HANDLE
);
NTSYSAPI
void
WINAPI
DbgUiRemoteBreakin
(
void
*
);
NTSYSAPI
NTSTATUS
WINAPI
LdrAccessResource
(
HMODULE
,
const
IMAGE_RESOURCE_DATA_ENTRY
*
,
void
**
,
PULONG
);
NTSYSAPI
NTSTATUS
WINAPI
LdrAccessResource
(
HMODULE
,
const
IMAGE_RESOURCE_DATA_ENTRY
*
,
void
**
,
PULONG
);
NTSYSAPI
NTSTATUS
WINAPI
LdrAddRefDll
(
ULONG
,
HMODULE
);
NTSYSAPI
NTSTATUS
WINAPI
LdrAddRefDll
(
ULONG
,
HMODULE
);
NTSYSAPI
NTSTATUS
WINAPI
LdrFindResourceDirectory_U
(
HMODULE
,
const
LDR_RESOURCE_INFO
*
,
ULONG
,
const
IMAGE_RESOURCE_DIRECTORY
**
);
NTSYSAPI
NTSTATUS
WINAPI
LdrFindResourceDirectory_U
(
HMODULE
,
const
LDR_RESOURCE_INFO
*
,
ULONG
,
const
IMAGE_RESOURCE_DIRECTORY
**
);
...
...
server/protocol.def
View file @
7f9faf10
...
@@ -465,7 +465,8 @@ enum apc_type
...
@@ -465,7 +465,8 @@ enum apc_type
APC_VIRTUAL_UNLOCK,
APC_VIRTUAL_UNLOCK,
APC_MAP_VIEW,
APC_MAP_VIEW,
APC_UNMAP_VIEW,
APC_UNMAP_VIEW,
APC_CREATE_THREAD
APC_CREATE_THREAD,
APC_BREAK_PROCESS
};
};
typedef union
typedef union
...
@@ -654,6 +655,11 @@ typedef union
...
@@ -654,6 +655,11 @@ typedef union
thread_id_t tid; /* thread id */
thread_id_t tid; /* thread id */
obj_handle_t handle; /* handle to new thread */
obj_handle_t handle; /* handle to new thread */
} create_thread;
} create_thread;
struct
{
enum apc_type type; /* APC_BREAK_PROCESS */
unsigned int status; /* status returned by call */
} break_process;
} apc_result_t;
} apc_result_t;
enum irp_type
enum irp_type
...
...
server/thread.c
View file @
7f9faf10
...
@@ -1643,6 +1643,7 @@ DECL_HANDLER(queue_apc)
...
@@ -1643,6 +1643,7 @@ DECL_HANDLER(queue_apc)
}
}
break
;
break
;
case
APC_CREATE_THREAD
:
case
APC_CREATE_THREAD
:
case
APC_BREAK_PROCESS
:
process
=
get_process_from_handle
(
req
->
handle
,
PROCESS_CREATE_THREAD
);
process
=
get_process_from_handle
(
req
->
handle
,
PROCESS_CREATE_THREAD
);
break
;
break
;
default
:
default
:
...
...
server/trace.c
View file @
7f9faf10
...
@@ -218,6 +218,9 @@ static void dump_apc_call( const char *prefix, const apc_call_t *call )
...
@@ -218,6 +218,9 @@ static void dump_apc_call( const char *prefix, const apc_call_t *call )
dump_uint64
(
",commit="
,
&
call
->
create_thread
.
commit
);
dump_uint64
(
",commit="
,
&
call
->
create_thread
.
commit
);
fprintf
(
stderr
,
",suspend=%u"
,
call
->
create_thread
.
suspend
);
fprintf
(
stderr
,
",suspend=%u"
,
call
->
create_thread
.
suspend
);
break
;
break
;
case
APC_BREAK_PROCESS
:
fprintf
(
stderr
,
"APC_BREAK_PROCESS"
);
break
;
default:
default:
fprintf
(
stderr
,
"type=%u"
,
call
->
type
);
fprintf
(
stderr
,
"type=%u"
,
call
->
type
);
break
;
break
;
...
@@ -298,6 +301,9 @@ static void dump_apc_result( const char *prefix, const apc_result_t *result )
...
@@ -298,6 +301,9 @@ static void dump_apc_result( const char *prefix, const apc_result_t *result )
get_status_name
(
result
->
create_thread
.
status
),
get_status_name
(
result
->
create_thread
.
status
),
result
->
create_thread
.
tid
,
result
->
create_thread
.
handle
);
result
->
create_thread
.
tid
,
result
->
create_thread
.
handle
);
break
;
break
;
case
APC_BREAK_PROCESS
:
fprintf
(
stderr
,
"APC_BREAK_PROCESS,status=%s"
,
get_status_name
(
result
->
break_process
.
status
)
);
break
;
default:
default:
fprintf
(
stderr
,
"type=%u"
,
result
->
type
);
fprintf
(
stderr
,
"type=%u"
,
result
->
type
);
break
;
break
;
...
...
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