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
4973a745
Commit
4973a745
authored
Aug 28, 2002
by
Eric Pouech
Committed by
Alexandre Julliard
Aug 28, 2002
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed breaking DLL load.
parent
2bfed460
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
48 additions
and
36 deletions
+48
-36
winedbg.c
debugger/winedbg.c
+48
-36
No files found.
debugger/winedbg.c
View file @
4973a745
...
...
@@ -38,8 +38,9 @@ DBG_PROCESS* DEBUG_CurrProcess = NULL;
DBG_THREAD
*
DEBUG_CurrThread
=
NULL
;
DWORD
DEBUG_CurrTid
;
DWORD
DEBUG_CurrPid
;
CONTEXT
DEBUG_context
;
CONTEXT
DEBUG_context
;
BOOL
DEBUG_InteractiveP
=
FALSE
;
static
BOOL
DEBUG_InException
=
FALSE
;
int
curr_frame
=
0
;
static
char
*
DEBUG_LastCmdLine
=
NULL
;
...
...
@@ -333,11 +334,31 @@ BOOL DEBUG_Detach(void)
return
TRUE
;
}
static
BOOL
DEBUG_FetchContext
(
void
)
{
DEBUG_context
.
ContextFlags
=
CONTEXT_CONTROL
|
CONTEXT_INTEGER
#ifdef CONTEXT_SEGMENTS
|
CONTEXT_SEGMENTS
#endif
#ifdef CONTEXT_DEBUG_REGISTERS
|
CONTEXT_DEBUG_REGISTERS
#endif
;
if
(
!
GetThreadContext
(
DEBUG_CurrThread
->
handle
,
&
DEBUG_context
))
{
DEBUG_Printf
(
DBG_CHN_WARN
,
"Can't get thread's context
\n
"
);
return
FALSE
;
}
return
TRUE
;
}
static
BOOL
DEBUG_ExceptionProlog
(
BOOL
is_debug
,
BOOL
force
,
DWORD
code
)
{
DBG_ADDR
addr
;
int
newmode
;
DEBUG_InException
=
TRUE
;
DEBUG_GetCurrentAddress
(
&
addr
);
DEBUG_SuspendExecution
();
...
...
@@ -429,6 +450,7 @@ static void DEBUG_ExceptionEpilog(void)
*/
if
(
DEBUG_CurrThread
->
exec_mode
==
EXEC_CONT
)
DEBUG_CurrThread
->
exec_count
=
0
;
DEBUG_InException
=
FALSE
;
}
static
BOOL
DEBUG_HandleException
(
EXCEPTION_RECORD
*
rec
,
BOOL
first_chance
,
BOOL
force
)
...
...
@@ -600,29 +622,16 @@ static BOOL DEBUG_HandleDebugEvent(DEBUG_EVENT* de)
if
(
!
DBG_IVAR
(
BreakOnAttach
))
break
;
}
DEBUG_context
.
ContextFlags
=
CONTEXT_CONTROL
|
CONTEXT_INTEGER
#ifdef CONTEXT_SEGMENTS
|
CONTEXT_SEGMENTS
#endif
#ifdef CONTEXT_DEBUG_REGISTERS
|
CONTEXT_DEBUG_REGISTERS
#endif
;
if
(
!
GetThreadContext
(
DEBUG_CurrThread
->
handle
,
&
DEBUG_context
))
{
DEBUG_Printf
(
DBG_CHN_WARN
,
"Can't get thread's context
\n
"
);
break
;
}
ret
=
DEBUG_HandleException
(
&
de
->
u
.
Exception
.
ExceptionRecord
,
de
->
u
.
Exception
.
dwFirstChance
,
DEBUG_CurrThread
->
wait_for_first_exception
);
if
(
DEBUG_CurrThread
)
if
(
DEBUG_FetchContext
())
{
DEBUG_CurrThread
->
wait_for_first_exception
=
0
;
SetThreadContext
(
DEBUG_CurrThread
->
handle
,
&
DEBUG_context
);
ret
=
DEBUG_HandleException
(
&
de
->
u
.
Exception
.
ExceptionRecord
,
de
->
u
.
Exception
.
dwFirstChance
,
DEBUG_CurrThread
->
wait_for_first_exception
);
if
(
!
ret
&&
DEBUG_CurrThread
)
{
DEBUG_CurrThread
->
wait_for_first_exception
=
0
;
SetThreadContext
(
DEBUG_CurrThread
->
handle
,
&
DEBUG_context
);
}
}
break
;
...
...
@@ -764,7 +773,7 @@ static BOOL DEBUG_HandleDebugEvent(DEBUG_EVENT* de)
{
DEBUG_Printf
(
DBG_CHN_MESG
,
"Stopping on DLL %s loading at %08lx
\n
"
,
buffer
,
(
unsigned
long
)
de
->
u
.
LoadDll
.
lpBaseOfDll
);
ret
=
TRUE
;
ret
=
DEBUG_FetchContext
()
;
}
break
;
...
...
@@ -805,24 +814,27 @@ static BOOL DEBUG_HandleDebugEvent(DEBUG_EVENT* de)
static
void
DEBUG_ResumeDebuggee
(
DWORD
cont
)
{
DEBUG_ExceptionEpilog
();
if
(
DEBUG_InException
)
{
DEBUG_ExceptionEpilog
();
#if 1
DEBUG_Printf
(
DBG_CHN_TRACE
,
"Exiting debugger PC=%lx EFL=%08lx mode=%d count=%d
\n
"
,
DEBUG_Printf
(
DBG_CHN_TRACE
,
"Exiting debugger PC=%lx EFL=%08lx mode=%d count=%d
\n
"
,
#ifdef __i386__
DEBUG_context
.
Eip
,
DEBUG_context
.
EFlags
,
DEBUG_context
.
Eip
,
DEBUG_context
.
EFlags
,
#else
0L
,
0L
,
0L
,
0L
,
#endif
DEBUG_CurrThread
->
exec_mode
,
DEBUG_CurrThread
->
exec_count
);
DEBUG_CurrThread
->
exec_mode
,
DEBUG_CurrThread
->
exec_count
);
#endif
DEBUG_InteractiveP
=
FALSE
;
if
(
DEBUG_CurrThread
)
{
if
(
!
SetThreadContext
(
DEBUG_CurrThread
->
handle
,
&
DEBUG_context
))
DEBUG_
Printf
(
DBG_CHN_MESG
,
"Cannot set ctx on %lu
\n
"
,
DEBUG_CurrTid
)
;
DEBUG_CurrThread
->
wait_for_first_exception
=
0
;
if
(
DEBUG_CurrThread
)
{
if
(
!
SetThreadContext
(
DEBUG_CurrThread
->
handle
,
&
DEBUG_context
))
DEBUG_Printf
(
DBG_CHN_MESG
,
"Cannot set ctx on %lu
\n
"
,
DEBUG_CurrTid
);
DEBUG_
CurrThread
->
wait_for_first_exception
=
0
;
}
}
DEBUG_InteractiveP
=
FALSE
;
if
(
!
ContinueDebugEvent
(
DEBUG_CurrPid
,
DEBUG_CurrTid
,
cont
))
DEBUG_Printf
(
DBG_CHN_MESG
,
"Cannot continue on %lu (%lu)
\n
"
,
DEBUG_CurrTid
,
cont
);
...
...
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