Subject: GDB

From: Ulf Carlsson <[email-masked]>
Date: Mon, 22 Mar 1999 16:47:06 -0500

Hi,

I'm having some problems with gdb for mips. I can't examine core files since gdb
itself dumps core files when I try start gdb (gdb nsgsml core). Are there other
ways to check where a program crashes (except for printf()s)? It isn't possible
to run nsgsml in gdb either, or at least it doesn't provide the information I
want.

It's also tricky to debug where gdb fails because it just dumps another core
when I try to debug the core file gdb dumps :)

By the way, I have received a new Indy from SGI (that's why I'm back in action).
But the monitor was not working so I had to take the machine to the support
center in Sweden, which I did last Friday. They replaced the monitor so
everything works fine now. Thanks Nancy!

FYI I've fixed /dev/graphics now (thanks for making it a module at first place
Alex!). The code was really broken. I'll commit that stuff sometime when I don't
experience too much CVS problems.. (CVS is really bad from here..)

I've applied for being an X developer now as well (X was the real reason for
fixing /dev/graphics). Maybe I can remove the abscence of X servers if it's so
easy to port the IBM8514 driver as everyone says it is.

- Ulf

---

From: Thomas Bogendoerfer <[email-masked]>
Date: Tue, 23 Mar 1999 00:10:51 +0100

On Mon, Mar 22, 1999 at 04:47:06PM -0500, Ulf Carlsson wrote:
> I'm having some problems with gdb for mips. I can't examine core files 
> since gdb itself dumps core files when I try start gdb (gdb nsgsml core).
> Are there other ways to check where a program crashes (except for printf()s)?
> It isn't possible to run nsgsml in gdb either, or at least it doesn't 
> provide the information I want.

hmm, if memory serves right, I had reading core working at some point.
But I just tried it again and it fails like you described. I debugged
gdb some time ago and it's was a real nightmare. IMHO fixing gdb isn't
a short term task and I'm right now trying to plug all SCSI holes
(two bugs smashed, but still too much known bugs unfixed). And after 
the SCSI stuff I'll port the RedHat Rawhide installer, so I'm not 
available to fix gdb for some time.

For a short term solution edit arch/mips/mm/fault.c and look for the
second #if 0 (after the label bad_area) and change that to a #if 1.
This will give you a kernel message for every segfault, but it won't
help you for bus errors (but it's also possible to add printks there, too).

Thomas.

-- 
   This device has completely bogus header. Compaq scores again :-|
It's a host bridge, but it should be called ghost bridge instead ;^)
                                        [Martin `MJ' Mares on linux-kernel]