Subject: Bus error of gdb 5.0 with MIPS patch

From: Jun Sun <[email-masked]>
Date: Sat, 29 Jul 2000 09:05:57 -0700

Hi,

I started to play with gdb 5.0 + the MIPS patch at
http://www.ds2.pg.gda.pl/~macro/gdb-5.0/, but I am having a bus error if
I want to do 'next step'.  Setting breakpoints and continuing running
seem to be fine.

The gdb 4.17 rpm from oss.sgi.com does not have this problem.

Any idea?

Jun

---------------

sh-2.03# ./gdb hello
GNU gdb 5.0 (UI_OUT)
Copyright 2000 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you
are
welcome to change it and/or distribute copies of it under certain
conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for
details.
This GDB was configured as "mipsel-hardhat-linux"...
(gdb) n
The program is not being run.
(gdb) b main
Breakpoint 1 at 0x400c24: file hello.c, line 5.
(gdb) r
Starting program: /tmp/hello 
[tcsetpgrp failed in terminal_inferior: Not a typewriter]
[tcsetpgrp failed in terminal_inferior: Not a typewriter]
[tcsetpgrp failed in terminal_inferior: Not a typewriter]

Breakpoint 1, main () at hello.c:5
5         printf("hello, world\n");
(gdb) n
[tcsetpgrp failed in terminal_inferior: Not a typewriter]
Bus error

-----------

P.S., Does anybody know how to fix "tcsetpgrp ..." error?

---

From: Ralf Baechle <[email-masked]>
Date: Sun, 30 Jul 2000 13:29:27 +0200

> The gdb 4.17 rpm from oss.sgi.com does not have this problem.

Possibly this was one of the cacheflush bugs I recently fixed.

> [tcsetpgrp failed in terminal_inferior: Not a typewriter]

No idea, never seen / heared about this problem.

  Ralf

---

From: "Maciej W. Rozycki" <[email-masked]>
Date: Mon, 31 Jul 2000 18:22:36 +0200 (MET DST)

> [tcsetpgrp failed in terminal_inferior: Not a typewriter]

 Hmm, I believe it indicates a problem with the shell.  I used to observe
it when my glibc disagreed with my kernel about struct stat64.  Try to
disable large file support for the shell until struct stat64 gets fixed. 

 About the bus error -- try to compile gdb with debugging support and make
it dump core on the bus error (you might need to tweak ulimit).  Then try
to locate the crash address with gdb (`info stack' might be particularly
useful).  It's most likely gdb cannot figure an address of the next
instruction properly.

 What version of libc?

-- 
+  Maciej W. Rozycki, Technical University of Gdansk, Poland   +
+--------------------------------------------------------------+
+        e-mail: [email-masked], PGP key available        +

---

From: Jun Sun <[email-masked]>
Date: Mon, 31 Jul 2000 10:17:18 -0700

> useful).  It's most likely gdb cannot figure an address of the next

It is glibc 2.0.7.  Pretty old, but I don't think there is a newer one
working stably with MIPS.

Jun

---

From: "Maciej W. Rozycki" <[email-masked]>
Date: Mon, 31 Jul 2000 19:42:16 +0200 (MET DST)

> working stably with MIPS.

 Well, I can't test that, I am afraid.  I am only using glibc 2.2 (which
is 2.1.91 at the moment).  It works quite well, but I wouldn't name it
stable yet, I admit.