[comp.sys.encore] GNU utils under Umax

march@m.cs.uiuc.edu (03/16/90)

I seem to be having problems working with GDB 3.[45] under Umax 4.2 and 4.3.
GDB doesn't always recognize the debugging information produced by 
the -g option.  My current belief is that COFF is to blame.  The solution,
as far as I can see is to install and use all GNU software (gcc, gas and
gnu ld).  Can anyone confirm this suspicion?  Has anyone succeeded in
getting GDB to interpret debugging information *consistently*?

Any hints or suggestions are welcome.

-Steve

===============================================================================
Steve March                            (H) (217)328-5176/328-5230  (W) 333-7408
Domain: march@cs.uiuc.edu             Path: {uunet|convex|pur-ee}!uiucdcs!march
"Time and space are modes by which we think and not conditions in which
 we live."  - Albert Einstein

rhealey@umn-d-ub.D.UMN.EDU (Rob Healey) (03/17/90)

In article <37500015@m.cs.uiuc.edu> march@m.cs.uiuc.edu writes:
>
>I seem to be having problems working with GDB 3.[45] under Umax 4.2 and 4.3.
>GDB doesn't always recognize the debugging information produced by 
>the -g option.  My current belief is that COFF is to blame.  The solution,
>as far as I can see is to install and use all GNU software (gcc, gas and
>gnu ld).  Can anyone confirm this suspicion?  Has anyone succeeded in
>getting GDB to interpret debugging information *consistently*?
>Any hints or suggestions are welcome.
>
	COFF is not the problem, only FSF's attitude toward it. The
	code for COFF is a little bit wrong. Apply the below patches
	to a copy of the most recent GDB3.5 distribution. The patches
	are a subset of those that add an AT&T UNIX PC definition to
	GDB. Enjoy!

			-Rob
------------------------------------------ Snips GDB3.5 patch ------------------
diff -rc2 ../dist2/coffread.c ./coffread.c
*** ../dist2/coffread.c	Fri Mar  2 21:26:38 1990
--- ./coffread.c	Sat Mar  3 13:20:41 1990
***************
*** 865,868 ****
--- 865,869 ----
    static AUXENT fcn_aux_saved;
  
+   int in_source_file = 0;       /* a .file is open */
    int num_object_files = 0;
    int next_file_symnum = -1;
***************
*** 964,968 ****
  		start_symtab ();
  	      }
! 	    num_object_files++;
  	    break;
  
--- 965,969 ----
  		start_symtab ();
  	      }
!             in_source_file = 1;
  	    break;
  
***************
*** 970,984 ****
  	    if (cs->c_name[0] == '.') {
  		    if (strcmp (cs->c_name, _TEXT) == 0) {
! 			    if (num_object_files == 1) {
! 				    /* last address of startup file */
  				    first_object_file_end = cs->c_value +
  					    main_aux.x_scn.x_scnlen;
  			    }
! 			    /* for some reason the old code didn't do
! 			     * this if this section entry had
! 			     * main_aux.x_scn.x_nlinno equal to 0
! 			     */
! 			    complete_symtab (filestring, cs->c_value,
! 					     main_aux.x_scn.x_scnlen);
  		    }
  		    /* flush rest of '.' symbols */
--- 971,987 ----
  	    if (cs->c_name[0] == '.') {
  		    if (strcmp (cs->c_name, _TEXT) == 0) {
!                             /* squirrel away last address of startup file */
! 			    if (num_object_files++ == 0) {
  				    first_object_file_end = cs->c_value +
  					    main_aux.x_scn.x_scnlen;
  			    }
!                             /* Avoid overwriting the symtab info of files */
!                             /* with debugging symbols with that of later */
!                             /* files with no symbols.  There should only */
!                             /* be one .text per .file? */
!                             if (in_source_file)
!                               complete_symtab (filestring, cs->c_value,
!                                                main_aux.x_scn.x_scnlen);
!                             in_source_file = 0;
  		    }
  		    /* flush rest of '.' symbols */
***************
*** 985,988 ****
--- 988,999 ----
  		    break;
  	    }
+ #ifdef att3b1
+             /* Ignore special swbeg and string labels generated by gcc. */
+             else if (cs->c_type == T_NULL
+                      && cs->c_name[0] != '\0' && cs->c_name[1] != '\0'
+                      && cs->c_name[2] == '%') {
+               break;
+             }
+ #endif
  	    /* fall in for static symbols that don't start with '.' */
  	  case C_EXT:
***************
*** 1128,1131 ****
--- 1139,1147 ----
      case CLIPPERMAGIC:
  #endif      
+ #ifdef MC68KWRMAGIC
+       case MC68KWRMAGIC:
+       case MC68KROMAGIC:
+       case MC68KPGMAGIC:
+ #endif
  	return file_hdr->f_nsyms;
  
diff -rc2 ../dist2/default-dep.c ./default-dep.c
*** ../dist2/default-dep.c	Fri Mar  2 21:26:58 1990
--- ./default-dep.c	Fri Mar  2 21:24:38 1990
***************
*** 32,37 ****
  #include <signal.h>
  #include <sys/ioctl.h>
- /* #include <fcntl.h>  Can we live without this?  */
  
  #ifdef COFF_ENCAPSULATE
  #include "a.out.encap.h"
--- 32,40 ----
  #include <signal.h>
  #include <sys/ioctl.h>
  
+ #ifndef O_RDONLY
+ #include <fcntl.h>
+ #endif
+ 
  #ifdef COFF_ENCAPSULATE
  #include "a.out.encap.h"
***************
*** 47,50 ****
--- 50,59 ----
  #include <sys/stat.h>
  
+ /* Some machines don't store the u struct at the start of the per-process */
+ /* area or the core.  U_OFFSET tells how far in it is. */
+ #ifndef U_OFFSET
+ #define U_OFFSET 0
+ #endif
+ 
  extern int errno;
  
***************
*** 111,115 ****
  
    struct user u;
!   unsigned int offset = (char *) &u.u_ar0 - (char *) &u;
    offset = ptrace (3, inferior_pid, offset, 0) - KERNEL_U_ADDR;
  
--- 120,124 ----
  
    struct user u;
!   unsigned int offset = U_OFFSET + ((char *) &u.u_ar0 - (char *) &u);
    offset = ptrace (3, inferior_pid, offset, 0) - KERNEL_U_ADDR;
  
***************
*** 137,141 ****
  
    struct user u;
!   unsigned int offset = (char *) &u.u_ar0 - (char *) &u;
    offset = ptrace (3, inferior_pid, offset, 0) - KERNEL_U_ADDR;
  
--- 146,150 ----
  
    struct user u;
!   unsigned int offset = U_OFFSET + ((char *) &u.u_ar0 - (char *) &u);
    offset = ptrace (3, inferior_pid, offset, 0) - KERNEL_U_ADDR;
  
***************
*** 409,412 ****
--- 418,422 ----
  	unsigned int reg_offset;
  
+         lseek(corechan, U_OFFSET, 0);
  	val = myread (corechan, &u, sizeof u);
  	if (val < 0)

hudak@dip.eecs.umich.edu (Dave Hudak) (03/17/90)

I have a few questions about the Encore Multimax:

What is the latest microprocessor used in the Multimax?  (The
last I know of is an NS32532.)  What's the clock rate?

What configurations do they come in - more specifically, what
is the largest number of processors they support?

What cache coherence scheme is used?  (If possible, be more 
specific than "snooping caches")

Has any significant improvements been made to the Nanobus?
(Last I heard, it had 80ns cycle time and was a split-transaction
bus...)

Where is a good place to read about technical announcements for
companies like Encore?   

Feel free to email me, and I'll post if there's sufficient interest.

--
David Hudak 				hudak@dip.eecs.umich.edu
The Advanced Computer Architecture Lab
The University Of Michigan
Ann Arbor, Mi