From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11844 invoked by alias); 2 Nov 2006 19:19:19 -0000 Received: (qmail 11833 invoked by uid 22791); 2 Nov 2006 19:19:18 -0000 X-Spam-Check-By: sourceware.org Received: from wr-out-0506.google.com (HELO wr-out-0506.google.com) (64.233.184.230) by sourceware.org (qpsmtpd/0.31) with ESMTP; Thu, 02 Nov 2006 19:18:56 +0000 Received: by wr-out-0506.google.com with SMTP id i11so42714wra for ; Thu, 02 Nov 2006 11:18:54 -0800 (PST) Received: by 10.78.185.16 with SMTP id i16mr1203823huf.1162495133813; Thu, 02 Nov 2006 11:18:53 -0800 (PST) Received: from ?192.168.1.151? ( [72.1.130.115]) by mx.google.com with ESMTP id 2sm2678305huc.2006.11.02.11.18.52; Thu, 02 Nov 2006 11:18:53 -0800 (PST) Mime-Version: 1.0 (Apple Message framework v752.3) Content-Transfer-Encoding: 7bit Message-Id: <03FD4AE3-7C29-4C01-A2EB-5C48292E5FE2@gmail.com> Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed To: gdb-patches@sources.redhat.com From: Paul Litvak Subject: View backtraces for core dumps generated under OS X 10.4.8 on intel macs Date: Thu, 02 Nov 2006 19:19:00 -0000 X-Mailer: Apple Mail (2.752.3) Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2006-11/txt/msg00014.txt.bz2 The bug: Can't view backtraces for core dumps generated under OS X 10.4.8 on intel macs. GDB reports "Core file contained no thread-specific data" after loading the core file. I can reproduce the bug with gdb in Xcode 2.4 and 2.4.1 The patch to Apple's gdb-563 sources: --- src/gdb/macosx/core-macho.c 2005-08-04 15:41:17.000000000 -0500 +++ /Users/plitvak/src/darwin/gdb/src/gdb/macosx/core-macho.c 2006-10-19 04:57:49.000000000 -0500 @@ -77,7 +77,7 @@ check_thread (bfd *abfd, asection *asect #if defined (TARGET_POWERPC) const char *expected = "LC_THREAD.PPC_THREAD_STATE."; #elif defined (TARGET_I386) - const char *expected = "LC_THREAD.i386_THREAD_STATE."; + const char *expected = "LC_THREAD.x86_THREAD_STATE."; #else #error "unsupported architecture" #endif @@ -280,7 +280,7 @@ core_fetch_section_registers (asection * #if defined (TARGET_POWERPC) ppc_macosx_fetch_gp_registers ((gdb_ppc_thread_state_t *) regs); #elif defined (TARGET_I386) - i386_macosx_fetch_gp_registers ((gdb_i386_thread_state_t *) regs); + i386_macosx_fetch_gp_registers ( (gdb_i386_thread_state_t*)& ((gdb_x86_thread_state_t *) regs)->uts.ts32 ); #else #error "unsupported architecture" #endif -- Paul Litvak