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
893d7524
Commit
893d7524
authored
Feb 24, 2006
by
Eric Pouech
Committed by
Alexandre Julliard
Feb 27, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winedbg: Auto mode.
- rewrite auto mode startup - move part of auto handling to tgt_active.c
parent
a67f8e86
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
38 additions
and
21 deletions
+38
-21
debugger.h
programs/winedbg/debugger.h
+2
-1
tgt_active.c
programs/winedbg/tgt_active.c
+12
-0
winedbg.c
programs/winedbg/winedbg.c
+24
-20
No files found.
programs/winedbg/debugger.h
View file @
893d7524
...
...
@@ -372,8 +372,9 @@ extern void dbg_run_debuggee(const char* args);
extern
void
dbg_wait_next_exception
(
DWORD
cont
,
int
count
,
int
mode
);
extern
enum
dbg_start
dbg_active_attach
(
int
argc
,
char
*
argv
[]);
extern
enum
dbg_start
dbg_active_launch
(
int
argc
,
char
*
argv
[]);
extern
enum
dbg_start
dbg_active_auto
(
int
argc
,
char
*
argv
[]);
/* temporary for tgt_active.c */
extern
enum
dbg_action_mode
{
none_mode
=
0
,
winedbg_mode
,
automatic_mode
}
dbg_action_mode
;
extern
enum
dbg_action_mode
{
winedbg_mode
,
automatic_mode
}
dbg_action_mode
;
extern
unsigned
dbg_main_loop
(
HANDLE
);
/* tgt_minidump.c */
...
...
programs/winedbg/tgt_active.c
View file @
893d7524
...
...
@@ -872,3 +872,15 @@ enum dbg_start dbg_active_launch(int argc, char* argv[])
dbg_last_cmd_line
=
cmd_line
;
return
start_ok
;
}
/******************************************************************
* dbg_active_auto
*
* Starts (<pid> or <pid> <evt>) in automatic mode
*/
enum
dbg_start
dbg_active_auto
(
int
argc
,
char
*
argv
[])
{
argc
--
;
argv
++
;
dbg_action_mode
=
automatic_mode
;
return
dbg_active_attach
(
argc
,
argv
);
}
programs/winedbg/winedbg.c
View file @
893d7524
...
...
@@ -464,6 +464,7 @@ int main(int argc, char** argv)
{
int
retv
=
0
;
HANDLE
hFile
=
INVALID_HANDLE_VALUE
;
enum
dbg_start
ds
;
#ifdef __i386__
be_cpu
=
&
be_i386
;
...
...
@@ -489,7 +490,21 @@ int main(int argc, char** argv)
if
(
retv
==
-
1
)
dbg_winedbg_usage
();
return
retv
;
}
dbg_init_console
();
dbg_action_mode
=
winedbg_mode
;
SymSetOptions
((
SymGetOptions
()
&
~
(
SYMOPT_UNDNAME
))
|
SYMOPT_LOAD_LINES
|
SYMOPT_DEFERRED_LOADS
|
SYMOPT_AUTO_PUBLICS
);
if
(
argc
&&
!
strcmp
(
argv
[
0
],
"--auto"
))
{
/* force some internal variables */
DBG_IVAR
(
BreakOnDllLoad
)
=
0
;
dbg_houtput
=
GetStdHandle
(
STD_ERROR_HANDLE
);
ds
=
dbg_active_auto
(
argc
,
argv
);
}
else
{
/* parse options */
while
(
argc
>
0
&&
argv
[
0
][
0
]
==
'-'
)
{
...
...
@@ -528,32 +543,21 @@ int main(int argc, char** argv)
argc
--
;
argv
++
;
continue
;
}
if
(
!
strcmp
(
argv
[
0
],
"--auto"
))
{
if
(
dbg_action_mode
!=
none_mode
)
return
dbg_winedbg_usage
();
dbg_action_mode
=
automatic_mode
;
/* force some internal variables */
DBG_IVAR
(
BreakOnDllLoad
)
=
0
;
argc
--
;
argv
++
;
dbg_houtput
=
GetStdHandle
(
STD_ERROR_HANDLE
);
continue
;
}
return
dbg_winedbg_usage
();
}
if
(
dbg_action_mode
==
none_mode
)
dbg_action_mode
=
winedbg_mode
;
if
(
!
argc
||
dbg_active_attach
(
argc
,
argv
)
==
start_ok
||
dbg_active_launch
(
argc
,
argv
)
==
start_ok
)
if
(
!
argc
)
ds
=
start_ok
;
else
if
((
ds
=
dbg_active_attach
(
argc
,
argv
))
==
start_error_parse
)
ds
=
dbg_active_launch
(
argc
,
argv
);
}
switch
(
ds
)
{
dbg_init_console
();
SymSetOptions
((
SymGetOptions
()
&
~
(
SYMOPT_UNDNAME
))
|
SYMOPT_LOAD_LINES
|
SYMOPT_DEFERRED_LOADS
|
SYMOPT_AUTO_PUBLICS
);
case
start_ok
:
break
;
case
start_error_parse
:
return
dbg_winedbg_usage
();
case
start_error_init
:
return
-
1
;
}
retv
=
dbg_main_loop
(
hFile
);
/* don't save modified variables in auto mode */
if
(
dbg_action_mode
!=
automatic_mode
)
dbg_save_internal_vars
();
}
return
retv
;
}
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