🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.gdb.bug
Article #10178

reacting to a bogus pc

#10178
From: Tim Moore
Date: Tue, 17 Apr 1990 17:06
32 lines
1972 bytes
Disclaimer: this applies to the port of gdb to mips machines; I
haven't verified this behavior on other machines.

If a process bombs because the pc is bogus (like a jump to a NULL
pointer), gdb may get a memory read error when it sets up its frame
chain. gdb completely gives up at this point and throws to top level.

I've noticed this in trying to look at a core file that resulted from
such a crash. The value of the pc (0x1) doesn't exist as an address in
the core file, so gdb gives up and doesn't seem to allow one to look
at the core file at all.

So I've got two questions:

1) Is there a way to force gdb to examine the core file anyway?

2) Is anyone doing any work on getting gdb to do something useful in
the presence of an invalid pc? There are several good ways to recover.
On mips (and other RISC machines) a register holds the return pointer
for subroutine calls; this usually holds a valid address and is a good
place to start (dbx on SGI Iris 4d machines does this). On other
machines, one might scan the machine stack for a value that looks like
a program address or at worst use the starting address of the program
as the pc.

I don't want to duplicate work, but if no one else is working on this
I may write the code myself.

Tim Moore                     moore@cs.utah.edu {bellcore,hplabs}!utah-cs!moore
"Ah, youth. Ah, statute of limitations."
		-John Waters
Technical Details
Message-ID: <1990Apr17.110648.1701@hellgate.utah.edu>
Path: arc1-ca.pugleaf.net!gmdzi!unido!mcsun!uunet!cs.utexas.edu!hellgate.utah.edu!cdr.utah.edu!moore

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f5053,798892d0f7600882,start
X-Google-Attributes: gidf5053,public
X-Google-ArrivalTime: 1990-04-17 18:16:08 PST
Path: arc1-ca.pugleaf.net!gmdzi!unido!mcsun!uunet!cs.utexas.edu!hellgate.utah.edu!cdr.utah.edu!moore
From: moore%cdr.utah.edu@cs.utah.edu (Tim Moore)
Newsgroups: gnu.gdb.bug
Subject: reacting to a bogus pc
Message-ID: <1990Apr17.110648.1701@hellgate.utah.edu>
Date: 17 Apr 90 17:06:48 GMT
Distribution: gnu
Organization: University of Utah CS Dept
Lines: 32
Posted: Tue Apr 17 18:06:48 1990