⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 gdb_regex.h

📁 如果RH
💻 H
📖 第 1 页 / 共 2 页
字号:
/***************************************************************************** * *  xdbx - X Window System interface to the dbx debugger * *  Copyright 1989 The University of Texas at Austin *  Copyright 1990 Microelectronics and Computer Technology Corporation * *  Permission to use, copy, modify, and distribute this software and its *  documentation for any purpose and without fee is hereby granted, *  provided that the above copyright notice appear in all copies and that *  both that copyright notice and this permission notice appear in *  supporting documentation, and that the name of The University of Texas *  and Microelectronics and Computer Technology Corporation (MCC) not be  *  used in advertising or publicity pertaining to distribution of *  the software without specific, written prior permission.  The *  University of Texas and MCC makes no representations about the  *  suitability of this software for any purpose.  It is provided "as is"  *  without express or implied warranty. * *  THE UNIVERSITY OF TEXAS AND MCC DISCLAIMS ALL WARRANTIES WITH REGARD TO *  THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND *  FITNESS, IN NO EVENT SHALL THE UNIVERSITY OF TEXAS OR MCC BE LIABLE FOR *  ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER *  RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF *  CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN *  CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * *  Author:  	Po Cheung *  Created:   	March 10, 1989 * ***************************************************************************** *  *  xxgdb - X Window System interface to the gdb debugger *   * 	Copyright 1990,1993 Thomson Consumer Electronics, Inc. *   *  Permission to use, copy, modify, and distribute this software and its *  documentation for any purpose and without fee is hereby granted, *  provided that the above copyright notice appear in all copies and that *  both that copyright notice and this permission notice appear in *  supporting documentation, and that the name of Thomson Consumer *  Electronics (TCE) not be used in advertising or publicity pertaining *  to distribution of the software without specific, written prior *  permission.  TCE makes no representations about the suitability of *  this software for any purpose.  It is provided "as is" without express *  or implied warranty. * *  TCE DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING *  ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT *  SHALL TCE BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES *  OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, *  WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, *  ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS *  SOFTWARE. * *  Adaptation to GDB:  Pierre Willard *  XXGDB Created:   	December, 1990 * *****************************************************************************//*   *  gdb_regex.h: * *  Regular expression pattern matching for GNU gdb. *   *  The reg_token array indicates the register no. for each token type. *      reg_token[0] : message *      reg_token[1] : stop number *      reg_token[2] : function name *      reg_token[3] : line number *      reg_token[4] : file name *      reg_token[5] : display command output */#define	TK_MESG 	0#define TK_STOP		1#define TK_FUNC 	2#define TK_LINE 	3#define TK_FILE 	4#define TK_DISP 	5#define	O_EXEC_MESS_AFTER	0#define	O_EXEC_MESS_BEFORE	1#define	O_EXEC_GDB			2#define O_DONE				3#define O_BREAK 			4			/* Instead of O_STOPAT & O_STOPIN */#define O_INFO_DIR  		5			/* NEW for GDB */#define O_FRAME_CURR		6			/* O_FRAME_CURR = O_UPDOWN */#define O_UPDOWN 			6#define O_BELL				7#define O_SEARCH			8#define O_INFO_LINE			9			/* Instead of O_FILE */#define O_PRINT				10#define O_DEBUG				11#define O_DIRECTORY			12			#define O_LIST				13			/* for dbx, O_LIST = O_SEARCH */#define O_DISPLAY			14#define O_DISPLAY_INFO		15#define O_PWD				16#define O_CD				16			/* O_PWD = O_CD */#define O_RECEIVED_SIGNAL	17			/* test program received signal */#define O_EXEC_DISPLAY		18			/* special for filter_display_info  */#define O_READING_SYMBOLS	19			/* special for filter_reading_symbols */#define O_CORE_FILE			20#define O_UNDEF_SHOW		21			/* test for undefined show command (for gdb 4.0) */#define O_INFO_SOURCE		22			/* to get compilation directory (for gdb 4.0) */#define O_UPDOWN_NOSOURCE	23			/* up/down in no source file */#define	C_ANY			-1#define C_EXEC			0#define C_BREAK			1			/* Instead of C_STOPAT & C_STOPIN */#define C_INFO_DIR		2			/* NEW for GDB */#define C_FRAME_CURR	3#define C_UPDOWN		4#define C_DELETE		5#define C_FINISH		6			/* Instead of C_FUNC */#define C_INFO_LINE		7			/* Instead of C_FILE */#define C_SYMBOL_FILE	8#define C_CD			9#define C_DIRECTORY		10			/* Instead of C_USE */#define C_PWD			11#define C_LIST			12#define C_SEARCH		13#define C_DISPLAY_INFO	14			/* must be BEFORE C_DISPLAY ! */#define C_DISPLAY		15#define C_UNDISPLAY		16#define C_PRINT			17#define C_INFO_BREAK	18#define C_SOURCE		19#define C_EXEC_FILE		20#define C_CORE_FILE		21#define C_DEFINE		22#define C_DOCUMENT		23#define C_END			24#define C_INFO_SOURCE	25			/* new for gdb 4.0 to get compilation directory */#define C_FILE			26			/* new for gdb 4.0 : file command *//*--------------------------------------------------------------------------+|																			||								DBX											||																			|| Reading symbolic information...											|| Read 46 symbols															|| (dbx)																		|| (dbx)																		|| stopped in main at line 5 in file "pw.c"									||	 5			 for (i=0; i<100; i++)										|| (dbx) use																	|| /usr1/gnu_sun4/xdbx/														|| (dbx) file																|| pw.c																		|| (dbx) file																|| No current source file													||																			|+--------------------------------------------------------------------------*//*--------------------------------------------------------------------------+|																			||								GDB											||																			|| Reading symbol data from /usr1/gnu_sun4/xdbx/pw...done.					|| Type "help" for a list of commands.										|| (gdb)																		|| (gdb)																		|| Bpt 1, main () (pw.c line 5)												|| 5				  for (i=0; i<100; i++)										|| (gdb) info directories													|| Source directories searched: /usr1/gnu_sun4/xdbx:/usr1/toto				|| (gdb) info line															|| Line 10 of "pw.c" starts at pc 0x22dc and ends at 0x22e4.					|| (gdb) info line															|| No source file specified.													||																			|+--------------------------------------------------------------------------*//*--------------------------------------------------------------------------+|																			||								GDB -fullname								||																			||																			||	We use option -fullname (see dbxoptions() in xdbx.c).					||																			|| GDB prints (see source.c of gdb):											||																			||		"\032\032%s:%d:%d:%s:0x%x\n", s->fullname,							||		line, s->line_charpos[line - 1],									||		mid_statement ? "middle" : "beg",									||		get_frame_pc (get_current_frame()));								||																			|| (gdb) break main															|| Reading in symbols for pw.c...done.										|| Breakpoint 1 at 0x229c: file pw.c, line 5.								|| (gdb) run																	|| Starting program: /usr1/gnu_sun4/xdbx/pw									||																			|| Bpt 1, main () (pw.c line 5)												|| /usr1/gnu_sun4/xdbx/pw.c:5:17:beg:0x229c									|| (gdb) step																|| /usr1/gnu_sun4/xdbx/pw.c:6:40:beg:0x22b0									|| (gdb)																		||																			|| (gdb) info directories													|| Source directories searched: /usr1/gnu_sun4/xdbx							|| (gdb) info line															|| Line 10 of "pw.c" starts at pc 0x22dc and ends at 0x22e4.					|| (gdb) info line															|| No source file specified.													|| (gdb) info line															|| Line number 34 is out of range for "bug1.c".								||																			|| (gdb) display i															|| 3: i = 0																	|| (gdb) display																|| 4: i + 1 = 1																|| 3: i = 0																	|| (gdb) undisplay 2															|| (gdb) display																|| (gdb) 																	||																			|| (gdb) up																	|| #2  0x2314 in main () (pw.c line 35)										|| /usr1/gnu_sun4/xdbx/pw.c:35:158:beg:0x2360								|| (gdb) up																	|| Initial frame selected; you cannot go up.									|| (gdb)																		||																			|| (gdb) down																|| #0  glop (number=1) (pw2.c line 5)										|| /usr1/gnu_sun4/xdbx/pw2.c:5:33:beg:0x2360									|| (gdb) down																|| Bottom (i.e., innermost) frame selected; you cannot go down.				|| (gdb)																		||																			|| (gdb) pwd																	|| Working directory /usr1/gnu_sun4/xdbx.									|| (gdb) cd ..																|| Working directory /usr1/gnu_sun4.											|| (gdb) cd xdbx																|| Working directory /usr1/gnu_sun4/xdbx.									|| (gdb) cd toto																|| toto: No such file or directory.											|| (gdb)																		||																			|| Program exited with code 01.												|| (gdb)																		||																			|+--------------------------------------------------------------------------*//*		.		--> any character but '\n'		*		--> any character 0 to n times		+		--> any character 1 to n times		?		--> any character 0 or 1 time		^		--> begin of line or NOT following character		$		--> end of line or '$'		\\w		--> character '0..9a..zA...Z'		\\W		--> character NOT '0..9a..zA...Z'		\\<		--> word begin (word is composed of 0..9a..zA...Z)		\\>		--> word end (word is composed of 0..9a..zA...Z)		\\b		--> word bound		\\B		--> not word bound		\\|		--> means OR		\\`		--> begin buffer		\\\'	--> end buffer				>>	WARNING : be carefull with \\| (OR) : the re_match() function>>	will NOT correctly update the string for a pattern which is>>	optional !>>	--> The number SHOULD NOT point to a patterm which is optional ! */    /* (PW)5DEC90: I have a problem if we say \\(Bpt.*\n\\)? in exec pattern.    	That is why I have two cases : with or without Bpt...    	Note that 'exec without Message' includes 'exec with Message'.    	We display 'Bpt...' in the message window. */    	    /* (PW)14JAN91 (v1.01) : use    		\\(\\([0-9]+:.*\n\\(\\( .*\n\\)*}\n\\)?\\)*\\)    instead of    	\\(\\([0-9]+:.*\n\\)*\\)    for display pattern.	(PW)21APR95 :For gdb 4.14 (Sun) :	\032\032/net/tcela/sky/aoutwrap/sun/../aoutwrap.c:714:21758:beg:125f0                                                                    ^^^^^	So change :0.+\n into :.+\n for exec patterns and up/down pattern.	It is now possible that those new patterns works also for NeXT, but I	cannot test so I will leave the ifdef NexT.    */    static PatternRec output_pattern[] = {

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -