Added --debugmsg option to the debugger.

oldstable
Alexandre Julliard 2002-06-04 21:31:10 +00:00
parent 65a42168e3
commit 3c85eb18d7
3 changed files with 27 additions and 14 deletions

View File

@ -28,11 +28,11 @@
#include "ntddk.h"
#include "thread.h"
#include "wincon.h"
#include "winreg.h"
#include "wingdi.h"
#include "winuser.h"
#include "msvcrt/excpt.h"
#include "winreg.h"
#include "wine/library.h"
DBG_PROCESS* DEBUG_CurrProcess = NULL;
DBG_THREAD* DEBUG_CurrThread = NULL;
@ -991,16 +991,30 @@ int main(int argc, char** argv)
/* Initialize internal vars (types must have been initialized before) */
if (!DEBUG_IntVarsRW(TRUE)) return -1;
if (argc > 1 && !strcmp( argv[1], "--auto" ))
/* parse options */
while (argc > 1 && argv[1][0] == '-')
{
argc--;
argv++;
automatic_mode = 1;
/* force some internal variables */
DBG_IVAR(UseXTerm) = 0;
DBG_IVAR(BreakOnDllLoad) = 0;
DBG_IVAR(ConChannelMask) = 0;
DBG_IVAR(StdChannelMask) = DBG_CHN_MESG;
if (!strcmp( argv[1], "--auto" ))
{
automatic_mode = 1;
/* force some internal variables */
DBG_IVAR(UseXTerm) = 0;
DBG_IVAR(BreakOnDllLoad) = 0;
DBG_IVAR(ConChannelMask) = 0;
DBG_IVAR(StdChannelMask) = DBG_CHN_MESG;
argc--;
argv++;
continue;
}
if (!strcmp( argv[1], "--debugmsg" ) && argv[2])
{
wine_dbg_parse_options( argv[2] );
argc -= 2;
argv += 2;
continue;
}
DEBUG_Printf(DBG_CHN_MESG, "Usage: winedbg [--debugmsg dbgoptions] [--auto] cmdline\n" );
return 1;
}
DEBUG_InitConsole();

View File

@ -253,7 +253,7 @@ static BOOL start_debugger(PEXCEPTION_POINTERS epointers, HANDLE hEvent)
RegCloseKey(hDbgConf);
} else {
/* try a default setup... */
strcpy( format, "winedbg --debugmsg -all -- --auto %ld %ld" );
strcpy( format, "winedbg --debugmsg -all --auto %ld %ld" );
}
if (!bAuto)

View File

@ -87,7 +87,7 @@
#
[HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\AeDebug]
# command line to start a debugger when an exception occurs
"Debugger"="winedbg %ld %ld"
"Debugger"="winedbg --debugmsg -all %ld %ld"
# to 0 if a message box has to be presented before running the debugger
"Auto"="1"
@ -401,4 +401,3 @@
"Times New Roman Greek,161"="Times New Roman,161"
"Times New Roman TUR,162"="Times New Roman,162"
"Tms Rmn"="Times New Roman"