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
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
Alexey Alyaev
wine
Commits
ebd01a94
Commit
ebd01a94
authored
25 years ago
by
Eric Pouech
Committed by
Alexandre Julliard
25 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Now relying on exception codes to know when debugger is entered for a
single step trap.
parent
cbb7a172
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
debugger/break.c
+3
-3
3 additions, 3 deletions
debugger/break.c
debugger/dbg.y
+6
-5
6 additions, 5 deletions
debugger/dbg.y
debugger/debug.l
+1
-0
1 addition, 0 deletions
debugger/debug.l
debugger/debugger.h
+2
-2
2 additions, 2 deletions
debugger/debugger.h
with
12 additions
and
10 deletions
debugger/break.c
+
3
−
3
View file @
ebd01a94
...
...
@@ -321,7 +321,7 @@ void DEBUG_InfoBreakpoints(void)
* Determine if we should continue execution after a SIGTRAP signal when
* executing in the given mode.
*/
BOOL
DEBUG_ShouldContinue
(
enum
exec_mode
mode
,
int
*
count
)
BOOL
DEBUG_ShouldContinue
(
DWORD
code
,
enum
exec_mode
mode
,
int
*
count
)
{
DBG_ADDR
addr
;
DBG_ADDR
cond_addr
;
...
...
@@ -330,7 +330,7 @@ BOOL DEBUG_ShouldContinue( enum exec_mode mode, int * count )
#ifdef __i386__
/* If not single-stepping, back up over the int3 instruction */
if
(
!
(
DEBUG_context
.
EFlags
&
STEP_FLAG
)
)
if
(
code
==
EXCEPTION_BREAKPOINT
)
DEBUG_context
.
Eip
--
;
#endif
...
...
@@ -427,7 +427,7 @@ BOOL DEBUG_ShouldContinue( enum exec_mode mode, int * count )
#ifdef __i386__
/* If there's no breakpoint and we are not single-stepping, then we */
/* must have encountered an int3 in the Windows program; let's skip it. */
if
((
bpnum
==
-
1
)
&&
!
(
DEBUG_context
.
EFlags
&
STEP_FLAG
)
)
if
((
bpnum
==
-
1
)
&&
code
==
EXCEPTION_BREAKPOINT
)
DEBUG_context
.
Eip
++
;
#endif
...
...
This diff is collapsed.
Click to expand it.
debugger/dbg.y
+
6
−
5
View file @
ebd01a94
...
...
@@ -41,7 +41,7 @@ int yyerror(char *);
}
%token tCONT tPASS tSTEP tLIST tNEXT tQUIT tHELP tBACKTRACE tINFO tWALK tUP tDOWN
%token tENABLE tDISABLE tBREAK tDELETE tSET tMODE tPRINT tEXAM tABORT
tDEBUGMSG
%token tENABLE tDISABLE tBREAK
tWATCH
tDELETE tSET tMODE tPRINT tEXAM tABORT
%token tCLASS tMAPS tMODULE tSTACK tSEGMENTS tREGS tWND tQUEUE tLOCAL
%token tPROCESS tMODREF
%token tEOL tSTRING tDEBUGSTR
...
...
@@ -407,7 +407,7 @@ void DEBUG_Exit( DWORD exit_code )
*
* Debugger main loop.
*/
BOOL DEBUG_Main( BOOL is_debug, BOOL force )
BOOL DEBUG_Main( BOOL is_debug, BOOL force
, DWORD code
)
{
int newmode;
BOOL ret_ok;
...
...
@@ -430,14 +430,16 @@ BOOL DEBUG_Main( BOOL is_debug, BOOL force )
fprintf( stderr, " in 16-bit code (%04x:%04lx).\n",
(WORD)DEBUG_context.SegCs, DEBUG_context.Eip );
#else
fprintf( stderr, " (%p).\n", GET_IP(DEBUG_
CurrThread->
context) );
fprintf( stderr, " (%p).\n", GET_IP(
&
DEBUG_context) );
#endif
}
if (DEBUG_LoadEntryPoints("Loading new modules symbols:\n"))
DEBUG_ProcessDeferredDebug();
if (force || !(is_debug && DEBUG_ShouldContinue( DEBUG_CurrThread->dbg_exec_mode, &DEBUG_CurrThread->dbg_exec_count )))
if (force || !(is_debug && DEBUG_ShouldContinue( code,
DEBUG_CurrThread->dbg_exec_mode,
&DEBUG_CurrThread->dbg_exec_count )))
{
DBG_ADDR addr;
DEBUG_GetCurrentAddress( &addr );
...
...
@@ -525,7 +527,6 @@ BOOL DEBUG_Main( BOOL is_debug, BOOL force )
*/
if ((DEBUG_CurrThread->dbg_exec_mode == EXEC_CONT) || (DEBUG_CurrThread->dbg_exec_mode == EXEC_PASS))
DEBUG_CurrThread->dbg_exec_count = 0;
/* EPP if (USER_Driver) USER_Driver->pEndDebugging(); */
return (DEBUG_CurrThread->dbg_exec_mode == EXEC_PASS) ? 0 : DBG_CONTINUE;
...
...
This diff is collapsed.
Click to expand it.
debugger/debug.l
+
1
−
0
View file @
ebd01a94
...
...
@@ -150,6 +150,7 @@ $gs { yylval.reg = REG_GS; return tREG; }
<INITIAL>symbolfile|symbols|symbol|sf { BEGIN(PATH_EXPECTED); return tSYMBOLFILE; }
<INITIAL,INFO_CMD,DEL_CMD>break|brea|bre|br|b { BEGIN(PATH_EXPECTED); return tBREAK; }
<INITIAL>watch|watc|wat { BEGIN(PATH_EXPECTED); return tWATCH; }
<INFO_CMD>share|shar|sha { return tSHARE; }
<INFO_CMD>locals|local|loca|loc { return tLOCAL; }
...
...
This diff is collapsed.
Click to expand it.
debugger/debugger.h
+
2
−
2
View file @
ebd01a94
...
...
@@ -177,7 +177,7 @@ extern void DEBUG_DelBreakpoint( int num );
extern
void
DEBUG_EnableBreakpoint
(
int
num
,
BOOL
enable
);
extern
void
DEBUG_InfoBreakpoints
(
void
);
extern
BOOL
DEBUG_HandleTrap
(
void
);
extern
BOOL
DEBUG_ShouldContinue
(
enum
exec_mode
mode
,
int
*
count
);
extern
BOOL
DEBUG_ShouldContinue
(
DWORD
code
,
enum
exec_mode
mode
,
int
*
count
);
extern
void
DEBUG_SuspendExecution
(
void
);
extern
enum
exec_mode
DEBUG_RestartExecution
(
enum
exec_mode
mode
,
int
count
);
extern
BOOL
DEBUG_IsFctReturn
(
void
);
...
...
@@ -362,7 +362,7 @@ extern void DEBUG_ExternalDebugger(void);
/* debugger/dbg.y */
extern
void
DEBUG_Exit
(
DWORD
exit_code
);
extern
BOOL
DEBUG_Main
(
BOOL
is_debug
,
BOOL
force
);
extern
BOOL
DEBUG_Main
(
BOOL
is_debug
,
BOOL
force
,
DWORD
code
);
/* Choose your allocator! */
#if 1
...
...
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