Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
a679f965
Commit
a679f965
authored
Jul 05, 2019
by
Jacek Caban
Committed by
Alexandre Julliard
Jul 05, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
kernel32: Reimplement DebugBreakProcess on top of DbgUiIssueRemoteBreakin.
Signed-off-by:
Jacek Caban
<
jacek@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
7f9faf10
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
8 additions
and
73 deletions
+8
-73
debugger.c
dlls/kernel32/debugger.c
+6
-12
debugger.c
dlls/kernel32/tests/debugger.c
+1
-2
server_protocol.h
include/wine/server_protocol.h
+1
-18
debugger.c
server/debugger.c
+0
-14
protocol.def
server/protocol.def
+0
-8
request.h
server/request.h
+0
-6
trace.c
server/trace.c
+0
-13
No files found.
dlls/kernel32/debugger.c
View file @
a679f965
...
...
@@ -407,21 +407,15 @@ void WINAPI DebugBreak(void)
*
* True if successful.
*/
BOOL
WINAPI
DebugBreakProcess
(
HANDLE
hProc
)
BOOL
WINAPI
DebugBreakProcess
(
HANDLE
process
)
{
BOOL
ret
,
self
;
NTSTATUS
status
;
TRACE
(
"(%p)
\n
"
,
hProc
);
TRACE
(
"(%p)
\n
"
,
process
);
SERVER_START_REQ
(
debug_break
)
{
req
->
handle
=
wine_server_obj_handle
(
hProc
);
ret
=
!
wine_server_call_err
(
req
);
self
=
ret
&&
reply
->
self
;
}
SERVER_END_REQ
;
if
(
self
)
DbgBreakPoint
();
return
ret
;
status
=
DbgUiIssueRemoteBreakin
(
process
);
if
(
status
)
SetLastError
(
RtlNtStatusToDosError
(
status
));
return
!
status
;
}
...
...
dlls/kernel32/tests/debugger.c
View file @
a679f965
...
...
@@ -988,7 +988,6 @@ static void test_debug_children(char *name, DWORD flag, BOOL debug_child)
/* a new thread, which executes DbgDebugBreak, is created */
next_event
(
&
ctx
,
2000
);
todo_wine
ok
(
ctx
.
ev
.
dwDebugEventCode
==
CREATE_THREAD_DEBUG_EVENT
,
"dwDebugEventCode = %d
\n
"
,
ctx
.
ev
.
dwDebugEventCode
);
last_thread
=
ctx
.
ev
.
dwThreadId
;
...
...
@@ -999,7 +998,7 @@ static void test_debug_children(char *name, DWORD flag, BOOL debug_child)
ok
(
ctx
.
ev
.
dwThreadId
==
last_thread
,
"unexpected thread
\n
"
);
ok
(
ctx
.
ev
.
u
.
Exception
.
ExceptionRecord
.
ExceptionCode
==
EXCEPTION_BREAKPOINT
,
"ExceptionCode = %x
\n
"
,
ctx
.
ev
.
u
.
Exception
.
ExceptionRecord
.
ExceptionCode
);
todo_wine
todo_wine
_if
(
sizeof
(
void
*
)
==
4
)
ok
(
ctx
.
ev
.
u
.
Exception
.
ExceptionRecord
.
ExceptionAddress
==
pDbgBreakPoint
,
"ExceptionAddres != DbgBreakPoint
\n
"
);
ret
=
SetEvent
(
event_attach
);
...
...
include/wine/server_protocol.h
View file @
a679f965
...
...
@@ -2552,20 +2552,6 @@ struct debug_process_reply
struct
debug_break_request
{
struct
request_header
__header
;
obj_handle_t
handle
;
};
struct
debug_break_reply
{
struct
reply_header
__header
;
int
self
;
char
__pad_12
[
4
];
};
struct
set_debugger_kill_on_exit_request
{
struct
request_header
__header
;
...
...
@@ -5901,7 +5887,6 @@ enum request
REQ_get_exception_status
,
REQ_continue_debug_event
,
REQ_debug_process
,
REQ_debug_break
,
REQ_set_debugger_kill_on_exit
,
REQ_read_process_memory
,
REQ_write_process_memory
,
...
...
@@ -6206,7 +6191,6 @@ union generic_request
struct
get_exception_status_request
get_exception_status_request
;
struct
continue_debug_event_request
continue_debug_event_request
;
struct
debug_process_request
debug_process_request
;
struct
debug_break_request
debug_break_request
;
struct
set_debugger_kill_on_exit_request
set_debugger_kill_on_exit_request
;
struct
read_process_memory_request
read_process_memory_request
;
struct
write_process_memory_request
write_process_memory_request
;
...
...
@@ -6509,7 +6493,6 @@ union generic_reply
struct
get_exception_status_reply
get_exception_status_reply
;
struct
continue_debug_event_reply
continue_debug_event_reply
;
struct
debug_process_reply
debug_process_reply
;
struct
debug_break_reply
debug_break_reply
;
struct
set_debugger_kill_on_exit_reply
set_debugger_kill_on_exit_reply
;
struct
read_process_memory_reply
read_process_memory_reply
;
struct
write_process_memory_reply
write_process_memory_reply
;
...
...
@@ -6708,6 +6691,6 @@ union generic_reply
struct
resume_process_reply
resume_process_reply
;
};
#define SERVER_PROTOCOL_VERSION 58
6
#define SERVER_PROTOCOL_VERSION 58
7
#endif
/* __WINE_WINE_SERVER_PROTOCOL_H */
server/debugger.c
View file @
a679f965
...
...
@@ -714,20 +714,6 @@ DECL_HANDLER(get_exception_status)
}
}
/* simulate a breakpoint in a process */
DECL_HANDLER
(
debug_break
)
{
struct
process
*
process
;
reply
->
self
=
0
;
if
((
process
=
get_process_from_handle
(
req
->
handle
,
PROCESS_SET_INFORMATION
/*FIXME*/
)))
{
if
(
process
!=
current
->
process
)
break_process
(
process
);
else
reply
->
self
=
1
;
release_object
(
process
);
}
}
/* set debugger kill on exit flag */
DECL_HANDLER
(
set_debugger_kill_on_exit
)
{
...
...
server/protocol.def
View file @
a679f965
...
...
@@ -1940,14 +1940,6 @@ enum char_info_mode
@END
/* Simulate a breakpoint in a process */
@REQ(debug_break)
obj_handle_t handle; /* process handle */
@REPLY
int self; /* was it the caller itself? */
@END
/* Set debugger kill on exit flag */
@REQ(set_debugger_kill_on_exit)
int kill_on_exit; /* 0=detach/1=kill debuggee when debugger dies */
...
...
server/request.h
View file @
a679f965
...
...
@@ -213,7 +213,6 @@ DECL_HANDLER(queue_exception_event);
DECL_HANDLER
(
get_exception_status
);
DECL_HANDLER
(
continue_debug_event
);
DECL_HANDLER
(
debug_process
);
DECL_HANDLER
(
debug_break
);
DECL_HANDLER
(
set_debugger_kill_on_exit
);
DECL_HANDLER
(
read_process_memory
);
DECL_HANDLER
(
write_process_memory
);
...
...
@@ -517,7 +516,6 @@ static const req_handler req_handlers[REQ_NB_REQUESTS] =
(
req_handler
)
req_get_exception_status
,
(
req_handler
)
req_continue_debug_event
,
(
req_handler
)
req_debug_process
,
(
req_handler
)
req_debug_break
,
(
req_handler
)
req_set_debugger_kill_on_exit
,
(
req_handler
)
req_read_process_memory
,
(
req_handler
)
req_write_process_memory
,
...
...
@@ -1376,10 +1374,6 @@ C_ASSERT( sizeof(struct continue_debug_event_request) == 24 );
C_ASSERT
(
FIELD_OFFSET
(
struct
debug_process_request
,
pid
)
==
12
);
C_ASSERT
(
FIELD_OFFSET
(
struct
debug_process_request
,
attach
)
==
16
);
C_ASSERT
(
sizeof
(
struct
debug_process_request
)
==
24
);
C_ASSERT
(
FIELD_OFFSET
(
struct
debug_break_request
,
handle
)
==
12
);
C_ASSERT
(
sizeof
(
struct
debug_break_request
)
==
16
);
C_ASSERT
(
FIELD_OFFSET
(
struct
debug_break_reply
,
self
)
==
8
);
C_ASSERT
(
sizeof
(
struct
debug_break_reply
)
==
16
);
C_ASSERT
(
FIELD_OFFSET
(
struct
set_debugger_kill_on_exit_request
,
kill_on_exit
)
==
12
);
C_ASSERT
(
sizeof
(
struct
set_debugger_kill_on_exit_request
)
==
16
);
C_ASSERT
(
FIELD_OFFSET
(
struct
read_process_memory_request
,
handle
)
==
12
);
...
...
server/trace.c
View file @
a679f965
...
...
@@ -2447,16 +2447,6 @@ static void dump_debug_process_request( const struct debug_process_request *req
fprintf
(
stderr
,
", attach=%d"
,
req
->
attach
);
}
static
void
dump_debug_break_request
(
const
struct
debug_break_request
*
req
)
{
fprintf
(
stderr
,
" handle=%04x"
,
req
->
handle
);
}
static
void
dump_debug_break_reply
(
const
struct
debug_break_reply
*
req
)
{
fprintf
(
stderr
,
" self=%d"
,
req
->
self
);
}
static
void
dump_set_debugger_kill_on_exit_request
(
const
struct
set_debugger_kill_on_exit_request
*
req
)
{
fprintf
(
stderr
,
" kill_on_exit=%d"
,
req
->
kill_on_exit
);
...
...
@@ -4708,7 +4698,6 @@ static const dump_func req_dumpers[REQ_NB_REQUESTS] = {
(
dump_func
)
dump_get_exception_status_request
,
(
dump_func
)
dump_continue_debug_event_request
,
(
dump_func
)
dump_debug_process_request
,
(
dump_func
)
dump_debug_break_request
,
(
dump_func
)
dump_set_debugger_kill_on_exit_request
,
(
dump_func
)
dump_read_process_memory_request
,
(
dump_func
)
dump_write_process_memory_request
,
...
...
@@ -5009,7 +4998,6 @@ static const dump_func reply_dumpers[REQ_NB_REQUESTS] = {
(
dump_func
)
dump_get_exception_status_reply
,
NULL
,
NULL
,
(
dump_func
)
dump_debug_break_reply
,
NULL
,
(
dump_func
)
dump_read_process_memory_reply
,
NULL
,
...
...
@@ -5310,7 +5298,6 @@ static const char * const req_names[REQ_NB_REQUESTS] = {
"get_exception_status"
,
"continue_debug_event"
,
"debug_process"
,
"debug_break"
,
"set_debugger_kill_on_exit"
,
"read_process_memory"
,
"write_process_memory"
,
...
...
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