Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
wine
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Sam Joan Roque-Worcel
wine
Commits
1d2ba529
Commit
1d2ba529
authored
25 years ago
by
Alexandre Julliard
Browse files
Options
Downloads
Patches
Plain Diff
Added current context to the exception debug event sent to the server.
parent
17cf8101
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
dlls/ntdll/exception.c
+2
-2
2 additions, 2 deletions
dlls/ntdll/exception.c
include/process.h
+1
-1
1 addition, 1 deletion
include/process.h
include/server.h
+2
-1
2 additions, 1 deletion
include/server.h
scheduler/debugger.c
+20
-11
20 additions, 11 deletions
scheduler/debugger.c
with
25 additions
and
15 deletions
dlls/ntdll/exception.c
+
2
−
2
View file @
1d2ba529
...
...
@@ -122,7 +122,7 @@ static DWORD EXC_CallHandler( EXCEPTION_RECORD *record, EXCEPTION_FRAME *frame,
static
void
EXC_DefaultHandling
(
EXCEPTION_RECORD
*
rec
,
CONTEXT
*
context
)
{
if
((
PROCESS_Current
()
->
flags
&
PDB32_DEBUGGED
)
&&
(
DEBUG_SendExceptionEvent
(
rec
,
FALSE
)
==
DBG_CONTINUE
))
(
DEBUG_SendExceptionEvent
(
rec
,
FALSE
,
context
)
==
DBG_CONTINUE
))
return
;
/* continue execution */
if
(
debug_hook
(
rec
,
context
,
FALSE
)
==
DBG_CONTINUE
)
...
...
@@ -152,7 +152,7 @@ void WINAPI EXC_RtlRaiseException( EXCEPTION_RECORD *rec, CONTEXT *context )
TRACE
(
"code=%lx flags=%lx
\n
"
,
rec
->
ExceptionCode
,
rec
->
ExceptionFlags
);
if
((
PROCESS_Current
()
->
flags
&
PDB32_DEBUGGED
)
&&
(
DEBUG_SendExceptionEvent
(
rec
,
TRUE
)
==
DBG_CONTINUE
))
(
DEBUG_SendExceptionEvent
(
rec
,
TRUE
,
context
)
==
DBG_CONTINUE
))
return
;
/* continue execution */
if
(
debug_hook
(
rec
,
context
,
TRUE
)
==
DBG_CONTINUE
)
...
...
This diff is collapsed.
Click to expand it.
include/process.h
+
1
−
1
View file @
1d2ba529
...
...
@@ -166,7 +166,7 @@ extern void PROCESS_FreePDB( PDB *pdb );
extern
void
PROCESS_WalkProcess
(
void
);
/* scheduler/debugger.c */
extern
DWORD
DEBUG_SendExceptionEvent
(
EXCEPTION_RECORD
*
rec
,
BOOL
first_chance
);
extern
DWORD
DEBUG_SendExceptionEvent
(
EXCEPTION_RECORD
*
rec
,
BOOL
first_chance
,
CONTEXT
*
ctx
);
extern
DWORD
DEBUG_SendCreateProcessEvent
(
HFILE
file
,
HMODULE
module
,
void
*
entry
);
extern
DWORD
DEBUG_SendCreateThreadEvent
(
void
*
entry
);
extern
DWORD
DEBUG_SendLoadDLLEvent
(
HFILE
file
,
HMODULE
module
,
LPSTR
*
name
);
...
...
This diff is collapsed.
Click to expand it.
include/server.h
+
2
−
1
View file @
1d2ba529
...
...
@@ -9,7 +9,7 @@
#include
<stdlib.h>
#include
<time.h>
#include
"win
def
.h"
#include
"win
base
.h"
/* Request structures */
...
...
@@ -734,6 +734,7 @@ struct debug_event_exception
int
nb_params
;
/* exceptions parameters */
int
params
[
15
];
int
first_chance
;
/* first chance to handle it? */
CONTEXT
context
;
/* thread context */
};
struct
debug_event_create_thread
{
...
...
This diff is collapsed.
Click to expand it.
scheduler/debugger.c
+
20
−
11
View file @
1d2ba529
...
...
@@ -34,19 +34,28 @@ static DWORD DEBUG_SendEvent( int code, void *data, int size )
*
* Send an EXCEPTION_DEBUG_EVENT event to the current process debugger.
*/
DWORD
DEBUG_SendExceptionEvent
(
EXCEPTION_RECORD
*
rec
,
BOOL
first_chance
)
DWORD
DEBUG_SendExceptionEvent
(
EXCEPTION_RECORD
*
rec
,
BOOL
first_chance
,
CONTEXT
*
context
)
{
struct
debug_event_exception
event
;
int
i
;
event
.
code
=
rec
->
ExceptionCode
;
event
.
flags
=
rec
->
ExceptionFlags
;
event
.
record
=
rec
->
ExceptionRecord
;
event
.
addr
=
rec
->
ExceptionAddress
;
event
.
nb_params
=
rec
->
NumberParameters
;
for
(
i
=
0
;
i
<
event
.
nb_params
;
i
++
)
event
.
params
[
i
]
=
rec
->
ExceptionInformation
[
i
];
event
.
first_chance
=
first_chance
;
return
DEBUG_SendEvent
(
EXCEPTION_DEBUG_EVENT
,
&
event
,
sizeof
(
event
)
);
DWORD
ret
=
0
;
struct
send_debug_event_request
*
req
=
get_req_buffer
();
struct
debug_event_exception
*
event
=
(
struct
debug_event_exception
*
)(
req
+
1
);
req
->
code
=
EXCEPTION_DEBUG_EVENT
;
event
->
code
=
rec
->
ExceptionCode
;
event
->
flags
=
rec
->
ExceptionFlags
;
event
->
record
=
rec
->
ExceptionRecord
;
event
->
addr
=
rec
->
ExceptionAddress
;
event
->
nb_params
=
rec
->
NumberParameters
;
for
(
i
=
0
;
i
<
event
->
nb_params
;
i
++
)
event
->
params
[
i
]
=
rec
->
ExceptionInformation
[
i
];
event
->
first_chance
=
first_chance
;
event
->
context
=
*
context
;
if
(
!
server_call
(
REQ_SEND_DEBUG_EVENT
))
{
ret
=
req
->
status
;
*
context
=
event
->
context
;
}
return
ret
;
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment