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
81198f39
Commit
81198f39
authored
Mar 01, 2006
by
Eric Pouech
Committed by
Alexandre Julliard
Mar 02, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winedbg: Bring usage() and .man up to date.
parent
348067a9
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
79 additions
and
27 deletions
+79
-27
winedbg.c
programs/winedbg/winedbg.c
+25
-6
winedbg.man.in
programs/winedbg/winedbg.man.in
+54
-21
No files found.
programs/winedbg/winedbg.c
View file @
81198f39
...
...
@@ -450,9 +450,25 @@ static void dbg_init_console(void)
SetConsoleTitle
(
"Wine Debugger"
);
}
static
int
dbg_winedbg_usage
(
voi
d
)
static
int
dbg_winedbg_usage
(
BOOL
advance
d
)
{
dbg_printf
(
"Usage: winedbg [--command cmd|--file file|--auto] [--gdb [--no-start] [--with-xterm]] cmdline
\n
"
);
if
(
advanced
)
{
dbg_printf
(
"Usage:
\n
"
" winedbg cmdline launch process 'cmdline' (as if you were starting
\n
"
" it with wine) and run WineDbg on it
\n
"
" winedbg <num> attach to running process of pid <num> and run
\n
"
" WineDbg on it
\n
"
" winedbg --gdb cmdline launch process 'cmdline' (as if you were starting
\n
"
" wine) and run gdb (proxied) on it
\n
"
" winedbg --gdb <num> attach to running process of pid <num> and run
\n
"
" gdb (proxied) on it
\n
"
" winedbg file.mdmp reload the minidump file.mdmp into memory and run
\n
"
" WineDbg on it
\n
"
" winedbg --help prints advanced options
\n
"
);
}
else
dbg_printf
(
"Usage:
\n\t
winedbg [ [ --gdb ] [ prog-name [ prog-args ] | <num> | file.mdmp | --help ]
\n
"
);
return
-
1
;
}
...
...
@@ -491,10 +507,13 @@ int main(int argc, char** argv)
/* as we don't care about exec name */
argc
--
;
argv
++
;
if
(
argc
&&
!
strcmp
(
argv
[
0
],
"--help"
))
return
dbg_winedbg_usage
(
TRUE
);
if
(
argc
&&
!
strcmp
(
argv
[
0
],
"--gdb"
))
{
retv
=
gdb_main
(
argc
,
argv
);
if
(
retv
==
-
1
)
dbg_winedbg_usage
();
if
(
retv
==
-
1
)
dbg_winedbg_usage
(
FALSE
);
return
retv
;
}
dbg_init_console
();
...
...
@@ -510,7 +529,7 @@ int main(int argc, char** argv)
switch
(
dbg_active_auto
(
argc
,
argv
))
{
case
start_ok
:
return
0
;
case
start_error_parse
:
return
dbg_winedbg_usage
();
case
start_error_parse
:
return
dbg_winedbg_usage
(
FALSE
);
case
start_error_init
:
return
-
1
;
}
}
...
...
@@ -547,7 +566,7 @@ int main(int argc, char** argv)
argc
--
;
argv
++
;
break
;
}
return
dbg_winedbg_usage
();
return
dbg_winedbg_usage
(
FALSE
);
}
if
(
!
argc
)
ds
=
start_ok
;
else
if
((
ds
=
dbg_active_attach
(
argc
,
argv
))
==
start_error_parse
&&
...
...
@@ -556,7 +575,7 @@ int main(int argc, char** argv)
switch
(
ds
)
{
case
start_ok
:
break
;
case
start_error_parse
:
return
dbg_winedbg_usage
();
case
start_error_parse
:
return
dbg_winedbg_usage
(
FALSE
);
case
start_error_init
:
return
-
1
;
}
...
...
programs/winedbg/winedbg.man.in
View file @
81198f39
...
...
@@ -3,17 +3,32 @@
.SH NAME
winedbg \- Wine's debugger
.SH SYNOPSIS
.BR "winedbg ["
.RI "[ " " options " "]"
.BR "| --auto |"
.BR "winedbg "
.RI "[" " options " "] ["
.BI "program name"
.RI "[ program arguments ] |"
.BI "pid"
.RI "]"
.PP
.BR "winedbg "
.BI "--gdb"
.RI "[" " options " "]
]
["
.RI "[" " options " "] ["
.BI "program name"
.RI "["
.BI "program arguments"
.RI "] |"
.RI "[ program arguments ] |"
.BI "pid"
.RI "]"
.PP
.BR "winedbg "
.BI "--auto "
.BI "pid"
.PP
.BR "winedbg "
.BI "--minidump "
.RI "[ file.mdmp ]"
.BI "pid"
.PP
.BR "winedbg"
.BI "file.mdmp"
.SH DESCRIPTION
.B winedbg
is a debugger for Wine. It allows:
...
...
@@ -27,21 +42,32 @@ is a debugger for Wine. It allows:
.PP
.SH MODES
\fBwinedbg\fR can be used in
thre
e modes. The first argument to the
\fBwinedbg\fR can be used in
fiv
e modes. The first argument to the
program determines the mode winedbg will run in.
.IP \fBdefault\fR
Without any explicit mode, this is standard \fBwinedbg\fR operating
mode. \fBwinedbg\fR will act as the front end for the user.
.IP \fB--gdb\fR
\fBwinedbg\fR will be used as a proxy for \fBgdb\fR. \fBgdb\fR will be
the front end for command handling, and \fBwinedbg\fR will proxy all
debugging requests from \fBgdb\fR to the Win32 APIs.
.IP \fB--auto\fR
This mode is used when \fBwinedbg\fR is setup in \fIAeDebug\fR
This mode is used when \fBwinedbg\fR is set
up in \fIAeDebug\fR
registry entry as the default debugger. \fBwinedbg\fR will then
display basic information about a crash. This is useful for users
who don't want to debug a crash, but rather gather relevant
information about the crash to be sent to developers.
.IP \fB--gdb\fR
\fBwinedbg\fR will be used as a proxy for \fBgdb\fR. \fBgdb\fR will be
the front end for command handling, and \fBwinedbg\fR will proxy all
debugging requests from \fBgdb\fR to the Win32 APIs.
.IP \fB--minidump\fR
This mode is similar to the \fB--auto\fR one, except that instead of
printing the information on the screen (as \fB--auto\fR does), it's
saved into a minidump file. The name of the file is either passed on
the command line, or generated by \fBWineDbg\fR when none is given.
This file could later on be reloaded into \fBwinedbg\fR for further
examination.
.IP \fBfile.mdmp\fR
This mode allows to reload into \fBwinedbg\fR the state of a debuggee
which has been saved into a minidump file. See either the \fBminidump\fR
command below, or the \fB--minidump mode\fR.
.SH OPTIONS
When in \fBdefault\fR mode, the following options are available:
...
...
@@ -58,7 +84,8 @@ will exit.
When in \fBgdb\fR proxy mode, the following options are available:
.PP
.IP \fI--no-start\fR \fBgdb\fR will not be automatically
.IP \fI--no-start\fR
\fBgdb\fR will not be automatically
started. Relevant information for starting \fBgdb\fR are printed on
screen. This is somehow useful when not directly using \fBgdb\fR but
some graphical front-ends, like \fBddd\fR or \fBkgbd\fR.
...
...
@@ -82,7 +109,7 @@ If nothing is specified, you will enter the debugger without any run
nor attached process. You'll have to do the job yourself.
.SH COMMANDS
.SS Default mode:
.SS Default mode
, and while reloading a minidump file
:
.PP
Most of commands used in \fBwinedbg\fR are similar to the ones from
\fBgdb\fR. Please refer to the \fBgdb\fR documentations for some more
...
...
@@ -147,7 +174,7 @@ breakpoint isn't triggered.
Adds a breakpoint at address \fBN\fR
.IP \fBbreak\ <id>\fR
Adds a breakpoint at the address of symbol \fB<id>\fR
.IP \fBbreak
<id>
N\fR
.IP \fBbreak
\ <id>\
N\fR
Adds a breakpoint at the line \fBN\fR inside symbol \fB<id>\fR.
.IP \fBbreak\ N\fR
Adds a breakpoint at line \fBN\fR of current source file.
...
...
@@ -183,7 +210,7 @@ Goes up \fBN\fR frames in current thread's stack
Goes down one frame in current thread's stack
.IP \fBdn\ N\fR
Goes down \fBN\fR frames in current thread's stack
.IP \fBframe N\fR
.IP \fBframe
\
N\fR
Sets \fBN\fR as the current frame for current thread's stack.
.IP \fBinfo\ locals\fR
Prints information on local variables for current function frame.
...
...
@@ -303,6 +330,12 @@ When specifying an identifier \fB<id>\fR, if several symbols with
this name exist, the debugger will prompt for the symbol you want to
use. Pick up the one you want from its number.
.PP
\fIMisc.\fR
.PP
.IP \fBminidump\ file.mdmp\fR
saves the debugging context of the debuggee into a minidump file called
file.mdmp
.PP
\fIInformation on Wine's internals\fR
.IP \fBinfo\ class\fR
Lists all Windows' class registered in Wine
...
...
@@ -317,7 +350,7 @@ Prints information on module at address \fBN\fR
Prints the value of the CPU registers
.IP \fBinfo\ segment\fR
Lists all allocated segments (i386 only)
.IP \fBinfo\ segment N\fR
.IP \fBinfo\ segment
\
N\fR
Prints information on segment \fBN\fR (i386 only)
.IP \fBinfo\ stack\fR
Prints the values on top of the stack
...
...
@@ -355,12 +388,12 @@ However, a few Wine's extension are available, through the
\fBmonitor\fR command:
.IP \fBmonitor\ wnd\fR
Lists all window in the Wine session
.IP \fBmonitor proc\fR
.IP \fBmonitor
\
proc\fR
Lists all processes in the Wine session
.IP \fBmonitor
mem
\fR
.IP \fBmonitor
\ mem
\fR
Displays memory mapping of debugged process
.PP
.SS Auto
mode
:
.SS Auto
and minidump modes
:
.PP
Since no user input is possible, no commands are available.
...
...
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