Allow switching off/on of debugmsgs in the debugger.

This commit is contained in:
Marcus Meissner 1999-01-24 09:37:33 +00:00 committed by Alexandre Julliard
parent a7894d9311
commit 40c11ebfa2
5 changed files with 15 additions and 6 deletions

View File

@ -23,6 +23,7 @@
#include "debugger.h" #include "debugger.h"
#include "neexe.h" #include "neexe.h"
#include "process.h" #include "process.h"
#include "main.h"
#include "ts_xlib.h" #include "ts_xlib.h"
#include "expr.h" #include "expr.h"
@ -56,13 +57,13 @@ extern void VIRTUAL_Dump(void); /* memory/virtual.c */
} }
%token tCONT tSTEP tLIST tNEXT tQUIT tHELP tBACKTRACE tINFO tWALK tUP tDOWN %token tCONT tSTEP tLIST tNEXT tQUIT tHELP tBACKTRACE tINFO tWALK tUP tDOWN
%token tENABLE tDISABLE tBREAK tDELETE tSET tMODE tPRINT tEXAM tABORT %token tENABLE tDISABLE tBREAK tDELETE tSET tMODE tPRINT tEXAM tABORT tDEBUGMSG
%token tCLASS tMAPS tMODULE tSTACK tSEGMENTS tREGS tWND tQUEUE tLOCAL %token tCLASS tMAPS tMODULE tSTACK tSEGMENTS tREGS tWND tQUEUE tLOCAL
%token tEOL tSTRING %token tEOL tSTRING tDEBUGSTR
%token tFRAME tSHARE tCOND tDISPLAY tUNDISPLAY tDISASSEMBLE %token tFRAME tSHARE tCOND tDISPLAY tUNDISPLAY tDISASSEMBLE
%token tSTEPI tNEXTI tFINISH tSHOW tDIR %token tSTEPI tNEXTI tFINISH tSHOW tDIR
%token <string> tPATH %token <string> tPATH
%token <string> tIDENTIFIER tSTRING %token <string> tIDENTIFIER tSTRING tDEBUGSTR
%token <integer> tNUM tFORMAT %token <integer> tNUM tFORMAT
%token <reg> tREG %token <reg> tREG
@ -154,6 +155,7 @@ command:
| tUNDISPLAY tEOL { DEBUG_DelDisplay( -1 ); } | tUNDISPLAY tEOL { DEBUG_DelDisplay( -1 ); }
| tCOND tNUM tEOL { DEBUG_AddBPCondition($2, NULL); } | tCOND tNUM tEOL { DEBUG_AddBPCondition($2, NULL); }
| tCOND tNUM expr tEOL { DEBUG_AddBPCondition($2, $3); } | tCOND tNUM expr tEOL { DEBUG_AddBPCondition($2, $3); }
| tDEBUGMSG tDEBUGSTR tEOL { MAIN_ParseDebugOptions($2); }
| list_command | list_command
| disassemble_command | disassemble_command
| set_command | set_command

View File

@ -46,6 +46,7 @@ STRING \"[^\n"]+\"
%s WALK_CMD %s WALK_CMD
%s SHOW_CMD %s SHOW_CMD
%s NOCMD %s NOCMD
%s DEBUGSTR
%% %%
@ -78,6 +79,7 @@ STRING \"[^\n"]+\"
<FORMAT_EXPECTED>"/"{FORMAT} { yylval.integer = (1 << 8) | yytext[1]; return tFORMAT; } <FORMAT_EXPECTED>"/"{FORMAT} { yylval.integer = (1 << 8) | yytext[1]; return tFORMAT; }
{STRING} { yylval.string = make_symbol(yytext); return tSTRING; } {STRING} { yylval.string = make_symbol(yytext); return tSTRING; }
<DEBUGSTR>[a-z+\-,]* { yylval.string = yytext; return tDEBUGSTR; }
$pc { yylval.reg = REG_EIP; return tREG; } $pc { yylval.reg = REG_EIP; return tREG; }
$flags { yylval.reg = REG_EFL; return tREG; } $flags { yylval.reg = REG_EFL; return tREG; }
@ -112,6 +114,7 @@ $gs { yylval.reg = REG_GS; return tREG; }
<INITIAL>frame|fram|fra|fr { BEGIN(NOCMD); return tFRAME; } <INITIAL>frame|fram|fra|fr { BEGIN(NOCMD); return tFRAME; }
<INITIAL>list|lis|li|l { BEGIN(PATH_EXPECTED); return tLIST; } <INITIAL>list|lis|li|l { BEGIN(PATH_EXPECTED); return tLIST; }
<INITIAL>enable|enabl|enab|ena { BEGIN(NOCMD); return tENABLE;} <INITIAL>enable|enabl|enab|ena { BEGIN(NOCMD); return tENABLE;}
<INITIAL>debugmsg|debugms|debugm|debug|debu|deb { BEGIN(DEBUGSTR); return tDEBUGMSG;}
<INITIAL>disable|disabl|disab|disa|dis { BEGIN(NOCMD); return tDISABLE; } <INITIAL>disable|disabl|disab|disa|dis { BEGIN(NOCMD); return tDISABLE; }
<INITIAL>disassemble|disassembl|disassemb|disassem|disasse|disass|disas { BEGIN(NOCMD); return tDISASSEMBLE; } <INITIAL>disassemble|disassembl|disassemb|disassem|disasse|disass|disas { BEGIN(NOCMD); return tDISASSEMBLE; }
<INITIAL,INFO_CMD,DEL_CMD>display|displa|displ|disp { BEGIN(FORMAT_EXPECTED); return tDISPLAY; } <INITIAL,INFO_CMD,DEL_CMD>display|displa|displ|disp { BEGIN(FORMAT_EXPECTED); return tDISPLAY; }

View File

@ -138,7 +138,7 @@ void DEBUG_Help(void)
" frame <n> finish", " frame <n> finish",
" show dir dir <path>", " show dir dir <path>",
" display <expr> undisplay <disnum>", " display <expr> undisplay <disnum>",
" delete display <disnum>\n", " delete display <disnum> debugmsg <class>[-+]<type>\n",
"Wine-specific commands:", "Wine-specific commands:",
" mode [16,32] walk [wnd,class,queue,module]", " mode [16,32] walk [wnd,class,queue,module]",

View File

@ -10,6 +10,7 @@ extern BOOL32 MAIN_MainInit(void);
extern BOOL32 MAIN_WineInit( int *argc, char *argv[] ); extern BOOL32 MAIN_WineInit( int *argc, char *argv[] );
extern HINSTANCE32 MAIN_WinelibInit( int *argc, char *argv[] ); extern HINSTANCE32 MAIN_WinelibInit( int *argc, char *argv[] );
extern int MAIN_GetLanguageID(char*lang, char*country, char*charset, char*dialect); extern int MAIN_GetLanguageID(char*lang, char*country, char*charset, char*dialect);
extern BOOL32 MAIN_ParseDebugOptions(char *options);
extern BOOL32 RELAY_Init(void); extern BOOL32 RELAY_Init(void);
extern int RELAY_ShowDebugmsgRelay(const char *func); extern int RELAY_ShowDebugmsgRelay(const char *func);

View File

@ -225,7 +225,7 @@ static int MAIN_GetResource( XrmDatabase db, char *name, XrmValue *value )
* RETURNS * RETURNS
* TRUE if parsing was successful * TRUE if parsing was successful
*/ */
static BOOL32 MAIN_ParseDebugOptions(char *options) BOOL32 MAIN_ParseDebugOptions(char *options)
{ {
/* defined in relay32/relay386.c */ /* defined in relay32/relay386.c */
extern char **debug_relay_includelist; extern char **debug_relay_includelist;
@ -235,8 +235,11 @@ static BOOL32 MAIN_ParseDebugOptions(char *options)
extern char **debug_snoop_excludelist; extern char **debug_snoop_excludelist;
int l, cls; int l, cls;
if (strlen(options)<3)
l = strlen(options);
if (l<3)
return FALSE; return FALSE;
if (options[l-1]=='\n') options[l-1]='\0';
do do
{ {
if ((*options!='+')&&(*options!='-')){ if ((*options!='+')&&(*options!='-')){