Help using Breakpad on Mac in Qt

404 views
Skip to first unread message

Dave

unread,
Feb 14, 2011, 9:43:56 AM2/14/11
to google-breakpad-dev
Can anyone provide some help in using Breakpad on the Mac with Qt? I
have it working (including dump analysis) on Linux and Windows, but
can't seem to get it working on the Mac. I have compiled it into a
Framework per the instructions, and am creating a dump file by using:

ExceptionHandler eh(QDir::tempPath().toStdString(), NULL,
dumpCallback, NULL, true, NULL);

(I couldn't use the instructions on the Mac getting started page
because I am not using XCode / ObjC.) Is this valid? It seems to be,
because I am in fact getting a dump file in my temp directory upon
application crash. But I don't know what to do with this file! The Mac
getting started guide is silent about how to analyze this file, and I
cannot find a minidump_stackwalk application in the Mac tools area. If
I compile the minidump_stackwalk application in the Linux code area
(on the Mac), I can open the dump file (after extracting the symbols
using dumpsyms), but do not get any line numbers, so I'm not sure that
it is working. I even tried the instructions about running dsymutil
found in the following post, but it did not make any difference:

http://groups.google.com/group/google-breakpad-dev/browse_thread/thread/7b11fe79d38c6a85/9014048ac75cd1f5?lnk=gst&q=mac#9014048ac75cd1f5

If anyone could point me in the right direction, I would be most
grateful. Please have sympathy for someone developing on a platform
that just got thrown under the bus. (http://blog.qt.nokia.com/
2011/02/12/nokia-new-strategic-direction-what-is-the-future-for-qt/)

Ted Mielczarek

unread,
Feb 14, 2011, 12:18:51 PM2/14/11
to google-br...@googlegroups.com
On Mon, Feb 14, 2011 at 9:43 AM, Dave <dave_...@ntm.org> wrote:
> (I couldn't use the instructions on the Mac getting started page
> because I am not using XCode / ObjC.) Is this valid? It seems to be,

Yes, the underlying implementation doesn't require you to be using
Cocoa / ObjC, just the Breakpad framework is an ObjC API. You can use
the ExceptionHandler class directly without problems.

> because I am in fact getting a dump file in my temp directory upon
> application crash. But I don't know what to do with this file! The Mac
> getting started guide is silent about how to analyze this file, and I
> cannot find a minidump_stackwalk application in the Mac tools area. If
> I compile the minidump_stackwalk application in the Linux code area
> (on the Mac), I can open the dump file (after extracting the symbols
> using dumpsyms), but do not get any line numbers, so I'm not sure that
> it is working. I even tried the instructions about running dsymutil
> found in the following post, but it did not make any difference:

Ok, if you have a minidump file, then you're most of the way there!
minidump_stackwalk is not platform-specific (it is somewhat
POSIX-specific), it runs fine on OS X. In order to get function names
+ source line info, you do need symbol files produced by dump_syms.
You'll want to run dsymutil on each binary/dylib in your application,
and then run the dump_syms tool on each .dSYM file to produce a
Breakpad-formatted .sym file. The symbol files need to be placed into
a specific directory structure in order for minidump_stackwalk to use
them, you might find this section of the Linux starter guide that I
wrote useful:
http://code.google.com/p/google-breakpad/wiki/LinuxStarterGuide#Producing_symbols_for_your_application

-Ted

Reply all
Reply to author
Forward
0 new messages