🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

1 total messages Started by Sam Lauber Thu, 09 Jun 2005 00:00
Bug in GDB for Darwin
#1280
Author: Sam Lauber
Date: Thu, 09 Jun 2005 00:00
49 lines
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
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads