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
40912b90
Commit
40912b90
authored
Jul 20, 2002
by
Eric Pouech
Committed by
Alexandre Julliard
Jul 20, 2002
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Inverted inner loops (Win32 debug event handling / WineDbg command
line parser).
parent
57807fa1
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
31 additions
and
35 deletions
+31
-35
break.c
debugger/break.c
+2
-2
dbg.y
debugger/dbg.y
+16
-28
debugger.h
debugger/debugger.h
+11
-2
hash.c
debugger/hash.c
+1
-1
source.c
debugger/source.c
+1
-2
winedbg.c
debugger/winedbg.c
+0
-0
No files found.
debugger/break.c
View file @
40912b90
...
...
@@ -836,8 +836,8 @@ BOOL DEBUG_ShouldContinue( DBG_ADDR *addr, DWORD code, int * count )
*/
if
(
mode
!=
EXEC_CONT
&&
mode
!=
EXEC_FINISH
)
{
DEBUG_FindNearestSymbol
(
addr
,
TRUE
,
NULL
,
0
,
&
syminfo
.
list
);
if
(
syminfo
.
list
.
sourcefile
!=
NULL
)
DEBUG_FindNearestSymbol
(
addr
,
TRUE
,
NULL
,
0
,
&
syminfo
.
list
);
if
(
syminfo
.
list
.
sourcefile
!=
NULL
)
{
DEBUG_List
(
&
syminfo
.
list
,
NULL
,
0
);
}
...
...
debugger/dbg.y
View file @
40912b90
...
...
@@ -105,30 +105,21 @@ line: command
;
command:
tQUIT tEOL {
DEBUG_ExitMode = EXIT_QUIT;
return 1; }
tQUIT tEOL {
/*DEBUG_Quit();*/
return 1; }
| tHELP tEOL { DEBUG_Help(); }
| tHELP tINFO tEOL { DEBUG_HelpInfo(); }
| tCONT tEOL { DEBUG_CurrThread->exec_count = 1;
DEBUG_CurrThread->exec_mode = EXEC_CONT; return 1; }
| tPASS tEOL { DEBUG_ExitMode = EXIT_PASS; return 1; }
| tCONT tNUM tEOL { DEBUG_CurrThread->exec_count = $2;
DEBUG_CurrThread->exec_mode = EXEC_CONT; return 1; }
| tSTEP tEOL { DEBUG_CurrThread->exec_count = 1;
DEBUG_CurrThread->exec_mode = EXEC_STEP_INSTR; return 1; }
| tNEXT tEOL { DEBUG_CurrThread->exec_count = 1;
DEBUG_CurrThread->exec_mode = EXEC_STEP_OVER; return 1; }
| tSTEP tNUM tEOL { DEBUG_CurrThread->exec_count = $2;
DEBUG_CurrThread->exec_mode = EXEC_STEP_INSTR; return 1; }
| tNEXT tNUM tEOL { DEBUG_CurrThread->exec_count = $2;
DEBUG_CurrThread->exec_mode = EXEC_STEP_OVER; return 1; }
| tSTEPI tEOL { DEBUG_CurrThread->exec_count = 1;
DEBUG_CurrThread->exec_mode = EXEC_STEPI_INSTR; return 1; }
| tNEXTI tEOL { DEBUG_CurrThread->exec_count = 1;
DEBUG_CurrThread->exec_mode = EXEC_STEPI_OVER; return 1; }
| tSTEPI tNUM tEOL { DEBUG_CurrThread->exec_count = $2;
DEBUG_CurrThread->exec_mode = EXEC_STEPI_INSTR; return 1; }
| tNEXTI tNUM tEOL { DEBUG_CurrThread->exec_count = $2;
DEBUG_CurrThread->exec_mode = EXEC_STEPI_OVER; return 1; }
| tPASS tEOL { DEBUG_WaitNextException(DBG_EXCEPTION_NOT_HANDLED, 0, 0); }
| tCONT tEOL { DEBUG_WaitNextException(DBG_CONTINUE, 1, EXEC_CONT); }
| tCONT tNUM tEOL { DEBUG_WaitNextException(DBG_CONTINUE, $2, EXEC_CONT); }
| tSTEP tEOL { DEBUG_WaitNextException(DBG_CONTINUE, 1, EXEC_STEP_INSTR); }
| tSTEP tNUM tEOL { DEBUG_WaitNextException(DBG_CONTINUE, $2, EXEC_STEP_INSTR); }
| tNEXT tEOL { DEBUG_WaitNextException(DBG_CONTINUE, 1, EXEC_STEP_OVER); }
| tNEXT tNUM tEOL { DEBUG_WaitNextException(DBG_CONTINUE, $2, EXEC_STEP_OVER); }
| tSTEPI tEOL { DEBUG_WaitNextException(DBG_CONTINUE, 1, EXEC_STEPI_INSTR); }
| tSTEPI tNUM tEOL { DEBUG_WaitNextException(DBG_CONTINUE, $2, EXEC_STEPI_INSTR); }
| tNEXTI tEOL { DEBUG_WaitNextException(DBG_CONTINUE, 1, EXEC_STEPI_OVER); }
| tNEXTI tNUM tEOL { DEBUG_WaitNextException(DBG_CONTINUE, $2, EXEC_STEPI_OVER); }
| tFINISH tEOL { DEBUG_WaitNextException(DBG_CONTINUE, 0, EXEC_FINISH); }
| tABORT tEOL { kill(getpid(), SIGABRT); }
| tMODE tNUM tEOL { mode_command($2); }
| tMODE tVM86 tEOL { DEBUG_CurrThread->dbg_mode = MODE_VM86; }
...
...
@@ -142,8 +133,6 @@ command:
| tDOWN tEOL { DEBUG_SetFrame( curr_frame - 1 ); }
| tDOWN tNUM tEOL { DEBUG_SetFrame( curr_frame - $2 ); }
| tFRAME tNUM tEOL { DEBUG_SetFrame( $2 ); }
| tFINISH tEOL { DEBUG_CurrThread->exec_count = 0;
DEBUG_CurrThread->exec_mode = EXEC_FINISH; return 1; }
| tSHOW tDIR tEOL { DEBUG_ShowDir(); }
| tDIR pathname tEOL { DEBUG_AddPath( $2 ); }
| tDIR tEOL { DEBUG_NukePath(); }
...
...
@@ -158,8 +147,8 @@ command:
| tCOND tNUM expr tEOL { DEBUG_AddBPCondition($2, $3); }
| tSYMBOLFILE pathname tEOL { DEBUG_ReadSymbolTable($2); }
| tWHATIS expr_addr tEOL { DEBUG_PrintType(&$2); DEBUG_FreeExprMem(); }
| tATTACH tNUM tEOL {
if (DEBUG_Attach($2, FALSE)) return 1
; }
| tDETACH tEOL {
DEBUG_ExitMode = EXIT_DETACH; return 1;
}
| tATTACH tNUM tEOL {
DEBUG_Attach($2, FALSE)
; }
| tDETACH tEOL {
return DEBUG_Detach(); /* FIXME: we shouldn't return, but since we cannot simply clean the symbol table, exit debugger for now */
}
| list_command
| disassemble_command
| set_command
...
...
@@ -415,6 +404,7 @@ static WINE_EXCEPTION_FILTER(wine_dbg_cmd)
break;
default:
DEBUG_Printf(DBG_CHN_MESG, "Exception %lx\n", GetExceptionCode());
DEBUG_ExternalDebugger();
break;
}
...
...
@@ -434,8 +424,6 @@ void DEBUG_Parser(void)
#endif
yyin = stdin;
DEBUG_ExitMode = EXIT_CONTINUE;
ret_ok = FALSE;
do {
__TRY {
...
...
debugger/debugger.h
View file @
40912b90
...
...
@@ -241,7 +241,7 @@ extern DBG_THREAD* DEBUG_CurrThread;
extern
DWORD
DEBUG_CurrTid
;
extern
DWORD
DEBUG_CurrPid
;
extern
CONTEXT
DEBUG_context
;
extern
BOOL
DEBUG_
i
nteractiveP
;
extern
BOOL
DEBUG_
I
nteractiveP
;
extern
enum
exit_mode
DEBUG_ExitMode
;
#define DEBUG_READ_MEM(addr, buf, len) \
...
...
@@ -527,10 +527,19 @@ extern DBG_INTVAR* DEBUG_GetIntVar(const char*);
extern
BOOL
DEBUG_Attach
(
DWORD
pid
,
BOOL
cofe
);
extern
BOOL
DEBUG_Detach
(
void
);
extern
void
DEBUG_Run
(
const
char
*
args
);
extern
DBG_PROCESS
*
DEBUG_AddProcess
(
DWORD
pid
,
HANDLE
h
,
const
char
*
imageName
);
extern
DBG_PROCESS
*
DEBUG_GetProcess
(
DWORD
pid
);
extern
void
DEBUG_DelProcess
(
DBG_PROCESS
*
p
);
extern
DBG_THREAD
*
DEBUG_AddThread
(
DBG_PROCESS
*
p
,
DWORD
tid
,
HANDLE
h
,
LPVOID
start
,
LPVOID
teb
);
extern
DBG_THREAD
*
DEBUG_GetThread
(
DBG_PROCESS
*
p
,
DWORD
tid
);
extern
void
DEBUG_DelThread
(
DBG_THREAD
*
t
);
extern
BOOL
DEBUG_ProcessGetString
(
char
*
buffer
,
int
size
,
HANDLE
hp
,
LPSTR
addr
);
extern
BOOL
DEBUG_ProcessGetStringIndirect
(
char
*
buffer
,
int
size
,
HANDLE
hp
,
LPVOID
addr
);
extern
void
DEBUG_WaitNextException
(
DWORD
cont
,
int
count
,
int
mode
);
extern
int
curr_frame
;
extern
int
automatic_mode
;
/* gdbproxy.c */
extern
BOOL
DEBUG_GdbRemote
(
unsigned
int
);
/* Choose your allocator! */
#if 1
...
...
debugger/hash.c
View file @
40912b90
...
...
@@ -399,7 +399,7 @@ BOOL DEBUG_GetSymbolValue( const char * name, const int lineno,
if
(
num
==
0
)
{
return
FALSE
;
}
else
if
(
!
DEBUG_
i
nteractiveP
||
num
==
1
)
{
}
else
if
(
!
DEBUG_
I
nteractiveP
||
num
==
1
)
{
i
=
0
;
}
else
{
char
buffer
[
256
];
...
...
debugger/source.c
View file @
40912b90
...
...
@@ -196,7 +196,7 @@ DEBUG_DisplaySource(char * sourcefile, int start, int end)
if
(
sl
==
NULL
)
{
if
(
!
automatic_mode
)
if
(
DEBUG_InteractiveP
)
{
char
zbuf
[
256
];
/*
...
...
@@ -495,4 +495,3 @@ DEBUG_Disassemble(const DBG_VALUE *xstart,const DBG_VALUE *xend,int offset)
DEBUG_LastDisassemble
=
last
;
return
;
}
debugger/winedbg.c
View file @
40912b90
This diff is collapsed.
Click to expand it.
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