From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27921 invoked by alias); 4 Nov 2010 06:59:04 -0000 Received: (qmail 27897 invoked by uid 22791); 4 Nov 2010 06:59:04 -0000 X-SWARE-Spam-Status: No, hits=-2.5 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from localhost (HELO sourceware.org) (127.0.0.1) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 04 Nov 2010 06:59:01 +0000 From: "gdb at tmm1 dot net" To: gdb-prs@sourceware.org Subject: [Bug gdb/12192] New: attaching gdb to running mach-o process does not load shared libraries and debug symbols X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gdb X-Bugzilla-Component: gdb X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: gdb at tmm1 dot net X-Bugzilla-Status: NEW X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at sourceware dot org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Changed-Fields: Message-ID: X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated Content-Type: text/plain; charset="UTF-8" MIME-Version: 1.0 Date: Sun, 07 Nov 2010 11:07:00 -0000 Mailing-List: contact gdb-prs-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-prs-owner@sourceware.org X-SW-Source: 2010-q4/txt/msg00097.txt.bz2 http://sourceware.org/bugzilla/show_bug.cgi?id=12192 Summary: attaching gdb to running mach-o process does not load shared libraries and debug symbols Product: gdb Version: HEAD Status: NEW Severity: normal Priority: P2 Component: gdb AssignedTo: unassigned@sourceware.org ReportedBy: gdb@tmm1.net $ ../gdb/gdb -v GNU gdb (GDB) 7.2.50.20101104-cvs This GDB was configured as "x86_64-apple-darwin10". $ uname -a Darwin aman-guptas-imac.local 10.4.0 Darwin Kernel Version 10.4.0: Fri Apr 23 18:28:53 PDT 2010; root:xnu-1504.7.4~1/RELEASE_I386 i386 Build a simple test case: $ echo "int main() { while(42) sleep(1); }" > main.c $ gcc -o main main.c $ ./main & [1] 67119 $ export PID=$! Attach to running process (no debug info): $ ../gdb/gdb -ex "attach $PID" -ex "where" -ex "detach" -ex "quit" #0 0x00007fff85d18eb6 in ?? () #1 0x00007fff85d18d45 in ?? () #2 0x2c3e4603000c5877 in ?? () #3 0x00ffffffffffffff in ?? () Run the process inside gdb instead (works): $ ../gdb/gdb ./main -ex 'run' -ex 'where' -ex 'quit' #0 0x00007fff85d18eb6 in __semwait_signal () from /usr/lib/libSystem.B.dylib #1 0x00007fff85d18d45 in nanosleep () from /usr/lib/libSystem.B.dylib #2 0x00007fff85d65b14 in sleep () from /usr/lib/libSystem.B.dylib #3 0x0000000100000f2b in main () -- Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.