We'll keep discussing this with gdb upstream and Go (and anyone else who
has this problem) until it's fixed in a nice general fashion. But our
ABI is likely to shift a bit before it's done. Until then, this patch is
an effective workaround.

Attached is a patch for Apple's version of gdb if you are developing on OS X.

-Graydon

Cheers,
Rafael
diff -ru gdb-1472/src/gdb/frame.c gdb-1472-patch/src/gdb/frame.c
--- gdb-1472/src/gdb/frame.c    2009-08-14 16:43:34.000000000 -0400
+++ gdb-1472-patch/src/gdb/frame.c      2010-12-31 15:03:21.000000000 -0500
@@ -1149,7 +1149,7 @@
      go backwards) and sentinel frames (the test is meaningless).  */
   /* APPLE LOCAL: Drop the "corrupt stack?" language -- this error is almost
      always an indication that gdb got confused and the stack is fine.  */
-  if (this_frame->next->level >= 0
+  if (0 && this_frame->next->level >= 0
       && this_frame->next->unwind->type != SIGTRAMP_FRAME
       && frame_id_inner (this_id, get_frame_id (this_frame->next))
       && backtrace_sanity_checks)
_______________________________________________
Rust-dev mailing list
[email protected]
https://mail.mozilla.org/listinfo/rust-dev

Reply via email to