From owner-freebsd-questions Tue Oct 3 19:48:57 1995 Return-Path: owner-questions Received: (from root@localhost) by freefall.freebsd.org (8.6.12/8.6.6) id TAA14555 for questions-outgoing; Tue, 3 Oct 1995 19:48:57 -0700 Received: from mail.telstra.com.au (mail.telstra.com.au [192.148.160.10]) by freefall.freebsd.org (8.6.12/8.6.6) with ESMTP id TAA14550 for ; Tue, 3 Oct 1995 19:48:52 -0700 Received: from mail_gw.fwall.telecom.com.au(192.148.147.10) by mail via smap (V1.3) id sma000132; Wed Oct 4 12:27:50 1995 Received: from cdn_mail.dn.itg.telecom.com.au(144.135.109.134) by mail_gw.telecom.com.au via smap (V1.3) id sma029378; Wed Oct 4 12:26:39 1995 Received: from rodin.cssc-syd.tansu.com.au (rodin.cssc-syd.tansu.com.au [149.135.252.15]) by cdn_mail.dn.itg.telecom.com.au (8.6.11/8.6.9) with ESMTP id MAA04737 for ; Wed, 4 Oct 1995 12:26:38 +1000 Received: from crab.cssc-syd.tansu.com.au (crab.ind.tansu.com.au [149.135.100.23]) by rodin.cssc-syd.tansu.com.au (8.6.11/8.6.9) with ESMTP id KAA15702 for ; Wed, 4 Oct 1995 10:43:08 +1000 Received: from kiwi.cssc-syd.tansu.com.au (raoul@kiwi.cssc-syd.tansu.com.au [149.135.104.48]) by crab.cssc-syd.tansu.com.au (8.6.9/8.6.9) with ESMTP id KAA09126; Wed, 4 Oct 1995 10:43:05 +1000 Received: (raoul@localhost) by kiwi.cssc-syd.tansu.com.au (8.6.9/8.6.9) id KAA19560; Wed, 4 Oct 1995 10:43:04 +1000 Message-Id: <199510040043.KAA19560@kiwi.cssc-syd.tansu.com.au> Subject: gdb problem? libraries, perhaps? To: freebsd-questions@freebsd.org Date: Wed, 4 Oct 1995 10:43:04 +1000 (EST) From: raoul@cssc-syd.tansu.com.au (Raoul Golan) X-Mailer: ELM [version 2.4 PL24] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Content-Length: 2244 Sender: owner-questions@freebsd.org Precedence: bulk G'day people, I have a strange problem with my 2.0.5 CD. I have the following simple program (mytest.c): main() { int a; a = a * 2; } I have the CD live filesystem (CD 2) mounted on /cdrom. I do the following: raoul@pogo[36]: /cdrom/usr/bin/gcc -g mytest.c raoul@pogo[36]: /cdrom/usr/bin/gdb a.out GDB is free software and you are welcome to 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. GDB 4.13 (i386-unknown-freebsd), Copyright 1994 Free Software Foundation, Inc... (gdb) run Starting program: /usr/home/raoul/test/a.out Error accessing memory address 0x6d7884: Invalid argument. (gdb) quit And this happens for whatever program I try to compile. It happens with my real gdb and gcc as well, I've just used the CDROM versions to demonstrate that they're identical. It happens regardless of whether I'm in X, or whether I'm on a text console, whether I've got a few processes running or loads of them (so chances are it's not a memory problem). It always gives the same message. I have an identical /usr/lib to that in /cdrom/usr/lib. I tried compiling with "-static" and when I run gdb, I type "run" and I get dropped into a subshell (!?!?!). I exit from this subshell, and I'm back in gdb, telling me that my program exited successfully (!?!?). I have the 2.0 compatibility libraries installed as well, and I tried compiling and debugging with the 2.0 versions of gcc and gdb. Same problem. I tried rebuilding gdb from the sources on the CD, but the problem was still there with the new binary. I then tried to rebuild gdb from standard distribution, but I couldn't get it to build for freebsd (it built for netbsd, but the gdb binary had problems with the format of the a.out binary). I've never had memory problems before on this machine, and memory tests (such as the 2.0 FreeBSD boot memory test) have never indicated any problems. I'm running a custom kernel, but I don't see obvious parameters being reset which would result in this problem. Is it likely to be a kernel problem? If so, what parameter/option should I be looking at? Any ideas? Many thanks, Raoul