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
3972efae
Commit
3972efae
authored
22 years ago
by
Alexandre Julliard
Browse files
Options
Downloads
Patches
Plain Diff
Added 'walk exception' command.
parent
ea97b39a
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/dbg.y
+3
-1
3 additions, 1 deletion
debugger/dbg.y
debugger/debug.l
+1
-0
1 addition, 0 deletions
debugger/debug.l
debugger/debugger.h
+1
-0
1 addition, 0 deletions
debugger/debugger.h
debugger/info.c
+53
-0
53 additions, 0 deletions
debugger/info.c
with
58 additions
and
1 deletion
debugger/dbg.y
+
3
−
1
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(); }
;
...
...
This diff is collapsed.
Click to expand it.
debugger/debug.l
+
1
−
0
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; }
...
...
This diff is collapsed.
Click to expand it.
debugger/debugger.h
+
1
−
0
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
);
...
...
This diff is collapsed.
Click to expand it.
debugger/info.c
+
53
−
0
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
];
...
...
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