‘symbolicatecrash’ is the Developer Tools utility which replaces all those meaningless addresses from crash logs with actual symbol names and source code references. It lives at some obscure folder within /Developer – use find to dig it up and symlink it into /usr/local/bin if you wanna use it conveniently from the command line.
Anyway, after plenty of frustration, I noticed some chatter about the damn thing being busted in Xcode 4. Figures!
There’s an alternate third party version on GitHub, but this didn’t really help me – I still got inscrutable errors, so I took a look at the original.
The version that comes with Xcode 4 appears to have some problems distinguishing, say, an iPhone Simulator build of the app from a native build sitting in the Archives folder. I’d just see an error about otool and some binary living in the iPhone Simulator folder.
Digging into the errant symbolicatecrash source, I noticed that the code that finds the executable path tests each candidate using otool, but doesn’t seem to be able to comprehend the output from otool caused by running it on the wrong architecture.
So, replacing the rather unhelpful ‘die’ statement on line 323:
die "Can't understand the output from otool ($TEST_uuid -> '$otool -arch $arch -l $path')";
With a “No, it ain’t this executable” response:
return 0;
…solves the problem immediately. Now I can drag crash logs straight into the Organizer in Xcode, and it’ll symbolicate correctly.



Supporting WordPress shortcodes and captions in MarsEdit preview
I noticed that WordPress these days uses a shortcode to define image captions, of the form:
[caption id="" align="aligncenter" width="630" caption="Image title goes here"]<img src="http://domain.com/imgpath/../image.jpg" width="630" height="420" />[/caption]
I’ve recently redone our blog template at Technomadics, and while setting up the new preview template in MarsEdit, thought I’d take a stab at implementing support for captions, too, via some javascript in the template.
I was successful! Here’s how I did it:
Added the following to the “head” section:
…changed to ‘body’ tag to…
…And wrapped a div around the main “#body#, #extended#” content with an
idofcontent:Basically, it polls the content area for changes, and when triggered, runs it though a filter. The above is extensible, and by adding additional “
apply_shortcode” calls from “apply_filters“, more shortcodes can be simulated.