From: hyc@hanauma.jpl.nasa.gov (Howard Chu)
Newsgroups: fj.mail-lists.x-window
Subject: Re: Xdbx for Alliant
Date: 10 Apr 92 06:44:37 GMT
Distribution: fj
Organization: SAR Systems Development & Processing, JPL

Date: Thu, 9 Apr 1992 19:52:10 GMT
Message-Id: <1992Apr9.195210.12065@elroy.jpl.nasa.gov>
Newsgroups: comp.sys.alliant,comp.windows.x

Well dang, I forgot to include alliant_regex.h in the original posting. You
can disregard the patch in the immediately preceding posting, here's the
complete alliant_regex.h file. Feed this article to patch. (That way ya
don't have to trim news article headers by hand. Handy, that...)

*** /dev/null	Thu Apr  9 10:14:29 1992
--- alliant_regex.h	Thu Apr  9 03:32:48 1992
***************
*** 0 ****
--- 1,176 ----
+ /*****************************************************************************
+  *
+  *  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
+  *
+  *****************************************************************************/
+ 
+ /*  alliant_regex.h:
+  *
+  *  Regular expression pattern matching for Alliant dbx.
+  *  Written by Howard Chu hyc@hanauma.jpl.nasa.gov 3-3-92
+  *  
+  *  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		0
+ #define O_DONE		1
+ #define O_STOPAT 	2
+ #define O_STOPIN 	3
+ #define O_UPDOWN 	4
+ #define O_BELL		5
+ #define O_LIST		6
+ #define O_SEARCH        6
+ #define O_FILE		7
+ #define O_PRINT         8
+ #define O_DEBUG         9
+ #define O_FUNC          10
+ #define O_WHERE		11
+ 
+ #define	C_ANY		-1
+ #define C_EXEC		0
+ #define C_STOPAT	1
+ #define C_STOPIN	2
+ #define C_UPDOWN	3
+ #define C_DELETE	4
+ #define C_FUNC		5
+ #define C_FILE		6
+ #define C_DEBUG		7
+ #define C_CD		8
+ #define C_USE           9
+ #define C_PWD           10
+ #define C_LIST          11
+ #define C_SEARCH        12
+ #define C_DISPLAY       13
+ #define C_PRINT         14
+ #define C_WHERE		15
+ #define C_STATUS	16
+ 
+ static PatternRec output_pattern[] = {
+     /* exec */
+     {"\\(.*\n\\)*|[0-9]+| \\(\\(stopped\\|Bus error\\|Segmentation fault\\|\
+ Interrupt\\|signal [0-9]+, code [0-9]+ - .*\\) in \\([^ ]+\\)\\( %b [0-9]+\\)*\
+  +at line \\([0-9]+\\) in file \"\\([^ ]+\\)\"\\)\n\\(.*\n\\)?\\(\\(.*\n\\)*\\)",
+      NULL,
+      {2, -1, 4, 6, 7, 9}
+     },
+     /* done */
+     {"\\(.*\n\\)*\\(execution completed, exit code is [0-9]+ (0x[0-9a-f]+)\\)",
+      NULL,
+      {-1, -1, -1, -1, -1, -1}
+     },
+     /* stop at */
+     {"(\\([0-9]+\\)) stop at \\(\"\\([^ ]+\\)\":\\)?\\([0-9]+\\)\n",
+      NULL,
+      {-1, 1, -1, 4, 3, -1}
+     },
+     /* stop in */
+     {"\\(.*\n\\)*(\\([0-9]+\\)) stop in \\([^ ]+\\)\n",
+      NULL,
+      {-1, 2, 3, -1, -1, -1}
+     },
+     /* up, down */
+     {"[ ]*\\([0-9]+\\).*\n",
+      NULL,
+      {-1, -1, -1, 1, -1, -1}
+     },
+     /* bell */
+     {"\\(not that many levels\n\\|can't continue execution\n\\)",
+      NULL,
+      {-1, -1, -1, -1, -1}
+     },
+     /* list, search */
+     {"\\([ ]*\\([0-9]+\\).*\\|\"[^ ]*\" has only [0-9]+ lines\\)\n",
+      NULL,
+      {-1, -1, -1, 2, -1, -1}
+     },
+     /* file */
+     {"\\(\\([^ ]*\\)\\|(null)\\)\n",
+      NULL,
+      {-1, -1, -1, -1, 2, -1}
+     },
+     /* print, display */
+     {"\\(warning: .*\n\\)?\\(\\(.*\\) = .*\n\\(.*\n\\)*\\)",
+      NULL,
+      { 3, -1, -1, -1, -1, 2}
+     },
+     /* debug */
+     {"\\(.*\n\\)*reading symbolic information ...\nread [0-9]+ symbols\n",
+      NULL,
+      { -1, -1, -1, -1, -1, -1}
+     },
+     /* func */
+     {"\\(loading symbols for \"[^ ]+\" ...\n\\)\\|\\([^ \n]+\\)*\n*",
+      NULL,
+      { 1, -1, 2, -1, -1, -1}
+     },
+     /* where */
+     {"\\(|[0-9]+|\\(\t.*\n\\| \\*\t\\( *at start.*\n\\|\
+ \\([^ (]+\\)[^)]*., line \\([0-9]+\\) in \"\\([^ ]+\\)\"\n\\)\\)\\)+",
+      NULL,
+      {3, -1, 4, 5, 6, -1}
+     },
+     NULL 
+ };
+ 
+ 
+ static PatternRec command_pattern[] = {
+     {"[ ]*\\(run\\|cont\\|next\\|step\\)\\( [0-9]+\\)?[ ]*", 	
+ 						NULL, {-1, -1, -1, -1, -1, -1}},
+     {"[ ]*stop[ ]+at[ ]+[0-9]+", 		NULL, {-1, -1, -1, -1, -1, -1}},
+     {"[ ]*stop[ ]+in[ ]+[^ ]+", 		NULL, {-1, -1, -1, -1, -1, -1}},
+     {"[ ]*\\(up\\|down\\)[ ]*\\( [0-9]+\\)?[ ]*\n", 		
+ 						NULL, {-1, -1, -1, -1, -1, -1}},
+     {"[ ]*\\(delete\\|d\\)[ ]+\\(all\\|[0-9]+\\)",	
+ 						NULL, {-1, -1, -1,  1, -1, -1}},
+     {"[ ]*func[ ]*\\([^ ]+\\)?[ ]*\n", 		NULL, {-1, -1,  1, -1, -1, -1}},
+     {"[ ]*file[ ]*\\([^ ]+\\)?[ ]*\n",		NULL, {-1, -1, -1, -1, -1, -1}},
+     {"[ ]*debug[ ]*[^ ]+[ ]*\n", 		NULL, {-1, -1, -1, -1, -1, -1}},
+     {"[ ]*cd[ ]*[^ ]+[ ]*", 			NULL, {-1, -1, -1, -1, -1, -1}},
+     {"[ ]*use[ ]*", 				NULL, {-1, -1, -1, -1, -1, -1}},
+     {"[ ]*pwd[ ]*\n",				NULL, {-1, -1, -1, -1, -1, -1}},
+     {"[ ]*list[ ]*",				NULL, {-1, -1, -1, -1, -1, -1}},
+     {"[ ]*\\(/\\|\?\\)[ ]*",			NULL, {-1, -1, -1, -1, -1, -1}},
+     {"[ ]*\\(un\\)?display[ ]*[^ ]+[ ]*",	NULL, {-1, -1, -1, -1, -1, -1}},
+     {"[ ]*print[ ]*[^ ]+[ ]*",			NULL, {-1, -1, -1, -1, -1, -1}},
+     {"[ ]*where[ ]*",				NULL, {-1, -1, -1, -1, -1, -1}},
+     NULL
+ };
-- 
  -- Howard Chu @ Jet Propulsion Laboratory, Pasadena, CA