🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.gdb.bug
Article #99

More gdb 4.6 on Irix 4.0.

#99
From: Garrett Wollman
Date: Mon, 20 Jul 1992 15:41
44 lines
2153 bytes
I have found that the problem with `next'ing seems to be due to the
inability of gdb to deal with line numbers; in particular, it assigns
the whole PC range of main() to the first line.

If I ever get this working, I'm looking at adding follow-fork support
(that is, we catch PR_SYSEXIT for fork() and ask the user if the want
to continue debugging the old process, or attach to the new one),
unless someone has already done so.  Ideally this would be done as a
complete system-call tracing support...

Here is a simple bug in procfs.c:

--- procfs.c.orig	Mon Jul 20 11:00:49 1992
+++ procfs.c	Mon Jul 20 11:29:08 1992
@@ -2095,14 +2095,18 @@
   errno = 0;
   pi.prrun.pr_flags = PRSTRACE | PRSFAULT | PRCFAULT;
 
-#ifdef PRSVADDR_BROKEN
+#ifndef PRSVADDR_BROKEN
 /* Can't do this under Solaris running on a Sparc, as there seems to be no
    place to put nPC.  In fact, if you use this, nPC seems to be set to some
    random garbage.  We have to rely on the fact that PC and nPC have been
    written previously via PIOCSREG during a register flush. */
 
+/* This was #ifdef PRSVADDR_BROKEN, which didn't make any sense,
+ * since this code would use PRSVADDR iff it was `broken'... -GW
+ */
+
   pi.prrun.pr_vaddr = (caddr_t) *(int *) &registers[REGISTER_BYTE (PC_REGNUM)];
-  pi.prrun.pr_flags != PRSVADDR;
+  pi.prrun.pr_flags |= PRSVADDR;
 #endif
 
   if (signo && !(signo == SIGSTOP && pi.nopass_next_sigstop))


-GAWollman

-- 
   Garrett A. Wollman  = wollman@emba.uvm.edu = UVM is welcome to my opinions
                       =    uvm-gen!wollman   =
   That's what being alive is all about.  No deity, no higher goal
   exists, than to bring joy to another person.    - Elf Sternberg
Technical Details
Message-ID: <1992Jul20.154155.13961@uvm.edu>
Path: arc1-ca.pugleaf.net!sparky!uunet!cis.ohio-state.edu!uvm.edu!Garrett.Wollman

Show Full Headers
Complete Article Headers
Newsgroups: gnu.gdb.bug
Path: arc1-ca.pugleaf.net!sparky!uunet!cis.ohio-state.edu!uvm.edu!Garrett.Wollman
From: Garrett.Wollman@uvm.edu (Garrett Wollman)
Subject: More gdb 4.6 on Irix 4.0.
Message-ID: <1992Jul20.154155.13961@uvm.edu>
Sender: gnulists@ai.mit.edu
Organization: University of Vermont, EMBA Computer Facility
Distribution: gnu
Date: Mon, 20 Jul 1992 15:41:55 GMT
Approved: bug-gdb@prep.ai.mit.edu
Lines: 45