Article View: gnu.gdb.bug
Article #1280Bug in GDB for Darwin
From: Sam Lauber
Date: Thu, 09 Jun 2005 00:00
Date: Thu, 09 Jun 2005 00:00
49 lines
3220 bytes
3220 bytes
I was using GDB to debug an executable that used C library functions, but
wasn't linked agianst the C library. Knowing a fair bit about Darwin, I typed:
(gdb) set environment DYLD_INSERT_LIBRARIES -lSystem
(gdb) run
GDB printed
Starting program: /Users/sam/perl-5.9.2/gdbbug
dyld: could not load inserted library: -lSystem
/SourceCache/gdb/gdb-413/src/gdb/macosx/macosx-nat-inferior.c:1507:
internal-error: assertion failure in function "macosx_ptrace_him":
macosx_status->stopped_in_ptrace || macosx_status->stopped_in_softexc
A problem internal to GDB has been detected,
further debugging may prove unreliable.
I ran gdb with the normal `gdb executable' command. My system:
GDB version: GNU gdb 6.1-20040303 (Apple version gdb-413)
OS: Darwin
Kernel version: 8.1.0
Processor: PowerPC
Hardware: Apple iBook G4 (from label on physical system, though
`uname -m' says ``Power Macintosh'')
Mac OS X release: 10.4.1 (``Tiger'')
A sample executable that triggers this bug can be generated by:
gcc gdbbug.c -o gdbbug
ld gdbbug.o -o gdbbug -undefined suppress -flat_namespace
chmod 755 gdbbug
The source file `gdbbug.c' contains:
#include <stdio.h>
int foo = 1;
int doit(void) { printf("Hello World!\n"); return 0; }
Samuel Lauber
--
_______________________________________________
Surf the Web in a faster, safer and easier way:
Download Opera 8 at http://www.opera.com
Powered by Outblaze
Technical Details
Message-ID:
<mailman.4378.1118553188.25862.bug-gdb@gnu.org>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!news.glorb.com!logbridge.uoregon.edu!newsfeed.stanford.edu!shelby.stanford.edu!not-for-mailShow Full Headers
Complete Article Headers
X-Google-Thread: f5053,307336586f088213,start X-Google-Attributes: gidf5053,public X-Google-Language: ENGLISH,ASCII-7-bit Path: arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!news.glorb.com!logbridge.uoregon.edu!newsfeed.stanford.edu!shelby.stanford.edu!not-for-mail From: "Sam Lauber" <sam124@operamail.com> Newsgroups: gnu.gdb.bug Subject: Bug in GDB for Darwin Date: Thu, 09 Jun 2005 01:00:32 +0100 Lines: 51 Approved: bug-gdb@gnu.org Message-ID: <mailman.4378.1118553188.25862.bug-gdb@gnu.org> NNTP-Posting-Host: lists.gnu.org Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable X-Trace: news.Stanford.EDU 1118553186 28445 199.232.76.165 (12 Jun 2005 05:13:06 GMT) X-Complaints-To: news@news.stanford.edu To: bug-gdb@gnu.org Envelope-to: bug-gdb@gnu.org X-OB-Received: from unknown (205.158.62.133) by wfilter.us4.outblaze.com; 9 Jun 2005 00:00:35 -0000 Content-Disposition: inline X-Mailer: MIME::Lite 2.117 (F2.6; A1.17; B2.12; Q2.03) X-Mailer: operamail.com webmail X-Originating-Ip: 66.91.215.109 X-Originating-Server: ws5-3.us4.outblaze.com X-Mailman-Approved-At: Sun, 12 Jun 2005 01:13:05 -0400 X-BeenThere: bug-gdb@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Bug reports for GDB, the GNU debugger" <bug-gdb.gnu.org> List-Unsubscribe: <http://lists.gnu.org/mailman/listinfo/bug-gdb>, <mailto:bug-gdb-request@gnu.org?subject=unsubscribe> List-Archive: <http://lists.gnu.org/pipermail/bug-gdb> List-Post: <mailto:bug-gdb@gnu.org> List-Help: <mailto:bug-gdb-request@gnu.org?subject=help> List-Subscribe: <http://lists.gnu.org/mailman/listinfo/bug-gdb>, <mailto:bug-gdb-request@gnu.org?subject=subscribe>