🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.gdb.bug
Article #10214

fix for gdb3.5 and hp-ux 7.0

#10214
From: Glenn Engel
Date: Wed, 14 Feb 1990 22:59
67 lines
2345 bytes
The following patch fixes the problem in hp-ux 7.0 where gdb is unable
to read the register values correctly.  This fix works for both 6.x and 7.x
versions of hp-ux.  It may also work for version 5 but I cannot test it.

*** m-hp9k320.h.orig	Tue Feb 13 11:06:45 1990
--- m-hp9k320.h	Wed Feb 14 12:14:04 1990
***************
*** 90,97
  
  #ifdef HPUX_VERSION_5
  #define KERNEL_U_ADDR 0x00979000
- #else
- #define KERNEL_U_ADDR 0x00C01000
  #endif
  
  /* Address of end of stack space.  */

--- 90,95 -----
  
  #ifdef HPUX_VERSION_5
  #define KERNEL_U_ADDR 0x00979000
  #endif
  
  /* Address of end of stack space.  */
*** hp9k320-dep.c.orig	Tue Feb 13 11:06:53 1990
--- hp9k320-dep.c	Wed Feb 14 12:19:38 1990
***************
*** 127,132
      }
  }
  
  #define INFERIOR_AR0(u)							\
    ((ptrace								\
      (PT_RUAREA, inferior_pid, ((char *) &u.u_ar0 - (char *) &u), 0))	\

--- 127,157 -----
      }
  }
  
+ 
+ struct hpnlist {      
+         char *          n_name;
+         long            n_value;  
+         unsigned char   n_type;   
+         unsigned char   n_length;  
+         short           n_almod;   
+         short           n_unused;
+ };
+ static struct hpnlist nl[] = {{ "_u", -1, }, { (char *) 0, }};
+ 
+ /* read the value of the u area from the hp-ux kernel */
+ int kernel_u_addr()
+ {
+     struct user u;
+     if (nl[0].n_value == -1) {
+ 	nlist ("/hp-ux",&nl);
+     }
+     return nl[0].n_value;
+ }
+ 
+ #ifndef KERNEL_U_ADDR
+ #define KERNEL_U_ADDR kernel_u_addr()
+ #endif
+ 
  #define INFERIOR_AR0(u)							\
    ((ptrace								\
      (PT_RUAREA, inferior_pid, ((char *) &u.u_ar0 - (char *) &u), 0))	\
Technical Details
Message-ID: <9002142259.AA21882@labgre.HP.COM>
Path: arc1-ca.pugleaf.net!gmdzi!unido!mcsun!uunet!munnari.oz.au!uokmax!apple!usc!zaphod.mps.ohio-state.edu!tut.cis.ohio-state.edu!HPLSLA.HP.COM!glenne

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f5053,6ced3ec9923a85bf,start
X-Google-Attributes: gidf5053,public
X-Google-ArrivalTime: 1990-02-15 12:17:51 PST
Path: arc1-ca.pugleaf.net!gmdzi!unido!mcsun!uunet!munnari.oz.au!uokmax!apple!usc!zaphod.mps.ohio-state.edu!tut.cis.ohio-state.edu!HPLSLA.HP.COM!glenne
From: glenne@HPLSLA.HP.COM (Glenn Engel)
Newsgroups: gnu.gdb.bug
Subject: fix for gdb3.5 and hp-ux 7.0
Message-ID: <9002142259.AA21882@labgre.HP.COM>
Date: 14 Feb 90 22:59:34 GMT
Sender: daemon@tut.cis.ohio-state.edu
Distribution: gnu
Organization: GNUs Not Usenet
Lines: 67
Posted: Wed Feb 14 23:59:34 1990