On 10-08-14 05:15 AM, Peter Hull wrote:
Dear All,
Apologies if I've missed this information somewhere but, is it
possible to debug a compiled rust program? I'm using OS X 10.6
Generally, yes. No reason it won't work aside from bugs.
Specifically, often not. Too many bugs in the output just now. Most
times it won't work for one reason or another. It's a bit better on
linux, and win32 ... depends a lot on where you got your gdb build :)
Program received signal EXC_BAD_ACCESS, Could not access memory.
Reason: KERN_PROTECTION_FAILURE at address: 0x00000008
0x00081ac9 in glue$copy$g2$nonesomeP ()
That's something! It's stopped in a glue function: the one that copies
an option type.
and I can't get a backtrace.
Yeah. Um .. what's going on is we're emitting our own hand-generated
DWARF (debug info) and it's somehow not satisfactory to gdb. So for the
months before the publication I didn't really have access to enough gdb
people to figure out why (also apple's gdb is an ancient fork). But I'm
now in conversations with gdb people and they're informing me of
mistakes in the existing DWARF we're outputting. So I expect this will
get a bit better in the near future.
Eventually, of course, we want perfect, flawless debugging info. But
it'll be a slow climb to get there. I can't say much more than "stay
tuned". We know it's not very good right now, and we're stuck having to
use it as well, so it'll get better at some point! Probably a lot better
once LLVM's doing the lower-level encoding, though we may have a few
complications convincing it to say what we need to.
(This relates, actually, to the linkage post I made a while back. I'd
still welcome any opinions about exactly how close we ought to try to
get to the standard C linkage model. It's a subtle thing.)
the rate you guys are developing rust is amazing - it's hard to keep up!
*Blush* thanks, it often feels slow from my perspective, but perhaps
only because it's been going on for a long time and there's so much left
to do.
-Graydon
_______________________________________________
Rust-dev mailing list
[email protected]
https://mail.mozilla.org/listinfo/rust-dev