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
cb0f1a9c
Commit
cb0f1a9c
authored
May 24, 1999
by
Eric Pouech
Committed by
Alexandre Julliard
May 24, 1999
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Check when backtracking the stack if frames are correct (readable).
parent
89fc6fda
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
35 additions
and
2 deletions
+35
-2
stack.c
debugger/stack.c
+35
-2
No files found.
debugger/stack.c
View file @
cb0f1a9c
...
...
@@ -225,10 +225,18 @@ static void DEBUG_DoBackTrace(int noisy)
next_switch
=
THREAD_Current
()
->
cur_stack
;
if
(
is16
)
{
if
(
IsBadReadPtr
((
STACK32FRAME
*
)
next_switch
,
sizeof
(
STACK32FRAME
)))
{
fprintf
(
stderr
,
"Bad stack frame %p
\n
"
,
(
STACK32FRAME
*
)
next_switch
);
return
;
}
cur_switch
=
(
DWORD
)((
STACK32FRAME
*
)
next_switch
)
->
frame16
;
sw_addr
.
seg
=
SELECTOROF
(
cur_switch
);
sw_addr
.
off
=
OFFSETOF
(
cur_switch
);
}
else
{
if
(
IsBadReadPtr
((
STACK16FRAME
*
)
PTR_SEG_TO_LIN
(
next_switch
),
sizeof
(
STACK16FRAME
)))
{
fprintf
(
stderr
,
"Bad stack frame %p
\n
"
,
(
STACK16FRAME
*
)
PTR_SEG_TO_LIN
(
next_switch
)
);
return
;
}
cur_switch
=
(
DWORD
)((
STACK16FRAME
*
)
PTR_SEG_TO_LIN
(
next_switch
))
->
frame32
;
sw_addr
.
seg
=
ss
;
sw_addr
.
off
=
cur_switch
;
...
...
@@ -245,7 +253,15 @@ static void DEBUG_DoBackTrace(int noisy)
* yes, I know this is confusing, it gave me a headache too */
if
(
is16
)
{
STACK32FRAME
*
frame
=
(
STACK32FRAME
*
)
next_switch
;
DBG_ADDR
code
=
{
NULL
,
0
,
frame
->
retaddr
};
DBG_ADDR
code
;
if
(
IsBadReadPtr
((
STACK32FRAME
*
)
next_switch
,
sizeof
(
STACK32FRAME
)))
{
fprintf
(
stderr
,
"Bad stack frame %p
\n
"
,
(
STACK32FRAME
*
)
next_switch
);
return
;
}
code
.
type
=
NULL
;
code
.
seg
=
0
;
code
.
off
=
frame
->
retaddr
;
cs
=
0
;
addr
.
seg
=
0
;
...
...
@@ -253,6 +269,10 @@ static void DEBUG_DoBackTrace(int noisy)
DEBUG_ForceFrame
(
&
addr
,
&
code
,
++
frameno
,
32
,
noisy
);
next_switch
=
cur_switch
;
if
(
IsBadReadPtr
((
STACK16FRAME
*
)
PTR_SEG_TO_LIN
(
next_switch
),
sizeof
(
STACK16FRAME
)))
{
fprintf
(
stderr
,
"Bad stack frame %p
\n
"
,
(
STACK16FRAME
*
)
PTR_SEG_TO_LIN
(
next_switch
)
);
return
;
}
cur_switch
=
(
DWORD
)((
STACK16FRAME
*
)
PTR_SEG_TO_LIN
(
next_switch
))
->
frame32
;
sw_addr
.
seg
=
0
;
sw_addr
.
off
=
cur_switch
;
...
...
@@ -260,7 +280,16 @@ static void DEBUG_DoBackTrace(int noisy)
is16
=
FALSE
;
}
else
{
STACK16FRAME
*
frame
=
(
STACK16FRAME
*
)
PTR_SEG_TO_LIN
(
next_switch
);
DBG_ADDR
code
=
{
NULL
,
frame
->
cs
,
frame
->
ip
};
DBG_ADDR
code
;
if
(
IsBadReadPtr
((
STACK16FRAME
*
)
PTR_SEG_TO_LIN
(
next_switch
),
sizeof
(
STACK16FRAME
)))
{
fprintf
(
stderr
,
"Bad stack frame %p
\n
"
,
(
STACK16FRAME
*
)
PTR_SEG_TO_LIN
(
next_switch
)
);
return
;
}
code
.
type
=
NULL
;
code
.
seg
=
frame
->
cs
;
code
.
off
=
frame
->
ip
;
cs
=
frame
->
cs
;
addr
.
seg
=
SELECTOROF
(
next_switch
);
...
...
@@ -268,6 +297,10 @@ static void DEBUG_DoBackTrace(int noisy)
DEBUG_ForceFrame
(
&
addr
,
&
code
,
++
frameno
,
16
,
noisy
);
next_switch
=
cur_switch
;
if
(
IsBadReadPtr
((
STACK32FRAME
*
)
next_switch
,
sizeof
(
STACK32FRAME
)))
{
fprintf
(
stderr
,
"Bad stack frame %p
\n
"
,
(
STACK32FRAME
*
)
next_switch
);
return
;
}
cur_switch
=
(
DWORD
)((
STACK32FRAME
*
)
next_switch
)
->
frame16
;
sw_addr
.
seg
=
SELECTOROF
(
cur_switch
);
sw_addr
.
off
=
OFFSETOF
(
cur_switch
);
...
...
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