This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

View backtraces for core dumps generated under OS X 10.4.8 on intel macs


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]