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
f7908160
Commit
f7908160
authored
Jan 13, 2008
by
Eric Pouech
Committed by
Alexandre Julliard
Jan 14, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winedbg: Fixed bt all so that current process/thread isn't lost.
parent
b32cfb18
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
4 deletions
+16
-4
stack.c
programs/winedbg/stack.c
+16
-4
No files found.
programs/winedbg/stack.c
View file @
f7908160
...
...
@@ -351,6 +351,9 @@ static void backtrace_tid(struct dbg_process* pcs, DWORD tid)
static
void
backtrace_all
(
void
)
{
struct
dbg_process
*
process
=
dbg_curr_process
;
struct
dbg_thread
*
thread
=
dbg_curr_thread
;
CONTEXT
ctx
=
dbg_context
;
DWORD
cpid
=
dbg_curr_pid
;
THREADENTRY32
entry
;
HANDLE
snapshot
=
CreateToolhelp32Snapshot
(
TH32CS_SNAPTHREAD
,
0
);
...
...
@@ -366,10 +369,16 @@ static void backtrace_all(void)
do
{
if
(
entry
.
th32OwnerProcessID
==
GetCurrentProcessId
())
continue
;
if
(
dbg_curr_process
&&
dbg_curr_pid
!=
entry
.
th32OwnerProcessID
)
if
(
dbg_curr_process
&&
dbg_curr_pid
!=
entry
.
th32OwnerProcessID
&&
cpid
!=
dbg_curr_pid
)
dbg_curr_process
->
process_io
->
close_process
(
dbg_curr_process
,
FALSE
);
if
(
entry
.
th32OwnerProcessID
!=
dbg_curr_pid
)
if
(
entry
.
th32OwnerProcessID
==
cpid
)
{
dbg_curr_process
=
process
;
dbg_curr_pid
=
cpid
;
}
else
if
(
entry
.
th32OwnerProcessID
!=
dbg_curr_pid
)
{
if
(
!
dbg_attach_debuggee
(
entry
.
th32OwnerProcessID
,
FALSE
))
{
...
...
@@ -387,12 +396,15 @@ static void backtrace_all(void)
}
while
(
Thread32Next
(
snapshot
,
&
entry
));
if
(
dbg_curr_process
)
if
(
dbg_curr_process
&&
cpid
!=
dbg_curr_pid
)
dbg_curr_process
->
process_io
->
close_process
(
dbg_curr_process
,
FALSE
);
}
CloseHandle
(
snapshot
);
dbg_curr_process
=
process
;
dbg_curr_pid
=
process
?
process
->
pid
:
0
;
dbg_curr_pid
=
cpid
;
dbg_curr_thread
=
thread
;
dbg_curr_tid
=
thread
?
thread
->
tid
:
0
;
dbg_context
=
ctx
;
}
void
stack_backtrace
(
DWORD
tid
)
...
...
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