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
3972efae
Commit
3972efae
authored
Aug 13, 2002
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added 'walk exception' command.
parent
ea97b39a
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
58 additions
and
1 deletion
+58
-1
dbg.y
debugger/dbg.y
+3
-1
debug.l
debugger/debug.l
+1
-0
debugger.h
debugger/debugger.h
+1
-0
info.c
debugger/info.c
+53
-0
No files found.
debugger/dbg.y
View file @
3972efae
...
...
@@ -52,7 +52,7 @@ int yyerror(char *);
%token tCONT tPASS tSTEP tLIST tNEXT tQUIT tHELP tBACKTRACE tINFO tWALK tUP tDOWN
%token tENABLE tDISABLE tBREAK tWATCH tDELETE tSET tMODE tPRINT tEXAM tABORT tVM86
%token tCLASS tMAPS tMODULE tSTACK tSEGMENTS tREGS tWND tQUEUE tLOCAL
%token tCLASS tMAPS tMODULE tSTACK tSEGMENTS tREGS tWND tQUEUE tLOCAL
tEXCEPTION
%token tPROCESS tTHREAD tMODREF tEOL tEOF
%token tFRAME tSHARE tCOND tDISPLAY tUNDISPLAY tDISASSEMBLE
%token tSTEPI tNEXTI tFINISH tSHOW tDIR tWHATIS tSOURCE
...
...
@@ -248,6 +248,8 @@ walk_command:
| tWALK tWND tNUM tEOL { DEBUG_WalkWindows( (HWND)$3, 0 ); }
| tWALK tPROCESS tEOL { DEBUG_WalkProcess(); }
| tWALK tTHREAD tEOL { DEBUG_WalkThreads(); }
| tWALK tEXCEPTION tEOL { DEBUG_WalkExceptions(DEBUG_CurrTid); }
| tWALK tEXCEPTION tNUM tEOL { DEBUG_WalkExceptions($3); }
| tWALK tMODREF expr_value tEOL { DEBUG_WalkModref( $3 ); DEBUG_FreeExprMem(); }
;
...
...
debugger/debug.l
View file @
3972efae
...
...
@@ -148,6 +148,7 @@ STRING \"[^\n"]+\"
<INFO_CMD,WALK_CMD>process|proces|proce|proc { return tPROCESS; }
<INFO_CMD,WALK_CMD>threads|thread|threa|thre|thr|th { return tTHREAD; }
<INFO_CMD,WALK_CMD>modref|modre|modr { return tMODREF; }
<WALK_CMD>exception|except|exc|ex { return tEXCEPTION; }
<INFO_CMD>registers|regs|reg|re { return tREGS; }
<INFO_CMD>segments|segment|segm|seg|se { return tSEGMENTS; }
<INFO_CMD>stack|stac|sta|st { return tSTACK; }
...
...
debugger/debugger.h
View file @
3972efae
...
...
@@ -405,6 +405,7 @@ extern void DEBUG_DumpModule(DWORD mod);
extern
void
DEBUG_WalkModules
(
void
);
extern
void
DEBUG_WalkProcess
(
void
);
extern
void
DEBUG_WalkThreads
(
void
);
extern
void
DEBUG_WalkExceptions
(
DWORD
tid
);
extern
void
DEBUG_DumpQueue
(
DWORD
q
);
extern
void
DEBUG_WalkQueues
(
void
);
extern
void
DEBUG_InfoSegments
(
DWORD
s
,
int
v
);
...
...
debugger/info.c
View file @
3972efae
...
...
@@ -543,6 +543,59 @@ void DEBUG_WalkModref(DWORD p)
DEBUG_Printf
(
DBG_CHN_MESG
,
"No longer walking module references list
\n
"
);
}
/***********************************************************************
* DEBUG_WalkExceptions
*
* Walk the exception frames of a given thread.
*/
void
DEBUG_WalkExceptions
(
DWORD
tid
)
{
DBG_THREAD
*
thread
;
void
*
next_frame
;
DEBUG_Printf
(
DBG_CHN_MESG
,
"Exception frames:
\n
"
);
if
(
tid
==
DEBUG_CurrTid
)
thread
=
DEBUG_CurrThread
;
else
{
thread
=
DEBUG_GetThread
(
DEBUG_CurrProcess
,
tid
);
if
(
!
thread
)
{
DEBUG_Printf
(
DBG_CHN_MESG
,
"Unknown thread id (0x%08lx) in current process
\n
"
,
tid
);
return
;
}
if
(
SuspendThread
(
thread
->
handle
)
==
-
1
)
{
DEBUG_Printf
(
DBG_CHN_MESG
,
"Can't suspend thread id (0x%08lx)
\n
"
,
tid
);
return
;
}
}
if
(
!
DEBUG_READ_MEM
(
thread
->
teb
,
&
next_frame
,
sizeof
(
next_frame
)))
{
DEBUG_Printf
(
DBG_CHN_MESG
,
"Can't read TEB:except_frame
\n
"
);
return
;
}
while
(
next_frame
!=
(
void
*
)
-
1
)
{
EXCEPTION_FRAME
frame
;
DEBUG_Printf
(
DBG_CHN_MESG
,
"%p: "
,
next_frame
);
if
(
!
DEBUG_READ_MEM
(
next_frame
,
&
frame
,
sizeof
(
frame
)))
{
DEBUG_Printf
(
DBG_CHN_MESG
,
"Invalid frame address
\n
"
);
break
;
}
DEBUG_Printf
(
DBG_CHN_MESG
,
"prev=%p handler=%p
\n
"
,
frame
.
Prev
,
frame
.
Handler
);
next_frame
=
frame
.
Prev
;
}
if
(
tid
!=
DEBUG_CurrTid
)
ResumeThread
(
thread
->
handle
);
}
void
DEBUG_InfoSegments
(
DWORD
start
,
int
length
)
{
char
flags
[
3
];
...
...
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