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
b795f873
Commit
b795f873
authored
Feb 10, 2007
by
Eric Pouech
Committed by
Alexandre Julliard
Feb 12, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winedbg: Support for debugging child processes.
Added internal flag (AlsoDebugProcChild) to let winedbg debug both parent and child (in the same WineDbg session).
parent
6cf27345
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
21 additions
and
5 deletions
+21
-5
debug.l
programs/winedbg/debug.l
+1
-1
debugger.h
programs/winedbg/debugger.h
+1
-0
intvar.h
programs/winedbg/intvar.h
+3
-0
tgt_active.c
programs/winedbg/tgt_active.c
+6
-4
winedbg.c
programs/winedbg/winedbg.c
+10
-0
No files found.
programs/winedbg/debug.l
View file @
b795f873
...
...
@@ -95,7 +95,7 @@ STRING \"[^\n"]+\"
%x NOPROCESS
%%
/* set to special state when no process is loaded. */
if (!dbg_
curr_process
&& YYSTATE == INITIAL) {BEGIN(NOPROCESS);}
if (!dbg_
num_processes()
&& YYSTATE == INITIAL) {BEGIN(NOPROCESS);}
<<EOF>> { return tEOF; }
<*>\n { BEGIN(INITIAL); syntax_error = 0; return tEOL; }
...
...
programs/winedbg/debugger.h
View file @
b795f873
...
...
@@ -421,6 +421,7 @@ extern int dbg_printf(const char* format, ...);
#endif
extern
const
struct
dbg_internal_var
*
dbg_get_internal_var
(
const
char
*
);
extern
BOOL
dbg_interrupt_debuggee
(
void
);
extern
unsigned
dbg_num_processes
(
void
);
extern
struct
dbg_process
*
dbg_add_process
(
const
struct
be_process_io
*
pio
,
DWORD
pid
,
HANDLE
h
);
extern
void
dbg_set_process_name
(
struct
dbg_process
*
p
,
const
char
*
name
);
extern
struct
dbg_process
*
dbg_get_process
(
DWORD
pid
);
...
...
programs/winedbg/intvar.h
View file @
b795f873
...
...
@@ -33,3 +33,6 @@ INTERNAL_VAR(ProcessId, FALSE, &dbg_curr_pid, dbg_itype_unsigned_int)
/* symbol manipulation */
INTERNAL_VAR
(
AlwaysShowThunks
,
FALSE
,
NULL
,
dbg_itype_unsigned_int
)
/* process manipulation */
INTERNAL_VAR
(
AlsoDebugProcChild
,
FALSE
,
NULL
,
dbg_itype_unsigned_int
)
programs/winedbg/tgt_active.c
View file @
b795f873
...
...
@@ -664,7 +664,7 @@ static void wait_exception(void)
{
DEBUG_EVENT
de
;
while
(
dbg_
curr_process
&&
WaitForDebugEvent
(
&
de
,
INFINITE
))
while
(
dbg_
num_processes
()
&&
WaitForDebugEvent
(
&
de
,
INFINITE
))
{
if
(
dbg_handle_debug_event
(
&
de
))
break
;
}
...
...
@@ -704,6 +704,7 @@ static unsigned dbg_start_debuggee(LPSTR cmdLine)
{
PROCESS_INFORMATION
info
;
STARTUPINFOA
startup
;
DWORD
flags
;
memset
(
&
startup
,
0
,
sizeof
(
startup
));
startup
.
cb
=
sizeof
(
startup
);
...
...
@@ -713,9 +714,10 @@ static unsigned dbg_start_debuggee(LPSTR cmdLine)
/* FIXME: shouldn't need the CREATE_NEW_CONSOLE, but as usual CUI:s need it
* while GUI:s don't
*/
if
(
!
CreateProcess
(
NULL
,
cmdLine
,
NULL
,
NULL
,
FALSE
,
DEBUG_PROCESS
|
DEBUG_ONLY_THIS_PROCESS
|
CREATE_NEW_CONSOLE
,
flags
=
DEBUG_PROCESS
|
CREATE_NEW_CONSOLE
;
if
(
!
DBG_IVAR
(
AlsoDebugProcChild
))
flags
|=
DEBUG_ONLY_THIS_PROCESS
;
if
(
!
CreateProcess
(
NULL
,
cmdLine
,
NULL
,
NULL
,
FALSE
,
flags
,
NULL
,
NULL
,
&
startup
,
&
info
))
{
dbg_printf
(
"Couldn't start process '%s'
\n
"
,
cmdLine
);
...
...
programs/winedbg/winedbg.c
View file @
b795f873
...
...
@@ -242,6 +242,16 @@ const struct dbg_internal_var* dbg_get_internal_var(const char* name)
return
NULL
;
}
unsigned
dbg_num_processes
(
void
)
{
struct
dbg_process
*
p
;
unsigned
num
=
0
;
for
(
p
=
dbg_process_list
;
p
;
p
=
p
->
next
)
num
++
;
return
num
;
}
struct
dbg_process
*
dbg_get_process
(
DWORD
pid
)
{
struct
dbg_process
*
p
;
...
...
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