home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 October / usenetsourcesnewsgroupsinfomagicoctober1994disk2.iso / x / volume13 / xxgdb / patch2 next >
Text File  |  1991-07-16  |  29KB  |  968 lines

  1. Path: uunet!cs.utexas.edu!sun-barr!cronkite.Central.Sun.COM!jethro!exodus!la.tce.com
  2. From: pierre@la.tce.com (Pierre Willard)
  3. Newsgroups: comp.sources.x
  4. Subject: v13i080: xxgdb, Patch2, Part01/01
  5. Message-ID: <16950@exodus.Eng.Sun.COM>
  6. Date: 16 Jul 91 23:53:51 GMT
  7. References: <csx-13i080-xxgdb@uunet.UU.NET>
  8. Sender: news@exodus.Eng.Sun.COM
  9. Lines: 956
  10. Approved: argv@sun.com
  11.  
  12. Submitted-by: pierre@la.tce.com (Pierre Willard)
  13. Posting-number: Volume 13, Issue 80
  14. Archive-name: xxgdb/patch2
  15. Patch-To: xxgdb: Volume 11, Issue 42-44 51-55
  16. Patch-To: xxgdb: Volume 12, Issue 78
  17.  
  18. (2/11/91) v11i042: xxgdb/part01
  19.      xxgdb - X front end for gdb, Part01/08
  20. (2/11/91) v11i043: xxgdb/part02
  21.     xxgdb - X front end for gdb
  22. (2/11/91) v11i044: xxgdb/part03
  23.      xxgdb - X front end for gdb, Part03/08
  24. (2/11/91) v11i051: xxgdb/part04
  25.      xxgdb - X front end for gdb, Part04/08
  26. (2/11/91) v11i052: xxgdb/part05
  27.     xxgdb - X front end for gdb
  28. (2/11/91) v11i053: xxgdb/part06
  29.     xxgdb - X front end for gdb
  30. (2/11/91) v11i054: xxgdb/part07
  31.     xxgdb - X front end for gdb
  32. (2/11/91) v11i055: xxgdb/part08
  33.      xxgdb - X front end for gdb, Part08/08
  34. (5/2/91) v12i078: xxgdb/patch1
  35.      xxgdb - X front end for gdb, Patch1, Part01/01
  36.  
  37.  
  38.  
  39.     XXGDB version 1.04 ( X window interface to the GDB debugger )
  40.     -------------------------------------------------------------
  41.  
  42. A little while ago (January 91) I posted the complete source files
  43. for xxgdb version 1.01 (Volume 11, Issue 42-55).
  44. In May 91 I posted the differences for xxgdb 1.03 (from 1.01)
  45. (Volume 12, Issue 78).
  46.  
  47. Please find in the following the differences from version
  48. 1.03 to 1.04.
  49.  
  50. NEW FEATURES OF VERSION 1.04  :
  51.  
  52.     display command print all error messages (if any).
  53.     fix bug display C structures.
  54.     several patches for more generic BSD machines (JBL)
  55.     patches for NeXT because some GDB incompatibilities.
  56.     display gdb messages when executing list command.
  57.     fix problem scrolling symbols while scrolling with keys (GWC).
  58.     fix bug displaying arrow when up/down in recursive function.
  59.  
  60. TO PATCH XXGDB FROM VERSION 1.03 TO VERSION 1.04 :
  61.  
  62.     cd <original xxgdb 1.03 source directory>
  63.     chmod +rw *
  64.     patch < <patch_file>
  65.     
  66. THE FOLLOWING IS THE PATCH FILE FOR XXGDB 1.04 FROM XXGDB 1.03 :
  67.  
  68. diff -rc2 v1.03/Imakefile v1.04/Imakefile
  69. *** v1.03/Imakefile    Tue Apr  2 09:33:13 1991
  70. --- v1.04/Imakefile    Tue May 14 09:00:24 1991
  71. ***************
  72. *** 10,18 ****
  73.   #if defined(SunArchitecture)
  74.   #if OSMajorVersion >= 4
  75. !     DEFINES = -DSUNOS4 $(DEFGDB)
  76.   #else
  77. !     DEFINES = -DOLDSUNOS -DNEED_STRSTR $(DEFGDB)
  78.   #endif
  79.   #endif
  80.   
  81.   #ifdef UltrixArchitecture
  82. --- 10,22 ----
  83.   #if defined(SunArchitecture)
  84.   #if OSMajorVersion >= 4
  85. ! #if OSMajorVersion == 4 && OSMinorVersion == 0
  86. !         DEFINES = -DSUNOS4 -DNEED_STRSTR $(DEFGDB)
  87.   #else
  88. !         DEFINES = -DSUNOS4 $(DEFGDB)
  89.   #endif
  90. + #else
  91. +         DEFINES = -DOLDSUNOS -DNEED_STRSTR $(DEFGDB)
  92.   #endif
  93. + #endif
  94.   
  95.   #ifdef UltrixArchitecture
  96. ***************
  97. *** 22,25 ****
  98. --- 26,33 ----
  99.           DEFINES = -DBSD $(DEFGDB)
  100.   #endif
  101. + #endif
  102. + #ifdef PegasusArchitecture
  103. + DEFINES = -DBSD $(DEFGDB) -DNEED_STRSTR
  104.   #endif
  105.   
  106. diff -rc2 v1.03/Makefile v1.04/Makefile
  107. *** v1.03/Makefile    Tue Apr  2 09:35:10 1991
  108. --- v1.04/Makefile    Thu May 30 15:39:41 1991
  109. ***************
  110. *** 37,41 ****
  111.               SHELL = /bin/sh
  112.   
  113. !               TOP = /net/pi/usr/X11R4/mit
  114.         CURRENT_DIR = .
  115.   
  116. --- 37,41 ----
  117.               SHELL = /bin/sh
  118.   
  119. !               TOP = /net/alpha/usr3/X11R4/mit
  120.         CURRENT_DIR = .
  121.   
  122. ***************
  123. *** 228,232 ****
  124.   DEFGDB =  -DGDB -g
  125.   
  126. !     DEFINES = -DSUNOS4 $(DEFGDB)
  127.   
  128.   mallocc = #malloc.c
  129. --- 228,232 ----
  130.   DEFGDB =  -DGDB -g
  131.   
  132. !         DEFINES = -DSUNOS4 $(DEFGDB)
  133.   
  134.   mallocc = #malloc.c
  135. diff -rc2 v1.03/XDbx.ad v1.04/XDbx.ad
  136. *** v1.03/XDbx.ad    Mon Nov 26 17:31:00 1990
  137. --- v1.04/XDbx.ad    Thu May 30 17:51:39 1991
  138. ***************
  139. *** 21,27 ****
  140.   *sourceWindow.scrollHorizontal:        whenNeeded
  141.   *sourceWindow.translations:        #override \n\
  142. !     <Btn1Down>:             SelectStart() SelectWord() \n\
  143. !     Shift<Btn1Up>:          Update() SelectEnd() PrintSelection() \n\
  144. !     <Btn1Up>:               Update() SelectEnd() \n
  145.   *messageWindow*font:              variable
  146.   *messageWindow.min:              30
  147. --- 21,39 ----
  148.   *sourceWindow.scrollHorizontal:        whenNeeded
  149.   *sourceWindow.translations:        #override \n\
  150. !     <Btn1Down>:     SelectStart() SelectWord() \n\
  151. !     Shift<Btn1Up>:  Update(warp) SelectEnd() PrintSelection() \n\
  152. !     <Btn1Up>:       Update(warp) SelectEnd() \n\
  153. !     <Key>Down:      next-line() Update()\n\
  154. !     <Key>Up:        previous-line() Update() \n\
  155. !     Ctrl<Key>L:     redraw-display() Update() \n\
  156. !     Ctrl<Key>N:     next-line() Update() \n\
  157. !     Ctrl<Key>P:     previous-line() Update() \n\
  158. !     Ctrl<Key>V:     next-page() Update() \n\
  159. !     Ctrl<Key>Z:     scroll-one-line-up() Update() \n\
  160. !     Meta<Key>V:     previous-page() Update() \n\
  161. !     Meta<Key>Z:     scroll-one-line-down() Update() \n\
  162. !     :Meta<Key>\>:   end-of-file() Update() \n\
  163. !     :Meta<Key>]:    forward-paragraph() Update() \n\
  164. !     :Meta<Key>[:    backward-paragraph() Update()
  165.   *messageWindow*font:              variable
  166.   *messageWindow.min:              30
  167. diff -rc2 v1.03/XXGDB_README v1.04/XXGDB_README
  168. *** v1.03/XXGDB_README    Tue Apr 16 09:03:21 1991
  169. --- v1.04/XXGDB_README    Tue Jul  9 13:36:08 1991
  170. ***************
  171. *** 165,168 ****
  172. --- 165,172 ----
  173.       See display_info_handler function in gdb_handler.c
  174.       
  175. +     - Copy the application default file (XDbx.ad) into your home
  176. +     directory or into the X '/usr/lib/X11/app-defaults' directory
  177. +     (eg, 'cp -p XDbx.ad ~/XDbx').
  178. +     
  179.       - The name of the debugger called by xxgdb is by default 'gdb'.
  180.       It can be overridden with the environment variable XXGDB_DEBUGGER.
  181. ***************
  182. *** 235,238 ****
  183. --- 239,250 ----
  184.                   Fix bug define commands in .gdbinit or source files
  185.                   Add db_name and db_prompt option (GWC)
  186. +     1.04    May 1991
  187. +                 display command print all error messages (if any).
  188. +                 fix bug display C structures.
  189. +                 several patches for more generic BSD machines (JBL)
  190. +                 patches for NeXT because some GDB incompatibilities.
  191. +                 display gdb messages when executing list command.
  192. +                 fix problem scrolling symbols while scrolling with keys (GWC).
  193. +                 fix bug displaying arrow when up/down in recursive function.
  194.                   
  195.   
  196. ***************
  197. *** 242,245 ****
  198. --- 254,261 ----
  199.       Thanks to Guy Cherry (GWC) for his numerous bug reports and
  200.       suggestions, and to all of you who helped improve xxgdb.
  201. +     
  202. +     Thanks to j braham levy (JBL) for his modifications for
  203. +     generic BSD machines.
  204. +     
  205.       
  206.                   --------------------------
  207. diff -rc2 v1.03/calldbx.c v1.04/calldbx.c
  208. *** v1.03/calldbx.c    Fri Apr 19 15:55:06 1991
  209. --- v1.04/calldbx.c    Tue May 14 09:10:10 1991
  210. ***************
  211. *** 69,73 ****
  212.    */
  213.   
  214. ! #ifdef OLDSUNOS
  215.   #include    <sys/ioctl.h>
  216.   #else
  217. --- 69,76 ----
  218.    */
  219.   
  220. ! /*
  221. !  * (JBL)10MAY91 : not only OLDSUNOS but generic BSD have sgttyb
  222. !  */
  223. ! #if defined(OLDSUNOS) || defined(BSD)
  224.   #include    <sys/ioctl.h>
  225.   #else
  226. ***************
  227. *** 146,150 ****
  228.   char *argv[];
  229.   {
  230. ! #ifndef OLDSUNOS
  231.       struct termio Termio;
  232.   #else
  233. --- 149,156 ----
  234.   char *argv[];
  235.   {
  236. ! /*
  237. !  * (JBL)10MAY91 : use sgttyb if generic BSD
  238. !  */
  239. ! #if !(defined(OLDSUNOS) || defined(BSD))
  240.       struct termio Termio;
  241.   #else
  242. ***************
  243. *** 232,235 ****
  244. --- 238,246 ----
  245.       of gdbinit files. Also for SYSV setvbuf is required. */
  246.    /*    setlinebuf(dbxfp); */
  247. +  
  248. +    /* (JBL)10MAY91 : to get the thing to work on my machine
  249. +     * i needed to set unbuffered mode via setbuf command
  250. +     * this should work on generic BSD platforms
  251. +     */
  252.      
  253.   #ifdef SYSV
  254. ***************
  255. *** 236,241 ****
  256. --- 247,256 ----
  257.       setvbuf(dbxfp, dbxfbuf, _IONBF, BUFSIZ); */
  258.   #else
  259. + #ifdef BSD
  260. +     setbuf(dbxfp, NULL);
  261. + #else
  262.       setvbuf(dbxfp, NULL, _IONBF, 0);
  263.   #endif
  264. + #endif
  265.   
  266.       dbxInputId = XtAppAddInput(app_context, master, XtInputReadMask, 
  267. ***************
  268. *** 260,264 ****
  269.        */
  270.        
  271. ! #ifndef OLDSUNOS
  272.       ioctl(slave, TCGETA, &Termio);
  273.       Termio.c_lflag &= ~ECHO;    /* No echo */
  274. --- 275,282 ----
  275.        */
  276.        
  277. !     /*
  278. !      * (JBL)10MAY91 : use sgttyb if OLDSUN or generic BSD
  279. !      */ 
  280. ! #if !(defined(OLDSUNOS) || defined(BSD))
  281.       ioctl(slave, TCGETA, &Termio);
  282.       Termio.c_lflag &= ~ECHO;    /* No echo */
  283. diff -rc2 v1.03/dbx.c v1.04/dbx.c
  284. *** v1.03/dbx.c    Fri Apr 12 17:05:54 1991
  285. --- v1.04/dbx.c    Tue May  7 14:59:14 1991
  286. ***************
  287. *** 183,186 ****
  288. --- 183,192 ----
  289.       command = get_command();
  290.           
  291. + #ifdef GDB
  292. +     if (Echo || Filter)
  293. +         filter(string, output, command);
  294. +     if (Echo && Prompt)
  295. +         AppendDialogText(xdbxprompt);
  296. + #else
  297.       if (Echo) {
  298.           filter(string, output, command);
  299. ***************
  300. *** 187,190 ****
  301. --- 193,197 ----
  302.           if (Prompt) AppendDialogText(xdbxprompt);
  303.       }
  304. + #endif
  305.       if (string) {
  306.           XtFree(string);
  307. ***************
  308. *** 224,228 ****
  309.   char *command;
  310.   {
  311. !     query_dbx_echo(command, False);
  312.   }
  313.   
  314. --- 231,235 ----
  315.   char *command;
  316.   {
  317. !     query_dbx_echo(command, False, False);
  318.   }
  319.   
  320. diff -rc2 v1.03/gdb_handler.c v1.04/gdb_handler.c
  321. *** v1.03/gdb_handler.c    Fri Apr 12 17:06:15 1991
  322. --- v1.04/gdb_handler.c    Tue May  7 14:59:11 1991
  323. ***************
  324. *** 83,87 ****
  325.    *    done_handler():        Progrm execution completed, clear breakpoints
  326.    *    source_handler():        Exec commands of source file specified.
  327. !  *    query_dbx_echo():        Send command with echo on or off.
  328.    */
  329.   
  330. --- 83,87 ----
  331.    *    done_handler():        Progrm execution completed, clear breakpoints
  332.    *    source_handler():        Exec commands of source file specified.
  333. !  *    query_dbx_echo():        Send command with echo on or off, filter on/off.
  334.    */
  335.   
  336. ***************
  337. *** 138,144 ****
  338.    
  339.        /* here we use query_dbx_echo instead of query_dbx so that any
  340. !      error message will be displayed ! */
  341.        
  342. !      query_dbx_echo("list ,main\n", TRUE);    /* tell gdb to use main file 
  343.                                    and get line number of main(). (,main will end at main) */
  344.      
  345. --- 138,144 ----
  346.    
  347.        /* here we use query_dbx_echo instead of query_dbx so that any
  348. !      error message will be displayed ! (because Filter is True) */
  349.        
  350. !      query_dbx_echo("list ,main\n", False, True);    /* tell gdb to use main file 
  351.                                    and get line number of main(). (,main will end at main) */
  352.      
  353. ***************
  354. *** 181,185 ****
  355.       Arg        args[MAXARGS];
  356.       Cardinal    n;
  357.   #ifdef UNDISPWIN
  358.       /* this code removes the display window when there is nothing to display (GWC) */
  359. --- 181,185 ----
  360.       Arg        args[MAXARGS];
  361.       Cardinal    n;
  362. !     
  363.   #ifdef UNDISPWIN
  364.       /* this code removes the display window when there is nothing to display (GWC) */
  365. ***************
  366. *** 322,326 ****
  367.   void display_handler()    /* display or undisplay */
  368.   {
  369. !     query_dbx("display\n");    /* update display */
  370.   }
  371.   
  372. --- 322,326 ----
  373.   void display_handler()    /* display or undisplay */
  374.   {
  375. !     query_dbx_echo("display\n",False, True);    /* update display */
  376.   }
  377.   
  378. ***************
  379. *** 517,521 ****
  380.                       }
  381.                   else
  382. !                     query_dbx_echo (s, TRUE);
  383.                   }
  384.               }
  385. --- 517,521 ----
  386.                       }
  387.                   else
  388. !                     query_dbx_echo (s, TRUE, TRUE);
  389.                   }
  390.               }
  391. ***************
  392. *** 553,560 ****
  393.    *
  394.    *    Same as query_dbx() in dbx.c except that Echo = True or False.
  395.    */
  396. ! void query_dbx_echo(command, echo)
  397.   char *command;
  398.   int echo;
  399.   {
  400.       write_dbx(command);
  401. --- 553,564 ----
  402.    *
  403.    *    Same as query_dbx() in dbx.c except that Echo = True or False.
  404. +  *  and in case Echo = False, filter says if filter() must be called.
  405.    */
  406. ! Boolean Filter; /* filter dbx output (if Echo == false) ? */
  407. ! void query_dbx_echo(command, echo, filter)
  408.   char *command;
  409.   int echo;
  410. + int filter;
  411.   {
  412.       write_dbx(command);
  413. ***************
  414. *** 562,565 ****
  415. --- 566,570 ----
  416.   
  417.       Echo = echo;
  418. +     Filter = filter;
  419.       Prompt = False;
  420.       while (!Prompt)
  421. diff -rc2 v1.03/gdb_parser.c v1.04/gdb_parser.c
  422. *** v1.03/gdb_parser.c    Fri Apr 12 17:05:32 1991
  423. --- v1.04/gdb_parser.c    Wed May 22 16:46:47 1991
  424. ***************
  425. *** 256,260 ****
  426.           break;
  427.   
  428. !     case C_DISPLAY:
  429.           {
  430.           if ((strcmp(output_string, "") == NULL) ||
  431. --- 256,260 ----
  432.           break;
  433.   
  434. !     case C_DISPLAY:    /* means "display foo\n" command */
  435.           {
  436.           if ((strcmp(output_string, "") == NULL) ||
  437. ***************
  438. *** 273,277 ****
  439.           break;
  440.   
  441. !     case C_DISPLAY_INFO:
  442.           {
  443.           if ((strcmp(output_string, "") == NULL) ||
  444. --- 273,277 ----
  445.           break;
  446.   
  447. !     case C_DISPLAY_INFO: /* means "display\n" command */
  448.           {
  449.           if ((strcmp(output_string, "") == NULL) ||
  450. ***************
  451. *** 472,484 ****
  452.               /* try to find end of display structure */
  453.               
  454. !             while(p1 = strstr(p,"}\n"))        /* find next occurrence of "}\n" */
  455. !                 {
  456. !                 if (p1 && ((p1 == p) || (*(p1-1) == '\n')))
  457. !                     {
  458. !                     /* this line is the end of the current display */
  459. !                     p = p1 + strlen("}\n");
  460. !                     break;
  461. !                     }
  462. !                 }
  463.               }
  464.           }
  465. --- 472,477 ----
  466.               /* try to find end of display structure */
  467.               
  468. !             if (p1 = strstr(p,"\n}\n"))
  469. !                 p = p1 + strlen("\n}\n");
  470.               }
  471.           }
  472. ***************
  473. *** 585,588 ****
  474. --- 578,595 ----
  475.                   strcpy(s, "");
  476.                   break;
  477. +             case C_DISPLAY_INFO:
  478. +                     /* (PW)7MAY91 : display error messages */
  479. +                 if (match(output_pattern, s, O_DISPLAY_INFO) != -1)
  480. +                     {    
  481. +                     if (Token.mesg && strcmp(Token.mesg, ""))    
  482. +                            {
  483. +                         AppendDialogText(Token.mesg);
  484. +                         bell(0);
  485. +                         }        
  486. +                     strcpy(s, "");
  487. +                     }
  488. +                 break;
  489. +                 
  490.               case C_SEARCH:
  491.                   if (match(output_pattern, s, O_SEARCH) != -1)
  492. ***************
  493. *** 590,595 ****
  494.                   break;
  495.               case C_LIST:
  496.                   if (match(output_pattern, s, O_LIST) != -1)
  497. !                 strcpy(s, "");
  498.                   break;
  499.               case C_PRINT:
  500. --- 597,611 ----
  501.                   break;
  502.               case C_LIST:
  503. +                     /* (PW)22MAY91 : display messages ") */
  504.                   if (match(output_pattern, s, O_LIST) != -1)
  505. !                     {    
  506. !                     if (Token.mesg && strcmp(Token.mesg, ""))    
  507. !                            {
  508. !                         AppendDialogText(Token.mesg);
  509. !                         if (strstr(Token.mesg,"Source file is more recent than executable."))
  510. !                             bell(0); /* Warn user WYSIWYG not true */
  511. !                         }        
  512. !                     strcpy(s, "");
  513. !                     }
  514.                   break;
  515.               case C_PRINT:
  516. ***************
  517. *** 612,615 ****
  518. --- 628,632 ----
  519.               {
  520.               case C_DISPLAY:
  521. +             case C_DISPLAY_INFO:
  522.               case C_SEARCH:
  523.               case C_LIST:
  524. diff -rc2 v1.03/gdb_regex.h v1.04/gdb_regex.h
  525. *** v1.03/gdb_regex.h    Fri Apr 12 10:06:33 1991
  526. --- v1.04/gdb_regex.h    Thu May 30 16:54:06 1991
  527. ***************
  528. *** 280,285 ****
  529.   
  530.   static PatternRec output_pattern[] = {
  531.       /* exec with Message after */
  532. !     {"\\(.*\n\\)*\032\032\\([^ ]+\\):\\([0-9]+\\):\\([0-9]+\\):\\([^ ]+\\):0x.+\n\\([ ]*[^0-9].*\n\\)\\(\\([0-9]+:.*\n\\(\\( .*\n\\)*}\n\\)?\\)*\\)",
  533.        NULL,
  534.        {6, -1, -1, 3, 2, 7}
  535. --- 280,287 ----
  536.   
  537.   static PatternRec output_pattern[] = {
  538. + #ifndef NeXT  /* if standard GDB */
  539.       /* exec with Message after */
  540. !     {"\\(.*\n\\)*\032\032\\([^ \n]+\\):\\([0-9]+\\):\\([0-9]+\\):\\([^ \n]+\\):0x.+\n\\([ ]*[^0-9\n].*\n\\)\\(\\([0-9]+:.*\n\\(\\( .*\n\\)*}\n\\)?\\)*\\)",
  541.        NULL,
  542.        {6, -1, -1, 3, 2, 7}
  543. ***************
  544. *** 286,290 ****
  545.       },
  546.       /* exec with Message before */
  547. !     {"\\(.*\n\\)*\\([ ]*[^ ].*\n\\)\032\032\\([^ ]+\\):\\([0-9]+\\):\\([0-9]+\\):\\([^ ]+\\):0x.+\n\\(\\([0-9]+:.*\n\\(\\( .*\n\\)*}\n\\)?\\)*\\)",
  548.        NULL,
  549.        {2, -1, -1, 4, 3, 7}    
  550. --- 288,292 ----
  551.       },
  552.       /* exec with Message before */
  553. !     {"\\(.*\n\\)*\\([ ]*[^ \n].*\n\\)\032\032\\([^ \n]+\\):\\([0-9]+\\):\\([0-9]+\\):\\([^ \n]+\\):0x.+\n\\(\\([0-9]+:.*\n\\(\\( .*\n\\)*}\n\\)?\\)*\\)",
  554.        NULL,
  555.        {2, -1, -1, 4, 3, 7}    
  556. ***************
  557. *** 291,298 ****
  558.       },
  559.       /* exec without Message */
  560. !     {"\\(.*\n\\)*\032\032\\(\\([^ ]+\\):\\([0-9]+\\):\\([0-9]+\\):\\([^ ]+\\):0x.+\n\\)\\(\\([0-9]+:.*\n\\(\\( .*\n\\)*}\n\\)?\\)*\\)",
  561.        NULL,
  562.        {2, -1, -1, 4, 3, 7}
  563.       },
  564.       /* done */
  565.       {"\\(.*\n\\)*\n\\(Program terminated with signal \\|Program exited with code 0\\|Program exited normally\\).*\n\\(.*\n\\)*",
  566. --- 293,319 ----
  567.       },
  568.       /* exec without Message */
  569. !     {"\\(.*\n\\)*\032\032\\(\\([^ \n]+\\):\\([0-9]+\\):\\([0-9]+\\):\\([^ \n]+\\):0x.+\n\\)\\(\\([0-9]+:.*\n\\(\\( .*\n\\)*}\n\\)?\\)*\\)",
  570.        NULL,
  571.        {2, -1, -1, 4, 3, 7}
  572.       },
  573. +     
  574. + #else  /* NeXT is a special case : same as standard except that ":0x.+" are removed. */
  575. +     /* exec with Message after */
  576. +     {"\\(.*\n\\)*\032\032\\([^ \n]+\\):\\([0-9]+\\):\\([0-9]+\\):\\([^ \n]+\\)\n\\([ ]*[^0-9\n].*\n\\)\\(\\([0-9]+:.*\n\\(\\( .*\n\\)*}\n\\)?\\)*\\)",
  577. +      NULL,
  578. +      {6, -1, -1, 3, 2, 7}
  579. +     },
  580. +     /* exec with Message before */
  581. +     {"\\(.*\n\\)*\\([ ]*[^ \n].*\n\\)\032\032\\([^ \n]+\\):\\([0-9]+\\):\\([0-9]+\\):\\([^ \n]+\\)\n\\(\\([0-9]+:.*\n\\(\\( .*\n\\)*}\n\\)?\\)*\\)",
  582. +      NULL,
  583. +      {2, -1, -1, 4, 3, 7}    
  584. +     },
  585. +     /* exec without Message */
  586. +     {"\\(.*\n\\)*\032\032\\(\\([^ \n]+\\):\\([0-9]+\\):\\([0-9]+\\):\\([^ \n]+\\)\n\\)\\(\\([0-9]+:.*\n\\(\\( .*\n\\)*}\n\\)?\\)*\\)",
  587. +      NULL,
  588. +      {2, -1, -1, 4, 3, 7}
  589. +     },
  590. + #endif /* NeXT */
  591.       /* done */
  592.       {"\\(.*\n\\)*\n\\(Program terminated with signal \\|Program exited with code 0\\|Program exited normally\\).*\n\\(.*\n\\)*",
  593. ***************
  594. *** 301,305 ****
  595.       },
  596.       /* break */
  597. !     {"\\(.*\n\\)*Breakpoint \\([0-9]+\\) at [^ ]+: file \\([^ ]+\\), line \\([0-9]+\\).\n",
  598.        NULL,
  599.        {-1, 2, -1, 4, 3, -1}
  600. --- 322,326 ----
  601.       },
  602.       /* break */
  603. !     {"\\(.*\n\\)*Breakpoint \\([0-9]+\\) at [^ \n]+: file \\([^ \n]+\\), line \\([0-9]+\\).\n",
  604.        NULL,
  605.        {-1, 2, -1, 4, 3, -1}
  606. ***************
  607. *** 306,318 ****
  608.       },
  609.       /* info directories */
  610. !     {"Source directories searched:[ ]*\\([^ ]+\\)[ ]*\n",
  611.        NULL,
  612.        { -1, -1, -1, -1, 1, -1}
  613.       },
  614.       /* up, down */
  615. !     {"\\(.*\n\\)*\\(#[0-9]+[ ]+\\(0x[^ ]+[ ]+in[ ]+\\)?\\([^ ]+\\)[^\032]*\\)\032\032\\([^ ]+\\):\\([0-9]+\\):\\([0-9]+\\):\\([^ ]+\\):0x.+\n",
  616.        NULL,
  617.        {2, -1, 4, 6, 5, -1}    
  618.       },
  619.       /* bell */
  620.       {"\\(Undefined command: .*\n\\|Already at the \\(top\\|bottom\\) call level\n\\|\
  621. --- 327,351 ----
  622.       },
  623.       /* info directories */
  624. !     {"Source directories searched:[ ]*\\([^ \n]+\\)[ ]*\n",
  625.        NULL,
  626.        { -1, -1, -1, -1, 1, -1}
  627.       },
  628. +     
  629. +     
  630. + #ifndef NeXT  /* if standard GDB */
  631.       /* up, down */
  632. !     {"\\(.*\n\\)*\\(#[0-9]+[ ]+\\(0x[^ \n]+[ ]+in[ ]+\\)?\\([^ \n]+\\)[^\032]*\\)\032\032\\([^ \n]+\\):\\([0-9]+\\):\\([0-9]+\\):\\([^ \n]+\\):0x.+\n",
  633.        NULL,
  634.        {2, -1, 4, 6, 5, -1}    
  635.       },
  636. + #else  /* NeXT is a special case : same as standard except that ":0x.+" are removed. */
  637. +     /* up, down */
  638. +     {"\\(.*\n\\)*\\(#[0-9]+[ ]+\\(0x[^ \n]+[ ]+in[ ]+\\)?\\([^ \n]+\\)[^\032]*\\)\032\032\\([^ \n]+\\):\\([0-9]+\\):\\([0-9]+\\):\\([^ \n]+\\)\n",
  639. +      NULL,
  640. +      {2, -1, 4, 6, 5, -1}    
  641. +     },
  642. + #endif /* NeXT */
  643.       /* bell */
  644.       {"\\(Undefined command: .*\n\\|Already at the \\(top\\|bottom\\) call level\n\\|\
  645. ***************
  646. *** 330,334 ****
  647.       },
  648.       /* info line */
  649. !     {"\\(Line \\(number \\)?[0-9]+ \\(of\\|is out of range for\\) \"\\([^ ]+\\)\".*\\)\n",
  650.        NULL,
  651.        {-1, -1, -1, -1, 4, -1}
  652. --- 363,367 ----
  653.       },
  654.       /* info line */
  655. !     {"\\(Line \\(number \\)?[0-9]+ \\(of\\|is out of range for\\) \"\\([^ \n]+\\)\".*\\)\n",
  656.        NULL,
  657.        {-1, -1, -1, -1, 4, -1}
  658. ***************
  659. *** 345,357 ****
  660.       },
  661.       /* directory */
  662. !     {"\\([^ ]+ is already in the source path.[ ]*\n\\)*Source directories searched:[ ]*\\([^ ]+\\)[ ]*\n",
  663.        NULL,
  664.        { -1, -1, -1, -1, 1, -1}
  665.       },
  666. !     /* list */
  667. !     {"\\(.*\n\\)*\\(\\([0-9]+\\).*\n\\)",
  668.        NULL,
  669. !      { -1, -1, -1, 3, -1, -1}
  670.       },
  671.       /* display */
  672.       {"\\([0-9]+:.*\n\\)",
  673. --- 378,395 ----
  674.       },
  675.       /* directory */
  676. !     {"\\([^ \n]+ is already in the source path.[ ]*\n\\)*Source directories searched:[ ]*\\([^ \n]+\\)[ ]*\n",
  677.        NULL,
  678.        { -1, -1, -1, -1, 1, -1}
  679.       },
  680. !     /* list : 22MAY91 put message in Token.mesg (edit again 30MAY91) */
  681. !     {"\\(\\([^0-9\n]+.*\n\\)*\\)\\(.*\n\\)*\\(\\([0-9]+\\).*\n\\)",
  682.        NULL,
  683. !      { 1, -1, -1, 5, -1, -1}
  684.       },
  685. + /*    {"\\(\\(.*\n\\)*\\)\\(\\([0-9]+\\).*\n\\)",
  686. +      NULL,
  687. +      { 1, -1, -1, 4, -1, -1}
  688. +     },
  689. + */
  690.       /* display */
  691.       {"\\([0-9]+:.*\n\\)",
  692. ***************
  693. *** 360,369 ****
  694.       },
  695.       /* info display */
  696. !     {"\\(\\([0-9]+:.*\n\\(\\( .*\n\\)*}\n\\)?\\)*\\)",
  697.        NULL,
  698.        { -1, -1, -1, -1, -1, 1}
  699.       },
  700.       /* pwd or cd */
  701. !     {"Working directory[ ]+\\([^ ]+\\).[ ]*\n\\([ ]*(canonically[ ]+\\([^ ]+\\)).\n\\)?",
  702.        NULL,
  703.        { 1, -1, -1, -1, -1, 3}
  704. --- 398,412 ----
  705.       },
  706.       /* info display */
  707. !     {"\\(\\([0-9]+:.*\n\\(\\( .*\n\\)*}\n\\)?\\)*\\)\\(\\(.*\n\\)*\\)",
  708.        NULL,
  709. +      {  5, -1, -1, -1, -1, 1}
  710. +     },
  711. + /*    {"\\(\\([0-9]+:.*\n\\(\\( .*\n\\)*}\n\\)?\\)*\\)",
  712. +      NULL,
  713.        { -1, -1, -1, -1, -1, 1}
  714.       },
  715. + */
  716.       /* pwd or cd */
  717. !     {"Working directory[ ]+\\([^ \n]+\\).[ ]*\n\\([ ]*(canonically[ ]+\\([^ \n]+\\)).\n\\)?",
  718.        NULL,
  719.        { 1, -1, -1, -1, -1, 3}
  720. ***************
  721. *** 370,374 ****
  722.       },
  723.       /* program received signal */
  724. !     {"\\(.*\n\\)*\n\\(Program received signal \\([-]?[0-9]+\\), [^ ]+.*\n\\)\\(.*\n\\)*",
  725.       NULL,
  726.        {  2, 3, -1, -1, -1, -1}
  727. --- 413,417 ----
  728.       },
  729.       /* program received signal */
  730. !     {"\\(.*\n\\)*\n\\(Program received signal \\([-]?[0-9]+\\), [^ \n]+.*\n\\)\\(.*\n\\)*",
  731.       NULL,
  732.        {  2, 3, -1, -1, -1, -1}
  733. ***************
  734. *** 375,379 ****
  735.       },
  736.       /* special for test in filter_display_info() */
  737. !     {"\\([^0-9].*\n\\)*\\([0-9]+:.*\n\\)\\(.*\n\\)*",
  738.        NULL,
  739.        { -1, -1, -1, -1, -1, 2}
  740. --- 418,422 ----
  741.       },
  742.       /* special for test in filter_display_info() */
  743. !     {"\\([^0-9\n].*\n\\)*\\([0-9]+:.*\n\\)\\(.*\n\\)*",
  744.        NULL,
  745.        { -1, -1, -1, -1, -1, 2}
  746. ***************
  747. *** 385,389 ****
  748.       },
  749.       /* core-file */
  750. !     {"\\(.*\n\\)*\\(Program terminated with signal \\([-]?[0-9]+\\), [^ ]+.*\n\\)\\(.*\n\\)*",
  751.       NULL,
  752.        {  2, 3, -1, -1, -1, -1}
  753. --- 428,432 ----
  754.       },
  755.       /* core-file */
  756. !     {"\\(.*\n\\)*\\(Program terminated with signal \\([-]?[0-9]+\\), [^ \n]+.*\n\\)\\(.*\n\\)*",
  757.       NULL,
  758.        {  2, 3, -1, -1, -1, -1}
  759. ***************
  760. *** 434,438 ****
  761.       /* symbol-file */
  762.       {"[ ]*sy.*\n",                             NULL, {-1, -1, -1, -1, -1, -1}},
  763. !     {"[ ]*cd[ ]*[^ ]+[ ]*\n",                 NULL, {-1, -1, -1, -1, -1, -1}},
  764.       
  765.       /* directory */
  766. --- 477,481 ----
  767.       /* symbol-file */
  768.       {"[ ]*sy.*\n",                             NULL, {-1, -1, -1, -1, -1, -1}},
  769. !     {"[ ]*cd[ ]*[^ \n]+[ ]*\n",             NULL, {-1, -1, -1, -1, -1, -1}},
  770.       
  771.       /* directory */
  772. ***************
  773. *** 451,455 ****
  774.       add any expression to be displayed */
  775.       {"[ ]*disp[lay]*[ ]*\n",                            NULL, {-1, -1, -1, -1, -1, -1}},
  776. !     {"[ ]*disp[lay]\\(/[^ ]+\\)?*[ ]*[^ ]+[ ]*.*\n",    NULL, {-1, -1, -1, -1, -1, -1}},
  777.       
  778.       /* undisplay */
  779. --- 494,498 ----
  780.       add any expression to be displayed */
  781.       {"[ ]*disp[lay]*[ ]*\n",                            NULL, {-1, -1, -1, -1, -1, -1}},
  782. !     {"[ ]*disp[lay]\\(/[^ \n]+\\)?*[ ]*[^ \n]+[ ]*.*\n",    NULL, {-1, -1, -1, -1, -1, -1}},
  783.       
  784.       /* undisplay */
  785. ***************
  786. *** 458,462 ****
  787.       /* Note that Token.mesg (if any) is updated with print command (see 1) */
  788.       
  789. !     {"[ ]*print[ ]*\\([^ ]?\\([ ]+[^ ]+\\)*\\)[ ]*\n",    NULL, { 1, -1, -1, -1, -1, -1}},
  790.       {"[ ]*info[ ]+break[ ]*\n",                NULL, {-1, -1, -1, -1, -1, -1}},
  791.       
  792. --- 501,505 ----
  793.       /* Note that Token.mesg (if any) is updated with print command (see 1) */
  794.       
  795. !     {"[ ]*print[ ]*\\([^ \n]?\\([ ]+[^ \n]+\\)*\\)[ ]*\n",    NULL, { 1, -1, -1, -1, -1, -1}},
  796.       {"[ ]*info[ ]+break[ ]*\n",                NULL, {-1, -1, -1, -1, -1, -1}},
  797.       
  798. ***************
  799. *** 471,477 ****
  800.   
  801.       /* define */
  802. !     {"[ ]*def[ine]*[ ]+[^ ]+\n",             NULL, {-1, -1, -1, -1, -1, -1}},
  803.       /* document */
  804. !     {"[ ]*doc[ument]*[ ]+[^ ]+\n",             NULL, {-1, -1, -1, -1, -1, -1}},
  805.       /* end of define or document */
  806.       {"[ ]*end[ ]*.*",                         NULL, {-1, -1, -1, -1, -1, -1}},
  807. --- 514,520 ----
  808.   
  809.       /* define */
  810. !     {"[ ]*def[ine]*[ ]+[^ \n]+\n",             NULL, {-1, -1, -1, -1, -1, -1}},
  811.       /* document */
  812. !     {"[ ]*doc[ument]*[ ]+[^ \n]+\n",         NULL, {-1, -1, -1, -1, -1, -1}},
  813.       /* end of define or document */
  814.       {"[ ]*end[ ]*.*",                         NULL, {-1, -1, -1, -1, -1, -1}},
  815. diff -rc2 v1.03/global.h v1.04/global.h
  816. *** v1.03/global.h    Tue Apr  2 09:00:55 1991
  817. --- v1.04/global.h    Tue May  7 14:59:20 1991
  818. ***************
  819. *** 225,228 ****
  820. --- 225,229 ----
  821.   
  822.   #ifdef GDB
  823. + extern Boolean     Filter;            /* filter dbx output (if Echo == false) ? */
  824.   extern void         display_info_handler();
  825.   extern void         break_handler();
  826. diff -rc2 v1.03/signs.c v1.04/signs.c
  827. *** v1.03/signs.c    Mon Nov 26 17:31:32 1990
  828. --- v1.04/signs.c    Tue Jul  9 13:32:49 1991
  829. ***************
  830. *** 332,340 ****
  831.   
  832.       if (file == NULL) return;
  833.       if (updown.file && !strcmp(updown.file, arrow.file) && 
  834. !     !strcmp(updown.func, arrow.func)) {
  835.       updown.line = 0;
  836.       strcpy(updown.file, "");
  837.       }
  838.       i = updown.i;
  839.       if (i>=0 && i<file->lines)
  840. --- 332,343 ----
  841.   
  842.       if (file == NULL) return;
  843. +     
  844. + /* (PW)9JULY91 : add test line else it prevents up/down when a function calls itself */
  845.       if (updown.file && !strcmp(updown.file, arrow.file) && 
  846. !     !strcmp(updown.func, arrow.func) && (updown.line == arrow.line)) {
  847.       updown.line = 0;
  848.       strcpy(updown.file, "");
  849.       }
  850.       i = updown.i;
  851.       if (i>=0 && i<file->lines)
  852. diff -rc2 v1.03/source.c v1.04/source.c
  853. *** v1.03/source.c    Thu Apr 11 14:33:58 1991
  854. --- v1.04/source.c    Thu May 30 17:53:57 1991
  855. ***************
  856. *** 131,135 ****
  857.           file->bottomline = MIN (file->topline + file->lines - 1, 
  858.                       file->lastline);
  859. !         XawTextSetInsertionPoint(sourceWindow, file->linepos[file->topline]);
  860.           UpdateLineLabel(file->topline);
  861.               UpdateStops(file);
  862. --- 131,151 ----
  863.           file->bottomline = MIN (file->topline + file->lines - 1, 
  864.                       file->lastline);
  865. !         /* 
  866. !           03/26/91 mod 7 GWC
  867. !           Fixed a bug where the special margin symbols (arrows, stop signs,
  868. !           etc.) did not scroll when one moved the text with keyboard commands
  869. !           such as Ctrl<Key>n.  To do this the Update action procedure should
  870. !           be called after text widget actions such as next-line.
  871. !           Unfortunately Update needed to be enhanced a bit not to always warp
  872. !           the cursor to the top of the window.  You can now call Update with a
  873. !           parameter "warp" to warp the cursor to the top of the screen; the
  874. !           default is not to warp.
  875. !           */
  876. !         if (*num_params == 1 && strcmp(params[0], "warp") == 0)
  877. !           {
  878. !         XawTextSetInsertionPoint(sourceWindow,
  879. !                      file->linepos[file->topline]);
  880. !           }
  881.           UpdateLineLabel(file->topline);
  882.               UpdateStops(file);
  883. ***************
  884. *** 598,601 ****
  885. --- 614,626 ----
  886.           dirList[i] = NULL;
  887.       }
  888. + #if defined(NeXT) && defined(GDB)
  889. +     /* for NeXT computer, send 'directory' command for each directory */
  890. +     for (i=0; dirList[i]; i++) {
  891. +     sprintf(command, "directory %s\n", dirList[i]);
  892. +     Parse = False;
  893. +     query_dbx(command);
  894. +     }
  895. + #else /* not NeXT */
  896.       strcpy(list, "");                /* tell dbx our new list */
  897.       for (i=0; dirList[i]; i++) {
  898. ***************
  899. *** 610,613 ****
  900. --- 635,639 ----
  901.       Parse = False;
  902.       query_dbx(command);
  903. + #endif /* not NeXT */
  904.   }
  905.   
  906. diff -rc2 v1.03/windows.c v1.04/windows.c
  907. *** v1.03/windows.c    Wed Apr  3 15:54:34 1991
  908. --- v1.04/windows.c    Mon May 20 09:27:40 1991
  909. ***************
  910. *** 246,250 ****
  911.       Cardinal     n;
  912.   
  913. !     fulllength = strlen ("  ") + strlen (format) + 1 + (arg == NULL) ? 0 : strlen (arg);
  914.       
  915.       if (fulllength > LINESIZ)
  916. --- 246,250 ----
  917.       Cardinal     n;
  918.   
  919. !     fulllength = strlen ("  ") + strlen (format) + 1 + ((arg == NULL) ? 0 : strlen (arg));
  920.       
  921.       if (fulllength > LINESIZ)
  922. diff -rc2 v1.03/xdbx.c v1.04/xdbx.c
  923. *** v1.03/xdbx.c    Tue Apr 16 10:22:40 1991
  924. --- v1.04/xdbx.c    Mon Jul 15 15:50:50 1991
  925. ***************
  926. *** 72,76 ****
  927.   
  928.   #ifdef GDB
  929. ! #define XGDBVERSION    "1.03"
  930.   #endif
  931.   
  932. --- 72,76 ----
  933.   
  934.   #ifdef GDB
  935. ! #define XGDBVERSION    "1.04"
  936.   #endif
  937.   
  938. ***************
  939. *** 261,265 ****
  940.   
  941.   #ifdef GDB
  942. !     sprintf(title, "xxgdb %s (from xdbx %s patch level %d)", XGDBVERSION,VERSION, PATCHLEVEL);
  943.       XStoreName(display, XtWindow(toplevel), title);
  944.       XSetIconName(display, XtWindow(toplevel), "xxgdb");
  945. --- 261,265 ----
  946.   
  947.   #ifdef GDB
  948. !     sprintf(title, "xxgdb %s", XGDBVERSION);
  949.       XStoreName(display, XtWindow(toplevel), title);
  950.       XSetIconName(display, XtWindow(toplevel), "xxgdb");
  951.  
  952. --
  953. Dan Heller
  954. O'Reilly && Associates       Z-Code Software    Comp-sources-x:
  955. Senior Writer                President          comp-sources-x@uunet.uu.net
  956. argv@ora.com                 argv@zipcode.com
  957.