Alexandre Julliard | f0b2354 | 1993-09-29 12:21:49 +0000 | [diff] [blame] | 1 | %{ |
Alexandre Julliard | 808cb04 | 1995-08-17 17:11:36 +0000 | [diff] [blame] | 2 | /* |
| 3 | * Parser for command lines in the Wine debugger |
Alexandre Julliard | f0b2354 | 1993-09-29 12:21:49 +0000 | [diff] [blame] | 4 | * |
Alexandre Julliard | 808cb04 | 1995-08-17 17:11:36 +0000 | [diff] [blame] | 5 | * Copyright 1993 Eric Youngdale |
Alexandre Julliard | 902da69 | 1995-11-05 14:39:02 +0000 | [diff] [blame] | 6 | * Copyright 1995 Morten Welinder |
Eric Pouech | d33bcb6 | 2000-03-15 19:57:20 +0000 | [diff] [blame] | 7 | * Copyright 2000 Eric Pouech |
Alexandre Julliard | f0b2354 | 1993-09-29 12:21:49 +0000 | [diff] [blame] | 8 | */ |
| 9 | |
Patrik Stridvall | 1bb9403 | 1999-05-08 15:47:44 +0000 | [diff] [blame] | 10 | #include "config.h" |
| 11 | |
Alexandre Julliard | f0b2354 | 1993-09-29 12:21:49 +0000 | [diff] [blame] | 12 | #include <stdio.h> |
David Luyer | ee517e8 | 1999-02-28 12:27:56 +0000 | [diff] [blame] | 13 | #include <stdlib.h> |
| 14 | #include <string.h> |
Alexandre Julliard | d18872d | 1994-05-11 12:18:19 +0000 | [diff] [blame] | 15 | #include <signal.h> |
Alexandre Julliard | ded3038 | 1995-07-06 17:18:27 +0000 | [diff] [blame] | 16 | #include <unistd.h> |
Patrik Stridvall | b87fe2e | 1999-04-01 08:16:08 +0000 | [diff] [blame] | 17 | |
Patrik Stridvall | 3b23362 | 2000-03-24 21:19:02 +0000 | [diff] [blame] | 18 | #include "wine/exception.h" |
Alexandre Julliard | ded3038 | 1995-07-06 17:18:27 +0000 | [diff] [blame] | 19 | #include "debugger.h" |
Alexandre Julliard | c6c0944 | 1997-01-12 18:32:19 +0000 | [diff] [blame] | 20 | #include "expr.h" |
| 21 | |
Alexandre Julliard | f0b2354 | 1993-09-29 12:21:49 +0000 | [diff] [blame] | 22 | extern FILE * yyin; |
Alexandre Julliard | f0b2354 | 1993-09-29 12:21:49 +0000 | [diff] [blame] | 23 | |
Eric Pouech | d33bcb6 | 2000-03-15 19:57:20 +0000 | [diff] [blame] | 24 | static void issue_prompt(void); |
| 25 | static void mode_command(int); |
Alexandre Julliard | 808cb04 | 1995-08-17 17:11:36 +0000 | [diff] [blame] | 26 | int yylex(void); |
| 27 | int yyerror(char *); |
| 28 | |
Alexandre Julliard | f0b2354 | 1993-09-29 12:21:49 +0000 | [diff] [blame] | 29 | %} |
| 30 | |
Alexandre Julliard | 808cb04 | 1995-08-17 17:11:36 +0000 | [diff] [blame] | 31 | %union |
| 32 | { |
Eric Pouech | d33bcb6 | 2000-03-15 19:57:20 +0000 | [diff] [blame] | 33 | DBG_VALUE value; |
Alexandre Julliard | 808cb04 | 1995-08-17 17:11:36 +0000 | [diff] [blame] | 34 | char * string; |
| 35 | int integer; |
Alexandre Julliard | c6c0944 | 1997-01-12 18:32:19 +0000 | [diff] [blame] | 36 | struct list_id listing; |
| 37 | struct expr * expression; |
Eric Pouech | 911436b | 2000-06-18 19:30:24 +0000 | [diff] [blame] | 38 | struct datatype* type; |
Alexandre Julliard | 808cb04 | 1995-08-17 17:11:36 +0000 | [diff] [blame] | 39 | } |
Alexandre Julliard | f0b2354 | 1993-09-29 12:21:49 +0000 | [diff] [blame] | 40 | |
Alexandre Julliard | 410ae4f | 1999-06-18 18:23:11 +0000 | [diff] [blame] | 41 | %token tCONT tPASS tSTEP tLIST tNEXT tQUIT tHELP tBACKTRACE tINFO tWALK tUP tDOWN |
Alexandre Julliard | 954a413 | 2000-09-24 03:15:50 +0000 | [diff] [blame] | 42 | %token tENABLE tDISABLE tBREAK tWATCH tDELETE tSET tMODE tPRINT tEXAM tABORT tVM86 |
Alexandre Julliard | 889f742 | 1997-04-15 17:19:52 +0000 | [diff] [blame] | 43 | %token tCLASS tMAPS tMODULE tSTACK tSEGMENTS tREGS tWND tQUEUE tLOCAL |
Eric Pouech | 911436b | 2000-06-18 19:30:24 +0000 | [diff] [blame] | 44 | %token tPROCESS tTHREAD tMODREF tEOL |
Alexandre Julliard | 2197901 | 1997-03-05 08:22:35 +0000 | [diff] [blame] | 45 | %token tFRAME tSHARE tCOND tDISPLAY tUNDISPLAY tDISASSEMBLE |
Eric Pouech | d33bcb6 | 2000-03-15 19:57:20 +0000 | [diff] [blame] | 46 | %token tSTEPI tNEXTI tFINISH tSHOW tDIR tWHATIS |
Alexandre Julliard | c6c0944 | 1997-01-12 18:32:19 +0000 | [diff] [blame] | 47 | %token <string> tPATH |
Eric Pouech | 04c16b8 | 2000-04-30 12:21:15 +0000 | [diff] [blame] | 48 | %token <string> tIDENTIFIER tSTRING tDEBUGSTR tINTVAR |
Alexandre Julliard | b817f4f | 1996-03-14 18:08:34 +0000 | [diff] [blame] | 49 | %token <integer> tNUM tFORMAT |
Eric Pouech | 911436b | 2000-06-18 19:30:24 +0000 | [diff] [blame] | 50 | %token tSYMBOLFILE tRUN tATTACH tNOPROCESS |
Alexandre Julliard | 808cb04 | 1995-08-17 17:11:36 +0000 | [diff] [blame] | 51 | |
Alexandre Julliard | 01d6346 | 1997-01-20 19:43:45 +0000 | [diff] [blame] | 52 | %token tCHAR tSHORT tINT tLONG tFLOAT tDOUBLE tUNSIGNED tSIGNED |
| 53 | %token tSTRUCT tUNION tENUM |
| 54 | |
Alexandre Julliard | 902da69 | 1995-11-05 14:39:02 +0000 | [diff] [blame] | 55 | /* %left ',' */ |
| 56 | /* %left '=' OP_OR_EQUAL OP_XOR_EQUAL OP_AND_EQUAL OP_SHL_EQUAL \ |
| 57 | OP_SHR_EQUAL OP_PLUS_EQUAL OP_MINUS_EQUAL \ |
| 58 | OP_TIMES_EQUAL OP_DIVIDE_EQUAL OP_MODULO_EQUAL */ |
| 59 | /* %left OP_COND */ /* ... ? ... : ... */ |
| 60 | %left OP_LOR |
| 61 | %left OP_LAND |
| 62 | %left '|' |
| 63 | %left '^' |
| 64 | %left '&' |
| 65 | %left OP_EQ OP_NE |
| 66 | %left '<' '>' OP_LE OP_GE |
Alexandre Julliard | 01d6346 | 1997-01-20 19:43:45 +0000 | [diff] [blame] | 67 | %left OP_SHL OP_SHR |
Alexandre Julliard | 902da69 | 1995-11-05 14:39:02 +0000 | [diff] [blame] | 68 | %left '+' '-' |
| 69 | %left '*' '/' '%' |
| 70 | %left OP_SIGN '!' '~' OP_DEREF /* OP_INC OP_DEC OP_ADDR */ |
Alexandre Julliard | 01d6346 | 1997-01-20 19:43:45 +0000 | [diff] [blame] | 71 | %left '.' '[' OP_DRF |
Alexandre Julliard | 902da69 | 1995-11-05 14:39:02 +0000 | [diff] [blame] | 72 | %nonassoc ':' |
| 73 | |
Alexandre Julliard | 01d6346 | 1997-01-20 19:43:45 +0000 | [diff] [blame] | 74 | %type <expression> expr lval lvalue |
| 75 | %type <type> type_cast type_expr |
Eric Pouech | d33bcb6 | 2000-03-15 19:57:20 +0000 | [diff] [blame] | 76 | %type <value> expr_addr lval_addr |
Alexandre Julliard | c6c0944 | 1997-01-12 18:32:19 +0000 | [diff] [blame] | 77 | %type <integer> expr_value |
Eric Pouech | 38f2be4 | 2001-08-15 17:40:31 +0000 | [diff] [blame] | 78 | %type <string> pathname identifier |
Alexandre Julliard | c6c0944 | 1997-01-12 18:32:19 +0000 | [diff] [blame] | 79 | |
| 80 | %type <listing> list_arg |
Alexandre Julliard | f0b2354 | 1993-09-29 12:21:49 +0000 | [diff] [blame] | 81 | |
| 82 | %% |
| 83 | |
Eric Pouech | 911436b | 2000-06-18 19:30:24 +0000 | [diff] [blame] | 84 | input: line { issue_prompt(); } |
| 85 | | input line { issue_prompt(); } |
Alexandre Julliard | f0b2354 | 1993-09-29 12:21:49 +0000 | [diff] [blame] | 86 | |
Alexandre Julliard | b817f4f | 1996-03-14 18:08:34 +0000 | [diff] [blame] | 87 | line: command |
| 88 | | tEOL |
Eric Pouech | 911436b | 2000-06-18 19:30:24 +0000 | [diff] [blame] | 89 | | error tEOL { yyerrok; } |
Alexandre Julliard | 902da69 | 1995-11-05 14:39:02 +0000 | [diff] [blame] | 90 | |
Alexandre Julliard | b817f4f | 1996-03-14 18:08:34 +0000 | [diff] [blame] | 91 | command: |
Eric Pouech | 911436b | 2000-06-18 19:30:24 +0000 | [diff] [blame] | 92 | tQUIT tEOL { return FALSE; } |
| 93 | | tHELP tEOL { DEBUG_Help(); } |
| 94 | | tHELP tINFO tEOL { DEBUG_HelpInfo(); } |
| 95 | | tCONT tEOL { DEBUG_CurrThread->dbg_exec_count = 1; |
| 96 | DEBUG_CurrThread->dbg_exec_mode = EXEC_CONT; return TRUE; } |
| 97 | | tPASS tEOL { DEBUG_CurrThread->dbg_exec_count = 1; |
| 98 | DEBUG_CurrThread->dbg_exec_mode = EXEC_PASS; return TRUE; } |
| 99 | | tCONT tNUM tEOL { DEBUG_CurrThread->dbg_exec_count = $2; |
| 100 | DEBUG_CurrThread->dbg_exec_mode = EXEC_CONT; return TRUE; } |
| 101 | | tSTEP tEOL { DEBUG_CurrThread->dbg_exec_count = 1; |
| 102 | DEBUG_CurrThread->dbg_exec_mode = EXEC_STEP_INSTR; return TRUE; } |
| 103 | | tNEXT tEOL { DEBUG_CurrThread->dbg_exec_count = 1; |
| 104 | DEBUG_CurrThread->dbg_exec_mode = EXEC_STEP_OVER; return TRUE; } |
| 105 | | tSTEP tNUM tEOL { DEBUG_CurrThread->dbg_exec_count = $2; |
| 106 | DEBUG_CurrThread->dbg_exec_mode = EXEC_STEP_INSTR; return TRUE; } |
| 107 | | tNEXT tNUM tEOL { DEBUG_CurrThread->dbg_exec_count = $2; |
| 108 | DEBUG_CurrThread->dbg_exec_mode = EXEC_STEP_OVER; return TRUE; } |
| 109 | | tSTEPI tEOL { DEBUG_CurrThread->dbg_exec_count = 1; |
| 110 | DEBUG_CurrThread->dbg_exec_mode = EXEC_STEPI_INSTR; return TRUE; } |
| 111 | | tNEXTI tEOL { DEBUG_CurrThread->dbg_exec_count = 1; |
| 112 | DEBUG_CurrThread->dbg_exec_mode = EXEC_STEPI_OVER; return TRUE; } |
| 113 | | tSTEPI tNUM tEOL { DEBUG_CurrThread->dbg_exec_count = $2; |
| 114 | DEBUG_CurrThread->dbg_exec_mode = EXEC_STEPI_INSTR; return TRUE; } |
| 115 | | tNEXTI tNUM tEOL { DEBUG_CurrThread->dbg_exec_count = $2; |
| 116 | DEBUG_CurrThread->dbg_exec_mode = EXEC_STEPI_OVER; return TRUE; } |
| 117 | | tABORT tEOL { kill(getpid(), SIGABRT); } |
| 118 | | tMODE tNUM tEOL { mode_command($2); } |
Alexandre Julliard | 954a413 | 2000-09-24 03:15:50 +0000 | [diff] [blame] | 119 | | tMODE tVM86 tEOL { DEBUG_CurrThread->dbg_mode = MODE_VM86; } |
Eric Pouech | 911436b | 2000-06-18 19:30:24 +0000 | [diff] [blame] | 120 | | tENABLE tNUM tEOL { DEBUG_EnableBreakpoint( $2, TRUE ); } |
| 121 | | tDISABLE tNUM tEOL { DEBUG_EnableBreakpoint( $2, FALSE ); } |
| 122 | | tDELETE tBREAK tNUM tEOL { DEBUG_DelBreakpoint( $3 ); } |
Eric Pouech | 800773f | 2001-08-06 17:51:52 +0000 | [diff] [blame] | 123 | | tBACKTRACE tEOL { DEBUG_BackTrace(DEBUG_CurrTid, TRUE); } |
| 124 | | tBACKTRACE tNUM tEOL { DEBUG_BackTrace($2, TRUE); } |
Eric Pouech | 911436b | 2000-06-18 19:30:24 +0000 | [diff] [blame] | 125 | | tUP tEOL { DEBUG_SetFrame( curr_frame + 1 ); } |
| 126 | | tUP tNUM tEOL { DEBUG_SetFrame( curr_frame + $2 ); } |
| 127 | | tDOWN tEOL { DEBUG_SetFrame( curr_frame - 1 ); } |
| 128 | | tDOWN tNUM tEOL { DEBUG_SetFrame( curr_frame - $2 ); } |
| 129 | | tFRAME tNUM tEOL { DEBUG_SetFrame( $2 ); } |
| 130 | | tFINISH tEOL { DEBUG_CurrThread->dbg_exec_count = 0; |
| 131 | DEBUG_CurrThread->dbg_exec_mode = EXEC_FINISH; return TRUE; } |
| 132 | | tSHOW tDIR tEOL { DEBUG_ShowDir(); } |
| 133 | | tDIR pathname tEOL { DEBUG_AddPath( $2 ); } |
| 134 | | tDIR tEOL { DEBUG_NukePath(); } |
| 135 | | tDISPLAY tEOL { DEBUG_InfoDisplay(); } |
| 136 | | tDISPLAY expr tEOL { DEBUG_AddDisplay($2, 1, 0); } |
| 137 | | tDISPLAY tFORMAT expr tEOL{ DEBUG_AddDisplay($3, $2 >> 8, $2 & 0xff); } |
| 138 | | tDELETE tDISPLAY tNUM tEOL{ DEBUG_DelDisplay( $3 ); } |
| 139 | | tDELETE tDISPLAY tEOL { DEBUG_DelDisplay( -1 ); } |
| 140 | | tUNDISPLAY tNUM tEOL { DEBUG_DelDisplay( $2 ); } |
| 141 | | tUNDISPLAY tEOL { DEBUG_DelDisplay( -1 ); } |
| 142 | | tCOND tNUM tEOL { DEBUG_AddBPCondition($2, NULL); } |
| 143 | | tCOND tNUM expr tEOL { DEBUG_AddBPCondition($2, $3); } |
| 144 | | tSYMBOLFILE pathname tEOL { DEBUG_ReadSymbolTable($2); } |
| 145 | | tWHATIS expr_addr tEOL { DEBUG_PrintType(&$2); DEBUG_FreeExprMem(); } |
Alexandre Julliard | 1ce1bef | 2001-07-11 17:33:08 +0000 | [diff] [blame] | 146 | | tATTACH tNUM tEOL { if (DEBUG_Attach($2, FALSE)) return TRUE; } |
Alexandre Julliard | c6c0944 | 1997-01-12 18:32:19 +0000 | [diff] [blame] | 147 | | list_command |
Alexandre Julliard | 2197901 | 1997-03-05 08:22:35 +0000 | [diff] [blame] | 148 | | disassemble_command |
Alexandre Julliard | b817f4f | 1996-03-14 18:08:34 +0000 | [diff] [blame] | 149 | | set_command |
| 150 | | x_command |
| 151 | | print_command |
| 152 | | break_command |
Eric Pouech | d33bcb6 | 2000-03-15 19:57:20 +0000 | [diff] [blame] | 153 | | watch_command |
Alexandre Julliard | b817f4f | 1996-03-14 18:08:34 +0000 | [diff] [blame] | 154 | | info_command |
| 155 | | walk_command |
Eric Pouech | 911436b | 2000-06-18 19:30:24 +0000 | [diff] [blame] | 156 | | run_command |
| 157 | | noprocess_state |
Alexandre Julliard | f0b2354 | 1993-09-29 12:21:49 +0000 | [diff] [blame] | 158 | |
Alexandre Julliard | b817f4f | 1996-03-14 18:08:34 +0000 | [diff] [blame] | 159 | set_command: |
Eric Pouech | 04c16b8 | 2000-04-30 12:21:15 +0000 | [diff] [blame] | 160 | tSET lval_addr '=' expr_value tEOL { DEBUG_WriteMemory( &$2, $4 ); |
Alexandre Julliard | c6c0944 | 1997-01-12 18:32:19 +0000 | [diff] [blame] | 161 | DEBUG_FreeExprMem(); } |
| 162 | |
| 163 | pathname: |
Eric Pouech | e5efa0c | 2000-04-13 19:31:58 +0000 | [diff] [blame] | 164 | tIDENTIFIER { $$ = $1; } |
| 165 | | tPATH { $$ = $1; } |
Alexandre Julliard | c6c0944 | 1997-01-12 18:32:19 +0000 | [diff] [blame] | 166 | |
Alexandre Julliard | 2197901 | 1997-03-05 08:22:35 +0000 | [diff] [blame] | 167 | disassemble_command: |
| 168 | tDISASSEMBLE tEOL { DEBUG_Disassemble( NULL, NULL, 10 ); } |
| 169 | | tDISASSEMBLE expr_addr tEOL { DEBUG_Disassemble( & $2, NULL, 10 ); } |
| 170 | | tDISASSEMBLE expr_addr ',' expr_addr tEOL { DEBUG_Disassemble( & $2, & $4, 0 ); } |
| 171 | |
Alexandre Julliard | c6c0944 | 1997-01-12 18:32:19 +0000 | [diff] [blame] | 172 | list_command: |
| 173 | tLIST tEOL { DEBUG_List( NULL, NULL, 10 ); } |
| 174 | | tLIST '-' tEOL { DEBUG_List( NULL, NULL, -10 ); } |
| 175 | | tLIST list_arg tEOL { DEBUG_List( & $2, NULL, 10 ); } |
| 176 | | tLIST ',' list_arg tEOL { DEBUG_List( NULL, & $3, -10 ); } |
| 177 | | tLIST list_arg ',' list_arg tEOL { DEBUG_List( & $2, & $4, 0 ); } |
| 178 | |
| 179 | list_arg: |
| 180 | tNUM { $$.sourcefile = NULL; $$.line = $1; } |
| 181 | | pathname ':' tNUM { $$.sourcefile = $1; $$.line = $3; } |
| 182 | | tIDENTIFIER { DEBUG_GetFuncInfo( & $$, NULL, $1); } |
| 183 | | pathname ':' tIDENTIFIER { DEBUG_GetFuncInfo( & $$, $1, $3); } |
Eric Pouech | 911436b | 2000-06-18 19:30:24 +0000 | [diff] [blame] | 184 | | '*' expr_addr { DEBUG_FindNearestSymbol( & $2.addr, FALSE, NULL, 0, & $$ ); |
| 185 | DEBUG_FreeExprMem(); } |
Alexandre Julliard | f0b2354 | 1993-09-29 12:21:49 +0000 | [diff] [blame] | 186 | |
| 187 | x_command: |
Eric Pouech | 911436b | 2000-06-18 19:30:24 +0000 | [diff] [blame] | 188 | tEXAM expr_addr tEOL { DEBUG_ExamineMemory( &$2, 1, 'x'); DEBUG_FreeExprMem(); } |
Alexandre Julliard | c6c0944 | 1997-01-12 18:32:19 +0000 | [diff] [blame] | 189 | | tEXAM tFORMAT expr_addr tEOL { DEBUG_ExamineMemory( &$3, $2>>8, $2&0xff ); |
Eric Pouech | 911436b | 2000-06-18 19:30:24 +0000 | [diff] [blame] | 190 | DEBUG_FreeExprMem(); } |
Alexandre Julliard | f0b2354 | 1993-09-29 12:21:49 +0000 | [diff] [blame] | 191 | |
Alexandre Julliard | b817f4f | 1996-03-14 18:08:34 +0000 | [diff] [blame] | 192 | print_command: |
Eric Pouech | 911436b | 2000-06-18 19:30:24 +0000 | [diff] [blame] | 193 | tPRINT expr_addr tEOL { DEBUG_Print( &$2, 1, 0, 0 ); DEBUG_FreeExprMem(); } |
Alexandre Julliard | c6c0944 | 1997-01-12 18:32:19 +0000 | [diff] [blame] | 194 | | tPRINT tFORMAT expr_addr tEOL { DEBUG_Print( &$3, $2 >> 8, $2 & 0xff, 0 ); |
Eric Pouech | 911436b | 2000-06-18 19:30:24 +0000 | [diff] [blame] | 195 | DEBUG_FreeExprMem(); } |
Alexandre Julliard | f0b2354 | 1993-09-29 12:21:49 +0000 | [diff] [blame] | 196 | |
Alexandre Julliard | b817f4f | 1996-03-14 18:08:34 +0000 | [diff] [blame] | 197 | break_command: |
Eric Pouech | 911436b | 2000-06-18 19:30:24 +0000 | [diff] [blame] | 198 | tBREAK '*' expr_addr tEOL{ DEBUG_AddBreakpoint( &$3, NULL ); DEBUG_FreeExprMem(); } |
Eric Pouech | 38f2be4 | 2001-08-15 17:40:31 +0000 | [diff] [blame] | 199 | | tBREAK identifier tEOL { DEBUG_AddBreakpointFromId($2, -1); } |
| 200 | | tBREAK identifier ':' tNUM tEOL { DEBUG_AddBreakpointFromId($2, $4); } |
Eric Pouech | 911436b | 2000-06-18 19:30:24 +0000 | [diff] [blame] | 201 | | tBREAK tNUM tEOL { DEBUG_AddBreakpointFromLineno($2); } |
| 202 | | tBREAK tEOL { DEBUG_AddBreakpointFromLineno(-1); } |
Alexandre Julliard | b817f4f | 1996-03-14 18:08:34 +0000 | [diff] [blame] | 203 | |
Eric Pouech | d33bcb6 | 2000-03-15 19:57:20 +0000 | [diff] [blame] | 204 | watch_command: |
Eric Pouech | 911436b | 2000-06-18 19:30:24 +0000 | [diff] [blame] | 205 | tWATCH '*' expr_addr tEOL { DEBUG_AddWatchpoint( &$3, 1 ); DEBUG_FreeExprMem(); } |
Eric Pouech | 38f2be4 | 2001-08-15 17:40:31 +0000 | [diff] [blame] | 206 | | tWATCH identifier tEOL { DEBUG_AddWatchpointFromId($2); } |
Eric Pouech | d33bcb6 | 2000-03-15 19:57:20 +0000 | [diff] [blame] | 207 | |
Alexandre Julliard | b817f4f | 1996-03-14 18:08:34 +0000 | [diff] [blame] | 208 | info_command: |
| 209 | tINFO tBREAK tEOL { DEBUG_InfoBreakpoints(); } |
Eric Pouech | 911436b | 2000-06-18 19:30:24 +0000 | [diff] [blame] | 210 | | tINFO tCLASS tSTRING tEOL { DEBUG_InfoClass( $3 ); } |
Alexandre Julliard | c6c0944 | 1997-01-12 18:32:19 +0000 | [diff] [blame] | 211 | | tINFO tSHARE tEOL { DEBUG_InfoShare(); } |
Eric Pouech | d33bcb6 | 2000-03-15 19:57:20 +0000 | [diff] [blame] | 212 | | tINFO tMODULE expr_value tEOL { DEBUG_DumpModule( $3 ); DEBUG_FreeExprMem(); } |
| 213 | | tINFO tQUEUE expr_value tEOL { DEBUG_DumpQueue( $3 ); DEBUG_FreeExprMem(); } |
Alexandre Julliard | b817f4f | 1996-03-14 18:08:34 +0000 | [diff] [blame] | 214 | | tINFO tREGS tEOL { DEBUG_InfoRegisters(); } |
Eric Pouech | 527eea9 | 2000-03-08 16:44:54 +0000 | [diff] [blame] | 215 | | tINFO tSEGMENTS expr_value tEOL { DEBUG_InfoSegments( $3, 1 ); DEBUG_FreeExprMem(); } |
| 216 | | tINFO tSEGMENTS tEOL { DEBUG_InfoSegments( 0, -1 ); } |
Alexandre Julliard | b817f4f | 1996-03-14 18:08:34 +0000 | [diff] [blame] | 217 | | tINFO tSTACK tEOL { DEBUG_InfoStack(); } |
Eric Pouech | 527eea9 | 2000-03-08 16:44:54 +0000 | [diff] [blame] | 218 | | tINFO tMAPS tEOL { DEBUG_InfoVirtual(); } |
Eric Pouech | 911436b | 2000-06-18 19:30:24 +0000 | [diff] [blame] | 219 | | tINFO tWND expr_value tEOL{ DEBUG_InfoWindow( (HWND)$3 ); DEBUG_FreeExprMem(); } |
Alexandre Julliard | 7ebe1a4 | 1996-12-22 18:27:48 +0000 | [diff] [blame] | 220 | | tINFO tLOCAL tEOL { DEBUG_InfoLocals(); } |
Alexandre Julliard | c6c0944 | 1997-01-12 18:32:19 +0000 | [diff] [blame] | 221 | | tINFO tDISPLAY tEOL { DEBUG_InfoDisplay(); } |
Alexandre Julliard | b817f4f | 1996-03-14 18:08:34 +0000 | [diff] [blame] | 222 | |
| 223 | walk_command: |
Eric Pouech | 527eea9 | 2000-03-08 16:44:54 +0000 | [diff] [blame] | 224 | tWALK tCLASS tEOL { DEBUG_WalkClasses(); } |
| 225 | | tWALK tMODULE tEOL { DEBUG_WalkModules(); } |
| 226 | | tWALK tQUEUE tEOL { DEBUG_WalkQueues(); } |
| 227 | | tWALK tWND tEOL { DEBUG_WalkWindows( 0, 0 ); } |
François Gouget | d5042c4 | 2000-12-29 05:38:00 +0000 | [diff] [blame] | 228 | | tWALK tWND tNUM tEOL { DEBUG_WalkWindows( (HWND)$3, 0 ); } |
Eric Pouech | 527eea9 | 2000-03-08 16:44:54 +0000 | [diff] [blame] | 229 | | tWALK tPROCESS tEOL { DEBUG_WalkProcess(); } |
Alexandre Julliard | a679541 | 2000-04-16 19:46:35 +0000 | [diff] [blame] | 230 | | tWALK tTHREAD tEOL { DEBUG_WalkThreads(); } |
Eric Pouech | 911436b | 2000-06-18 19:30:24 +0000 | [diff] [blame] | 231 | | tWALK tMODREF expr_value tEOL { DEBUG_WalkModref( $3 ); DEBUG_FreeExprMem(); } |
Alexandre Julliard | b817f4f | 1996-03-14 18:08:34 +0000 | [diff] [blame] | 232 | |
Eric Pouech | 911436b | 2000-06-18 19:30:24 +0000 | [diff] [blame] | 233 | run_command: |
| 234 | tRUN tEOL { DEBUG_Run(NULL); } |
| 235 | | tRUN tSTRING tEOL { DEBUG_Run($2); } |
| 236 | |
| 237 | noprocess_state: |
| 238 | tNOPROCESS tEOL {} /* <CR> shall not barf anything */ |
| 239 | | tNOPROCESS tSTRING tEOL { DEBUG_Printf(DBG_CHN_MESG, "No process loaded, cannot execute '%s'\n", $2); } |
Alexandre Julliard | 01d6346 | 1997-01-20 19:43:45 +0000 | [diff] [blame] | 240 | |
| 241 | type_cast: |
| 242 | '(' type_expr ')' { $$ = $2; } |
| 243 | |
| 244 | type_expr: |
| 245 | type_expr '*' { $$ = DEBUG_FindOrMakePointerType($1); } |
François Gouget | 241c730 | 1998-10-28 10:47:09 +0000 | [diff] [blame] | 246 | | tINT { $$ = DEBUG_TypeCast(DT_BASIC, "int"); } |
| 247 | | tCHAR { $$ = DEBUG_TypeCast(DT_BASIC, "char"); } |
| 248 | | tLONG tINT { $$ = DEBUG_TypeCast(DT_BASIC, "long int"); } |
| 249 | | tUNSIGNED tINT { $$ = DEBUG_TypeCast(DT_BASIC, "unsigned int"); } |
| 250 | | tLONG tUNSIGNED tINT { $$ = DEBUG_TypeCast(DT_BASIC, "long unsigned int"); } |
| 251 | | tLONG tLONG tINT { $$ = DEBUG_TypeCast(DT_BASIC, "long long int"); } |
Eric Pouech | 911436b | 2000-06-18 19:30:24 +0000 | [diff] [blame] | 252 | | tLONG tLONG tUNSIGNED tINT{ $$ = DEBUG_TypeCast(DT_BASIC, "long long unsigned int"); } |
François Gouget | 241c730 | 1998-10-28 10:47:09 +0000 | [diff] [blame] | 253 | | tSHORT tINT { $$ = DEBUG_TypeCast(DT_BASIC, "short int"); } |
| 254 | | tSHORT tUNSIGNED tINT { $$ = DEBUG_TypeCast(DT_BASIC, "short unsigned int"); } |
| 255 | | tSIGNED tCHAR { $$ = DEBUG_TypeCast(DT_BASIC, "signed char"); } |
| 256 | | tUNSIGNED tCHAR { $$ = DEBUG_TypeCast(DT_BASIC, "unsigned char"); } |
| 257 | | tFLOAT { $$ = DEBUG_TypeCast(DT_BASIC, "float"); } |
| 258 | | tDOUBLE { $$ = DEBUG_TypeCast(DT_BASIC, "double"); } |
| 259 | | tLONG tDOUBLE { $$ = DEBUG_TypeCast(DT_BASIC, "long double"); } |
| 260 | | tSTRUCT tIDENTIFIER { $$ = DEBUG_TypeCast(DT_STRUCT, $2); } |
| 261 | | tUNION tIDENTIFIER { $$ = DEBUG_TypeCast(DT_STRUCT, $2); } |
| 262 | | tENUM tIDENTIFIER { $$ = DEBUG_TypeCast(DT_ENUM, $2); } |
Alexandre Julliard | 01d6346 | 1997-01-20 19:43:45 +0000 | [diff] [blame] | 263 | |
Alexandre Julliard | c6c0944 | 1997-01-12 18:32:19 +0000 | [diff] [blame] | 264 | expr_addr: |
Eric Pouech | 527eea9 | 2000-03-08 16:44:54 +0000 | [diff] [blame] | 265 | expr { $$ = DEBUG_EvalExpr($1); } |
Alexandre Julliard | f0b2354 | 1993-09-29 12:21:49 +0000 | [diff] [blame] | 266 | |
Alexandre Julliard | c6c0944 | 1997-01-12 18:32:19 +0000 | [diff] [blame] | 267 | expr_value: |
Eric Pouech | 04c16b8 | 2000-04-30 12:21:15 +0000 | [diff] [blame] | 268 | expr { DBG_VALUE value = DEBUG_EvalExpr($1); |
| 269 | /* expr_value is typed as an integer */ |
| 270 | $$ = DEBUG_ReadMemory(&value); } |
| 271 | |
Alexandre Julliard | c6c0944 | 1997-01-12 18:32:19 +0000 | [diff] [blame] | 272 | /* |
| 273 | * The expr rule builds an expression tree. When we are done, we call |
| 274 | * EvalExpr to evaluate the value of the expression. The advantage of |
| 275 | * the two-step approach is that it is possible to save expressions for |
| 276 | * use in 'display' commands, and in conditional watchpoints. |
| 277 | */ |
Alexandre Julliard | b817f4f | 1996-03-14 18:08:34 +0000 | [diff] [blame] | 278 | expr: |
Alexandre Julliard | c6c0944 | 1997-01-12 18:32:19 +0000 | [diff] [blame] | 279 | tNUM { $$ = DEBUG_ConstExpr($1); } |
| 280 | | tSTRING { $$ = DEBUG_StringExpr($1); } |
Eric Pouech | 04c16b8 | 2000-04-30 12:21:15 +0000 | [diff] [blame] | 281 | | tINTVAR { $$ = DEBUG_IntVarExpr($1); } |
Alexandre Julliard | c6c0944 | 1997-01-12 18:32:19 +0000 | [diff] [blame] | 282 | | tIDENTIFIER { $$ = DEBUG_SymbolExpr($1); } |
| 283 | | expr OP_DRF tIDENTIFIER { $$ = DEBUG_StructPExpr($1, $3); } |
| 284 | | expr '.' tIDENTIFIER { $$ = DEBUG_StructExpr($1, $3); } |
| 285 | | tIDENTIFIER '(' ')' { $$ = DEBUG_CallExpr($1, 0); } |
| 286 | | tIDENTIFIER '(' expr ')' { $$ = DEBUG_CallExpr($1, 1, $3); } |
Eric Pouech | d33bcb6 | 2000-03-15 19:57:20 +0000 | [diff] [blame] | 287 | | tIDENTIFIER '(' expr ',' expr ')' { $$ = DEBUG_CallExpr($1, 2, $3, $5); } |
Alexandre Julliard | c6c0944 | 1997-01-12 18:32:19 +0000 | [diff] [blame] | 288 | | tIDENTIFIER '(' expr ',' expr ',' expr ')' { $$ = DEBUG_CallExpr($1, 3, $3, $5, $7); } |
Eric Pouech | 04c16b8 | 2000-04-30 12:21:15 +0000 | [diff] [blame] | 289 | | tIDENTIFIER '(' expr ',' expr ',' expr ',' expr ')' { $$ = DEBUG_CallExpr($1, 4, $3, $5, $7, $9); } |
| 290 | | tIDENTIFIER '(' expr ',' expr ',' expr ',' expr ',' expr ')' { $$ = DEBUG_CallExpr($1, 5, $3, $5, $7, $9, $11); } |
Alexandre Julliard | c6c0944 | 1997-01-12 18:32:19 +0000 | [diff] [blame] | 291 | | expr '[' expr ']' { $$ = DEBUG_BinopExpr(EXP_OP_ARR, $1, $3); } |
| 292 | | expr ':' expr { $$ = DEBUG_BinopExpr(EXP_OP_SEG, $1, $3); } |
| 293 | | expr OP_LOR expr { $$ = DEBUG_BinopExpr(EXP_OP_LOR, $1, $3); } |
| 294 | | expr OP_LAND expr { $$ = DEBUG_BinopExpr(EXP_OP_LAND, $1, $3); } |
| 295 | | expr '|' expr { $$ = DEBUG_BinopExpr(EXP_OP_OR, $1, $3); } |
| 296 | | expr '&' expr { $$ = DEBUG_BinopExpr(EXP_OP_AND, $1, $3); } |
| 297 | | expr '^' expr { $$ = DEBUG_BinopExpr(EXP_OP_XOR, $1, $3); } |
| 298 | | expr OP_EQ expr { $$ = DEBUG_BinopExpr(EXP_OP_EQ, $1, $3); } |
| 299 | | expr '>' expr { $$ = DEBUG_BinopExpr(EXP_OP_GT, $1, $3); } |
| 300 | | expr '<' expr { $$ = DEBUG_BinopExpr(EXP_OP_LT, $1, $3); } |
| 301 | | expr OP_GE expr { $$ = DEBUG_BinopExpr(EXP_OP_GE, $1, $3); } |
| 302 | | expr OP_LE expr { $$ = DEBUG_BinopExpr(EXP_OP_LE, $1, $3); } |
| 303 | | expr OP_NE expr { $$ = DEBUG_BinopExpr(EXP_OP_NE, $1, $3); } |
| 304 | | expr OP_SHL expr { $$ = DEBUG_BinopExpr(EXP_OP_SHL, $1, $3); } |
| 305 | | expr OP_SHR expr { $$ = DEBUG_BinopExpr(EXP_OP_SHR, $1, $3); } |
| 306 | | expr '+' expr { $$ = DEBUG_BinopExpr(EXP_OP_ADD, $1, $3); } |
| 307 | | expr '-' expr { $$ = DEBUG_BinopExpr(EXP_OP_SUB, $1, $3); } |
| 308 | | expr '*' expr { $$ = DEBUG_BinopExpr(EXP_OP_MUL, $1, $3); } |
| 309 | | expr '/' expr { $$ = DEBUG_BinopExpr(EXP_OP_DIV, $1, $3); } |
| 310 | | expr '%' expr { $$ = DEBUG_BinopExpr(EXP_OP_REM, $1, $3); } |
| 311 | | '-' expr %prec OP_SIGN { $$ = DEBUG_UnopExpr(EXP_OP_NEG, $2); } |
Alexandre Julliard | b817f4f | 1996-03-14 18:08:34 +0000 | [diff] [blame] | 312 | | '+' expr %prec OP_SIGN { $$ = $2; } |
Alexandre Julliard | c6c0944 | 1997-01-12 18:32:19 +0000 | [diff] [blame] | 313 | | '!' expr { $$ = DEBUG_UnopExpr(EXP_OP_NOT, $2); } |
| 314 | | '~' expr { $$ = DEBUG_UnopExpr(EXP_OP_LNOT, $2); } |
Alexandre Julliard | b817f4f | 1996-03-14 18:08:34 +0000 | [diff] [blame] | 315 | | '(' expr ')' { $$ = $2; } |
Alexandre Julliard | c6c0944 | 1997-01-12 18:32:19 +0000 | [diff] [blame] | 316 | | '*' expr %prec OP_DEREF { $$ = DEBUG_UnopExpr(EXP_OP_DEREF, $2); } |
| 317 | | '&' expr %prec OP_DEREF { $$ = DEBUG_UnopExpr(EXP_OP_ADDR, $2); } |
Alexandre Julliard | 01d6346 | 1997-01-20 19:43:45 +0000 | [diff] [blame] | 318 | | type_cast expr %prec OP_DEREF { $$ = DEBUG_TypeCastExpr($1, $2); } |
Alexandre Julliard | c6c0944 | 1997-01-12 18:32:19 +0000 | [diff] [blame] | 319 | |
| 320 | /* |
| 321 | * The lvalue rule builds an expression tree. This is a limited form |
| 322 | * of expression that is suitable to be used as an lvalue. |
| 323 | */ |
| 324 | lval_addr: |
Alexandre Julliard | 349a953 | 1997-02-02 19:01:52 +0000 | [diff] [blame] | 325 | lval { $$ = DEBUG_EvalExpr($1); } |
Alexandre Julliard | c6c0944 | 1997-01-12 18:32:19 +0000 | [diff] [blame] | 326 | |
| 327 | lval: |
| 328 | lvalue { $$ = $1; } |
| 329 | | '*' expr { $$ = DEBUG_UnopExpr(EXP_OP_FORCE_DEREF, $2); } |
| 330 | |
| 331 | lvalue: |
| 332 | tNUM { $$ = DEBUG_ConstExpr($1); } |
Eric Pouech | 04c16b8 | 2000-04-30 12:21:15 +0000 | [diff] [blame] | 333 | | tINTVAR { $$ = DEBUG_IntVarExpr($1); } |
Alexandre Julliard | c6c0944 | 1997-01-12 18:32:19 +0000 | [diff] [blame] | 334 | | tIDENTIFIER { $$ = DEBUG_SymbolExpr($1); } |
| 335 | | lvalue OP_DRF tIDENTIFIER { $$ = DEBUG_StructPExpr($1, $3); } |
| 336 | | lvalue '.' tIDENTIFIER { $$ = DEBUG_StructExpr($1, $3); } |
| 337 | | lvalue '[' expr ']' { $$ = DEBUG_BinopExpr(EXP_OP_ARR, $1, $3); } |
Alexandre Julliard | f0b2354 | 1993-09-29 12:21:49 +0000 | [diff] [blame] | 338 | |
Eric Pouech | 38f2be4 | 2001-08-15 17:40:31 +0000 | [diff] [blame] | 339 | identifier: |
| 340 | tIDENTIFIER { $$ = $1; } |
| 341 | | identifier '.' tIDENTIFIER { char* ptr = DBG_alloc(strlen($1) + 1 + strlen($3)+ 1); |
| 342 | sprintf(ptr, "%s.%s", $1, $3); $$ = DEBUG_MakeSymbol(ptr); |
| 343 | DBG_free(ptr); } |
| 344 | |
Alexandre Julliard | f0b2354 | 1993-09-29 12:21:49 +0000 | [diff] [blame] | 345 | %% |
| 346 | |
Eric Pouech | d33bcb6 | 2000-03-15 19:57:20 +0000 | [diff] [blame] | 347 | static void issue_prompt(void) |
| 348 | { |
Alexandre Julliard | 18f92e7 | 1996-07-17 20:02:21 +0000 | [diff] [blame] | 349 | #ifdef DONT_USE_READLINE |
Eric Pouech | e5efa0c | 2000-04-13 19:31:58 +0000 | [diff] [blame] | 350 | DEBUG_Printf(DBG_CHN_MESG, "Wine-dbg>"); |
Alexandre Julliard | f0b2354 | 1993-09-29 12:21:49 +0000 | [diff] [blame] | 351 | #endif |
| 352 | } |
| 353 | |
Eric Pouech | d33bcb6 | 2000-03-15 19:57:20 +0000 | [diff] [blame] | 354 | static void mode_command(int newmode) |
Alexandre Julliard | d18872d | 1994-05-11 12:18:19 +0000 | [diff] [blame] | 355 | { |
Alexandre Julliard | 954a413 | 2000-09-24 03:15:50 +0000 | [diff] [blame] | 356 | switch(newmode) |
| 357 | { |
| 358 | case 16: DEBUG_CurrThread->dbg_mode = MODE_16; break; |
| 359 | case 32: DEBUG_CurrThread->dbg_mode = MODE_32; break; |
| 360 | default: DEBUG_Printf(DBG_CHN_MESG,"Invalid mode (use 16, 32 or vm86)\n"); |
| 361 | } |
Eric Pouech | e5efa0c | 2000-04-13 19:31:58 +0000 | [diff] [blame] | 362 | } |
| 363 | |
| 364 | void DEBUG_Exit(DWORD ec) |
| 365 | { |
| 366 | ExitProcess(ec); |
Alexandre Julliard | d18872d | 1994-05-11 12:18:19 +0000 | [diff] [blame] | 367 | } |
| 368 | |
Eric Pouech | ac11a68 | 2000-03-26 13:37:39 +0000 | [diff] [blame] | 369 | static WINE_EXCEPTION_FILTER(wine_dbg_cmd) |
Ulrich Weigand | 3723c2c | 1999-10-23 16:49:49 +0000 | [diff] [blame] | 370 | { |
Eric Pouech | e5efa0c | 2000-04-13 19:31:58 +0000 | [diff] [blame] | 371 | DEBUG_Printf(DBG_CHN_MESG, "\nwine_dbg_cmd: "); |
Eric Pouech | d33bcb6 | 2000-03-15 19:57:20 +0000 | [diff] [blame] | 372 | switch (GetExceptionCode()) { |
| 373 | case DEBUG_STATUS_INTERNAL_ERROR: |
Eric Pouech | e5efa0c | 2000-04-13 19:31:58 +0000 | [diff] [blame] | 374 | DEBUG_Printf(DBG_CHN_MESG, "WineDbg internal error\n"); |
Eric Pouech | d33bcb6 | 2000-03-15 19:57:20 +0000 | [diff] [blame] | 375 | break; |
| 376 | case DEBUG_STATUS_NO_SYMBOL: |
Eric Pouech | e5efa0c | 2000-04-13 19:31:58 +0000 | [diff] [blame] | 377 | DEBUG_Printf(DBG_CHN_MESG, "Undefined symbol\n"); |
Eric Pouech | d33bcb6 | 2000-03-15 19:57:20 +0000 | [diff] [blame] | 378 | break; |
| 379 | case DEBUG_STATUS_DIV_BY_ZERO: |
Eric Pouech | e5efa0c | 2000-04-13 19:31:58 +0000 | [diff] [blame] | 380 | DEBUG_Printf(DBG_CHN_MESG, "Division by zero\n"); |
Eric Pouech | d33bcb6 | 2000-03-15 19:57:20 +0000 | [diff] [blame] | 381 | break; |
| 382 | case DEBUG_STATUS_BAD_TYPE: |
Eric Pouech | e5efa0c | 2000-04-13 19:31:58 +0000 | [diff] [blame] | 383 | DEBUG_Printf(DBG_CHN_MESG, "No type or type mismatch\n"); |
Eric Pouech | d33bcb6 | 2000-03-15 19:57:20 +0000 | [diff] [blame] | 384 | break; |
Eric Pouech | 38f2be4 | 2001-08-15 17:40:31 +0000 | [diff] [blame] | 385 | case DEBUG_STATUS_NO_FIELD: |
| 386 | DEBUG_Printf(DBG_CHN_MESG, "No such field in structure or union\n"); |
| 387 | break; |
Eric Pouech | d33bcb6 | 2000-03-15 19:57:20 +0000 | [diff] [blame] | 388 | default: |
Eric Pouech | e5efa0c | 2000-04-13 19:31:58 +0000 | [diff] [blame] | 389 | DEBUG_Printf(DBG_CHN_MESG, "Exception %lx\n", GetExceptionCode()); |
Eric Pouech | d33bcb6 | 2000-03-15 19:57:20 +0000 | [diff] [blame] | 390 | break; |
| 391 | } |
Ulrich Weigand | 3723c2c | 1999-10-23 16:49:49 +0000 | [diff] [blame] | 392 | |
Eric Pouech | e5efa0c | 2000-04-13 19:31:58 +0000 | [diff] [blame] | 393 | return EXCEPTION_EXECUTE_HANDLER; |
Ulrich Weigand | 3723c2c | 1999-10-23 16:49:49 +0000 | [diff] [blame] | 394 | } |
Alexandre Julliard | f0b2354 | 1993-09-29 12:21:49 +0000 | [diff] [blame] | 395 | |
Alexandre Julliard | 329f068 | 1996-04-14 13:21:20 +0000 | [diff] [blame] | 396 | /*********************************************************************** |
Eric Pouech | 911436b | 2000-06-18 19:30:24 +0000 | [diff] [blame] | 397 | * DEBUG_Parser |
Alexandre Julliard | 329f068 | 1996-04-14 13:21:20 +0000 | [diff] [blame] | 398 | * |
Eric Pouech | 911436b | 2000-06-18 19:30:24 +0000 | [diff] [blame] | 399 | * Debugger editline parser |
Alexandre Julliard | 329f068 | 1996-04-14 13:21:20 +0000 | [diff] [blame] | 400 | */ |
Eric Pouech | 911436b | 2000-06-18 19:30:24 +0000 | [diff] [blame] | 401 | BOOL DEBUG_Parser(void) |
Alexandre Julliard | f0b2354 | 1993-09-29 12:21:49 +0000 | [diff] [blame] | 402 | { |
Eric Pouech | 911436b | 2000-06-18 19:30:24 +0000 | [diff] [blame] | 403 | BOOL ret_ok; |
| 404 | BOOL ret = TRUE; |
Alexandre Julliard | f0b2354 | 1993-09-29 12:21:49 +0000 | [diff] [blame] | 405 | #ifdef YYDEBUG |
Alexandre Julliard | ff8331e | 1995-09-18 11:19:54 +0000 | [diff] [blame] | 406 | yydebug = 0; |
Alexandre Julliard | f0b2354 | 1993-09-29 12:21:49 +0000 | [diff] [blame] | 407 | #endif |
Alexandre Julliard | ded3038 | 1995-07-06 17:18:27 +0000 | [diff] [blame] | 408 | yyin = stdin; |
Alexandre Julliard | f0b2354 | 1993-09-29 12:21:49 +0000 | [diff] [blame] | 409 | |
Eric Pouech | 911436b | 2000-06-18 19:30:24 +0000 | [diff] [blame] | 410 | ret_ok = FALSE; |
| 411 | do { |
| 412 | __TRY { |
| 413 | issue_prompt(); |
Eric Pouech | 5b471ba | 2000-06-25 12:49:13 +0000 | [diff] [blame] | 414 | ret_ok = TRUE; |
Eric Pouech | 911436b | 2000-06-18 19:30:24 +0000 | [diff] [blame] | 415 | if ((ret = yyparse())) { |
| 416 | DEBUG_FlushSymbols(); |
Eric Pouech | 911436b | 2000-06-18 19:30:24 +0000 | [diff] [blame] | 417 | } |
| 418 | } __EXCEPT(wine_dbg_cmd) { |
| 419 | ret_ok = FALSE; |
| 420 | } |
| 421 | __ENDTRY; |
| 422 | |
| 423 | } while (!ret_ok); |
| 424 | return ret; |
Alexandre Julliard | f0b2354 | 1993-09-29 12:21:49 +0000 | [diff] [blame] | 425 | } |
| 426 | |
Eric Pouech | 527eea9 | 2000-03-08 16:44:54 +0000 | [diff] [blame] | 427 | int yyerror(char* s) |
Alexandre Julliard | 1850655 | 1995-01-24 16:21:01 +0000 | [diff] [blame] | 428 | { |
Eric Pouech | 911436b | 2000-06-18 19:30:24 +0000 | [diff] [blame] | 429 | DEBUG_Printf(DBG_CHN_MESG, "%s\n", s); |
Eric Pouech | d33bcb6 | 2000-03-15 19:57:20 +0000 | [diff] [blame] | 430 | return 0; |
Alexandre Julliard | f0b2354 | 1993-09-29 12:21:49 +0000 | [diff] [blame] | 431 | } |