winedbg
Debugger for Windows and Winelib programs running under Wine
TLDR
SYNOPSIS
winedbg [options] [programname [programarguments] | wpid]winedbg --gdb [options] [programname [programarguments] | wpid]winedbg --auto wpidwinedbg --minidump [file.mdmp] wpidwinedbg file.mdmp
DESCRIPTION
winedbg is the Wine debugger. It can debug native Win32 applications and Winelib programs, and it can stand in for Dr Watson as a post-crash debugger.In the default mode winedbg is the interactive front end. Commands are close to gdb: breakpoints (break, watch, rwatch), stepping (step, next, cont, finish), stack traces (bt), memory examination (x, print, set), and Wine-specific info queries (info proc, info thread, info wnd, info share, info map). Module-qualified symbols use a bang, for example USER32!CreateWindowExA.--gdb starts a proxy debugging server and, unless --no-start is given, launches gdb as the front end. --auto and --minidump are non-interactive crash modes. Passing a .mdmp file reloads a saved debuggee state.If neither a program nor a PID is given, winedbg starts with no target; use run or attach from the prompt.
PARAMETERS
programname_
Executable to start in a new debugging session. Extra arguments are passed to that process.wpid
Attach to the process whose Windows PID is wpid. List PIDs with info proc inside winedbg.--gdb
Run as a proxy so gdb (or another GDB-compatible front end) handles commands while winedbg translates them to Win32 debugging APIs.--auto
Crash-handler mode used when winedbg is registered as the AeDebug debugger. Prints basic crash information and does not take interactive input.--minidump [file.mdmp]
Like --auto, but writes a minidump instead of printing the report. If no file name is given, winedbg generates one.--command string
In default mode, execute string as a debugger command and exit (for example info proc).--exec filename
Set the executable name without starting it.--file filename
Execute debugger commands from filename and exit.--no-start
With --gdb, do not launch gdb. Print a target remote localhost:port command and listen for any GDB-compatible debugger.--port port
With --gdb, bind the GDB proxy to port instead of an OS-chosen port.--with-xterm
With --gdb, run the gdb front end in a new xterm window. Ignored if --no-start is set.--help
Display help.
ENVIRONMENT
WINE_GDB
Executable used as the gdb front end in --gdb mode. Default: gdb.WINEPREFIX
Wine prefix whose processes winedbg can see. Default: ~/.wine.
INSTALL
CAVEATS
The PID used with attach and on the command line is the Windows PID from info proc, not the host Unix PID. Breakpoints set by symbol name are deferred until the containing module loads. Re-running with run drops breakpoints from the previous process. The --gdb proxy exits after the first debugger disconnects. --auto and --minidump accept no interactive commands.
HISTORY
The first winedbg was written by Eric Youngdale. It ships as part of Wine, which has provided a Windows API implementation on Unix since 1993.
SEE ALSO
wine(1), wineboot(1), wineserver(1), gdb(1)
