🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.gdb.bug
Article #8903

Reading core files on Decstations

#8903
From: trq
Date: Fri, 17 Jul 1992 08:06
64 lines
2781 bytes
I sent this bug report in for gdb 4.4, and gdb 4.6 still has the
problem.  The patch at the end has been modified to work on gdb-4.6.

   Date: Thu, 20 Feb 92 10:14:04 GMT
   From: trq@dionysos.thphys.ox.ac.uk

   Gdb reports that it "Can't find registers in core file" when it reads
   a core file on a Decstation.  The following patch to xm-mips.h allows
   gdb to correctly read the registers out of a core file on a Decstation
   running ultrix.  This is for gdb version 4.4 configured using "config
   decstation" on a Decstation 5000 running Ultrix 4.2 .

   I do not know how this patch will affect other mips based machines.

   Tom Quinn        Theoretical Physics, University of Oxford
   Internet: 	 trq@dionysos.thphys.ox.ac.uk
   JANET:    	 trq@uk.ac.ox.astro
   Phone:		 44-865-273956
===================================================================
RCS file: RCS/xm-mips.h,v
retrieving revision 1.1
diff -c -r1.1 xm-mips.h
*** 1.1	1992/07/16 08:57:35
--- xm-mips.h	1992/07/16 08:59:55
***************
*** 27,33 ****
  
  #define	SET_STACK_LIMIT_HUGE
  
! #define KERNEL_U_ADDR 0 /* Not needed. */
  
  #ifdef ultrix
  extern char *strdup();
--- 27,33 ----
  
  #define	SET_STACK_LIMIT_HUGE
  
! #define KERNEL_U_ADDR (0xffffc000) /* Used for DECstations. */
  
  #ifdef ultrix
  extern char *strdup();
***************
*** 41,49 ****
  
  /* Only used for core files on DECstations. */
  
  #define REGISTER_U_ADDR(addr, blockend, regno) 		\
! 	if (regno < 38) addr = (NBPG*UPAGES) + (regno - 38)*sizeof(int);\
! 	else addr = 0; /* ..somewhere in the pcb */
  
  /* Override copies of {fetch,store}_inferior_registers in infptrace.c.  */
  #define FETCH_INFERIOR_REGISTERS
--- 41,51 ----
  
  /* Only used for core files on DECstations. */
  
+ /* N.B. first four registers at u.u_ar0 are saved arguments and there
+  * is no r0 */
  #define REGISTER_U_ADDR(addr, blockend, regno) 		\
! 	if (regno < 38) addr = blockend + (regno + 3)*sizeof(int);\
! 	else addr = ((regno - 38) + 47)*sizeof(int); /* ..somewhere in the pcb */
  
  /* Override copies of {fetch,store}_inferior_registers in infptrace.c.  */
  #define FETCH_INFERIOR_REGISTERS
Technical Details
Message-ID: <9207170806.AA08119@thphys.ox.ac.uk>
Path: arc1-ca.pugleaf.net!sparky!uunet!cis.ohio-state.edu!dionysos.thphys.ox.ac.uk!trq

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f5053,8d7d347076737669,start
X-Google-Attributes: gidf5053,public
X-Google-ArrivalTime: 1992-07-17 19:27:04 PST
Newsgroups: gnu.gdb.bug
Path: arc1-ca.pugleaf.net!sparky!uunet!cis.ohio-state.edu!dionysos.thphys.ox.ac.uk!trq
From: trq@dionysos.thphys.ox.ac.uk
Subject: Reading core files on Decstations
Message-ID: <9207170806.AA08119@thphys.ox.ac.uk>
Sender: gnulists@ai.mit.edu
Organization: GNUs Not Usenet
Distribution: gnu
Date: Fri, 17 Jul 1992 08:06:10 GMT
Approved: bug-gdb@prep.ai.mit.edu
Lines: 65