BreakpadRef breakpad = NULL;
void StartupCrashHandler(){
if(breakpad != NULL)return;NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];NSDictionary *plist = [[NSBundle mainBundle] infoDictionary];if(plist != NULL)breakpad = BreakpadCreate(plist);[pool release];}How does one do this with Crashpad? I can't find any documentation?
I apologize if I'm asking these questions on the wrong list. If there is crashpad-users type list where I should post such questions please let me know.
--
You received this message because you are subscribed to the Google Groups "Crashpad-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to crashpad-dev...@chromium.org.
To post to this group, send email to crashp...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/crashpad-dev/6d85f8b4-dd00-4d78-9c8c-7ded12f5dca8%40chromium.org.
Undefined symbols for architecture x86_64:
"_audit_token_to_pid", referenced from:
crashpad::AuditPIDFromMachMessageTrailer(mach_msg_trailer_t const*) in libcrashpad_util.a(crashpad_util.mach_message.o)
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++ -lc++ -Wl,-syslibroot,/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk -stdlib=libc++ -mmacosx-version-min=10.7 -Wl
Undefined symbols for architecture x86_64:
"_audit_token_to_pid", referenced from:
crashpad::AuditPIDFromMachMessageTrailer(mach_msg_trailer_t const*) in libcrashpad_util.a(crashpad_util.mach_message.o)
Another question I had is the various out directories. What are the Release_x64 and Debug_x64 directories for? I compiled all four and using lipo determined that all four were 64 bit.
crashpad_client.StartHandler
now but I'm getting the following linker error:Undefined symbols for architecture x86_64:
"crashpad::CrashpadClient::StartHandler(base::FilePath const&, base::FilePath const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::map<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::less<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > >, std::__1::allocator<std::__1::pair<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > > > const&, std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > > const&)", referenced from:
StartupCrashHandler() in crashHandler.o
ld: symbol(s) not found for architecture x86_64
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++
-headerpad_max_install_names
-lc++ -Wl,-syslibroot,/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk
-mmacosx-version-min=10.7
-Wl,-rpath
... lots of my .o files ...
-L/path/to/crashpad/crashpad/out/Release/ -lcrashpad_client
-lcrashpad_compat -lcrashpad_minidump -lcrashpad_snapshot
-lcrashpad_tool_support -lcrashpad_util -lgmock -lgmock_main -lbase
-lbsm
You'll notice I'm specifying the various crashpad .a files *after* I specify my .o files in order to pull in required symbols after they are used by my crashHandler.o. You'll also notice I tried pulling in every .a file I could imagine without any benifit. My impression is that I should only require
-lcrashpad_client
-lcrashpad_util
-lbase
QMAKE_CXXFLAGS += -std=c++11
QMAKE_CXXFLAGS += -stdlib=libc++
QMAKE_OBJECTIVE_CFLAGS += -std=c++11
QMAKE_OBJECTIVE_CFLAGS += -stdlib=libc++
QMAKE_LFLAGS += -lc++
Thanks again for the replies. I feel like I"m inching closer to getting this all working. I've hit another snag and I was hoping one of you might see where I'm going wrong. I'm actually trying to callcrashpad_client.StartHandlernow but I'm getting the following linker error:
Undefined symbols for architecture x86_64:
"crashpad::CrashpadClient::StartHandler(base::FilePath const&, base::FilePath const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::map<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::less<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > >, std::__1::allocator<std::__1::pair<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > > > const&, std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > > const&)", referenced from:
StartupCrashHandler() in crashHandler.o
ld: symbol(s) not found for architecture x86_64
This is very strange. If I comment out that call and still declare the crashpad_client variable I'll get a linker error only if I omit linking to the .a files. For reference this is the relevant portion of my linking line:
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++
-headerpad_max_install_names
-lc++ -Wl,-syslibroot,/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk
-mmacosx-version-min=10.7
-Wl,-rpath
... lots of my .o files ...
-L/path/to/crashpad/crashpad/out/Release/ -lcrashpad_client
-lcrashpad_compat -lcrashpad_minidump -lcrashpad_snapshot
-lcrashpad_tool_support -lcrashpad_util -lgmock -lgmock_main -lbase
-lbsm
You'll notice I'm specifying the various crashpad .a files *after* I specify my .o files in order to pull in required symbols after they are used by my crashHandler.o. You'll also notice I tried pulling in every .a file I could imagine without any benifit. My impression is that I should only require
-lcrashpad_client
-lcrashpad_util
-lbase
I specifically listed those in that order so that symbols from base used by client would be pulled when linking in base.
Any ideas? For reference I upgrade my Qt project to add C++11 support like so:QMAKE_CXXFLAGS += -std=c++11QMAKE_CXXFLAGS += -stdlib=libc++QMAKE_OBJECTIVE_CFLAGS += -std=c++11QMAKE_OBJECTIVE_CFLAGS += -stdlib=libc++QMAKE_LFLAGS += -lc++
QString product = convertNSStringToQString( [plist valueForKey:@"CFBundleName"] );
QString version = convertNSStringToQString( [plist valueForKey:@"CFBundleVersion"] );
QString url = convertNSStringToQString( [plist valueForKey:@"BreakpadURL"] );
QString database = convertNSStringToQString( [plist valueForKey:@"BreakpadMinidumpLocation"] );
std::map<std::string, std::string> annotations;annotations["prod"] = product.toStdString();annotations["ver"] = version.toStdString();annotations["plat"] = std::string("OS X");if (crashpad_client.StartHandler(base::FilePath(handler.toStdString()),base::FilePath(database.toStdString()),url.toStdString(),annotations,std::vector<std::string>())){crashpad_client.UseHandler();}I'm not sure if I need to include the "plat" annotation, or if I should include any other annotations that I am not currently. RIght now I'm just studying that Chromium code you linked to. When I threw in some print statements I can see StartHandler is returning true and I end up calling UseHandler. In standard output I'm seeing the following printed out:
product= "SnapGene"
version= "2.8.0a"
url= "http://www.snapgene.com/reportCrash.php"
database= "~/Library/Caches/SnapGene/Crash Reports/"
[55643:588685:20150318,220221.487709:ERROR crash_report_database_mac.mm:86] mkdir: No such file or directory (2)
My impression from reading the header files is that if no database exists it will be created. How you tell the database to uploader dumps it beyond me. The ERROR being printed out above worries me. I went out my way to actually create that directory and the error went away. Perhaps Breakpad was more flexible and could create the database directory if it was not present. Anyhow, I can easily do that and now do.
When I went ahead and crashed my application it just up and quit. I saw no crash report dialog, neither one from Apple or the old one provided by Breakpad's framework. I suspect with Crashpad I'll have to roll my own reporting dialog somehow like I did on Windows. Is that correct? If you could point me in the direction to how I begin to tell crashpad what dialog to pop up that would be great.
For reference when I triggered the crash this is what I see dumped to the console:
55885:609153:20150318,222526.406966:WARNING mach_o_image_segment_reader.cc:118] section.segname incorrect in segment __TEXT, section __LD,__compact_unwind 2/5, load command 0x19 0/6, module cl_kernels, address 0x109c95000
[55885:609153:20150318,222526.407577:WARNING mach_o_image_segment_reader.cc:118] section.segname incorrect in segment __TEXT, section __LD,__compact_unwind 3/6, load command 0x19 0/6, module cl_kernels, address 0x109df2000
[55885:609153:20150318,222526.408499:WARNING mach_o_image_segment_reader.cc:118] section.segname incorrect in segment __TEXT, section __LD,__compact_unwind 2/5, load command 0x19 0/6, module cl_kernels, address 0x115cac000
[55885:609153:20150318,222526.408553:WARNING mach_o_image_segment_reader.cc:118] section.segname incorrect in segment __TEXT, section __LD,__compact_unwind 3/6, load command 0x19 0/6, module cl_kernels, address 0x115cb0000
Presumably once I hook up some other aspect of Crashpad such messages will no longer be dumped to the console although I'm not sure.
Another question I have now that I have code up and running is that in the past I made use of BreakpadAddUploadParameter to add a slew of additional params to be sent along side crash reports. For example beta testers of our software are required to give us their email and I can automatically attach it to crash reports in case they don't bother to enter it in the crash reporting dialog Breakpad would provide in the past. Since I don't necessarily have access to that information when I startup Crashpad (as early as possible during application startup), and honestly this seems less like a process-level annotation and more like a module-level annotation, I'm curious how I set module-level annotations that are referred to in your recent commit to handler/mac/crashpad_handler.ad
https://codereview.chromium.org/1009743004/diff/1/handler/mac/crashpad_handler.ad
Thanks again for all of your help. Once I get all this working I would be more than happy to provide a summary of what I did to get things all working.
OK that was all *extremely* helpful. I compiled Crashpad for 10.7+ which resulted in it using the traditional libstdc++. I verified the symbol in question was in both the .a and .o files. It is the latter variant you posted. When I fixed my project to use libstd++ instead of the newer libc++ and removed the -lc++ linker flag things finally started to work. I'm successfully calling StartHandler and if I give it a valid path to the helper instead of seeing a goofy crash (and my application still launching) I now see a slightly different message on the console complaining that I'm not providing a database (I passed an empty string for that param). What should I be passing in for this database parameter?
I never passed anything like that to Breakpad in the past. For reference these are the settings Breakpad was getting in the past from my Info.plist file:<key>BreakpadReportInterval</key><string>0</string><key>BreakpadVendor</key><string>GSL Biotech</string><key>BreakpadRequestComments</key><string>YES</string><key>BreakpadRequestEmail</key><string>YES</string><key>BreakpadConfirmTimeout</key><string>NO</string><key>BreakpadMinidumpLocation</key><string>~/Library/Caches/SnapGene/Crash Reports/</string><key>BreakpadURL</key><string>http://www.snapgene.com/reportCrash.php</string><key>BreakpadPrivacyPolicyURL</key><string>http://www.snapgene.com/privacy.html</string>
I suppose many of these could go into "annotations". In the past I did not set BreapadProduct or BreakpadVersion since if these were not set Breakpad would fetch the values using CFBundleName and CFBundleVersion. It appears the new Crashpad code is more platform agnostic in that it never deals with an Info.plist file. It's up to me to pull those values out and push them into an annotations object. I suppose there is no reason any of those settings technically need to be in an Info.plist file now, they could all be hard coded if I really wanted to in my own code.
Anyhow, I fetched CFBundleName, CFBundleVersion, BreakpadURL, and BreakpadMinidumpLocation from my Info.plist and tried starting it up as follows:QString product = convertNSStringToQString( [plist valueForKey:@"CFBundleName"] );QString version = convertNSStringToQString( [plist valueForKey:@"CFBundleVersion"] );QString url = convertNSStringToQString( [plist valueForKey:@"BreakpadURL"] );QString database = convertNSStringToQString( [plist valueForKey:@"BreakpadMinidumpLocation"] );std::map<std::string, std::string> annotations;annotations["prod"] = product.toStdString();annotations["ver"] = version.toStdString();annotations["plat"] = std::string("OS X");if (crashpad_client.StartHandler(base::FilePath(handler.toStdString()),base::FilePath(database.toStdString()),url.toStdString(),annotations,std::vector<std::string>())){crashpad_client.UseHandler();}
I'm not sure if I need to include the "plat" annotation, or if I should include any other annotations that I am not currently.
RIght now I'm just studying that Chromium code you linked to. When I threw in some print statements I can see StartHandler is returning true and I end up calling UseHandler. In standard output I'm seeing the following printed out:product= "SnapGene"
version= "2.8.0a"
url= "http://www.snapgene.com/reportCrash.php"
database= "~/Library/Caches/SnapGene/Crash Reports/"
[55643:588685:20150318,220221.487709:ERROR crash_report_database_mac.mm:86] mkdir: No such file or directory (2)
My impression from reading the header files is that if no database exists it will be created. How you tell the database to uploader dumps it beyond me. The ERROR being printed out above worries me. I went out my way to actually create that directory and the error went away. Perhaps Breakpad was more flexible and could create the database directory if it was not present. Anyhow, I can easily do that and now do.
When I went ahead and crashed my application it just up and quit. I saw no crash report dialog, neither one from Apple or the old one provided by Breakpad's framework. I suspect with Crashpad I'll have to roll my own reporting dialog somehow like I did on Windows. Is that correct? If you could point me in the direction to how I begin to tell crashpad what dialog to pop up that would be great.
For reference when I triggered the crash this is what I see dumped to the console:
55885:609153:20150318,222526.406966:WARNING mach_o_image_segment_reader.cc:118] section.segname incorrect in segment __TEXT, section __LD,__compact_unwind 2/5, load command 0x19 0/6, module cl_kernels, address 0x109c95000
[55885:609153:20150318,222526.407577:WARNING mach_o_image_segment_reader.cc:118] section.segname incorrect in segment __TEXT, section __LD,__compact_unwind 3/6, load command 0x19 0/6, module cl_kernels, address 0x109df2000
[55885:609153:20150318,222526.408499:WARNING mach_o_image_segment_reader.cc:118] section.segname incorrect in segment __TEXT, section __LD,__compact_unwind 2/5, load command 0x19 0/6, module cl_kernels, address 0x115cac000
[55885:609153:20150318,222526.408553:WARNING mach_o_image_segment_reader.cc:118] section.segname incorrect in segment __TEXT, section __LD,__compact_unwind 3/6, load command 0x19 0/6, module cl_kernels, address 0x115cb0000
Presumably once I hook up some other aspect of Crashpad such messages will no longer be dumped to the console although I'm not sure.
Another question I have now that I have code up and running is that in the past I made use of BreakpadAddUploadParameter to add a slew of additional params to be sent along side crash reports. For example beta testers of our software are required to give us their email and I can automatically attach it to crash reports in case they don't bother to enter it in the crash reporting dialog Breakpad would provide in the past. Since I don't necessarily have access to that information when I startup Crashpad (as early as possible during application startup), and honestly this seems less like a process-level annotation and more like a module-level annotation, I'm curious how I set module-level annotations that are referred to in your recent commit to handler/mac/crashpad_handler.ad
https://codereview.chromium.org/1009743004/diff/1/handler/mac/crashpad_handler.ad
Thanks again for all of your help. Once I get all this working I would be more than happy to provide a summary of what I did to get things all working.
-I'm now using CRASHPAD_SIMULATE_CRASH in my application to test the handler without actually crashing. I actually have a cascading crash menu for testing triggering and catching various ways in which to crash the application. I noticed CRASHPAD_SIMULATE_CRASH is defined in client/simulate_crash_mac.h. Is it correct to assume this macro will be provided on Windows in the future as well? I'm aware that the Windows port is ongoing. I've updated and seen the Release_64 and Debug_64 directories are now gone which is great.
-Is it kosher to delete the database directory on a regular bases? I'm concerned that the completed set of crash reports will balloon over time. I suspect I don't technically need my database settings to survive sessions. At the moment jst before starting up the crash handler I'm deleting the contents of the new, pending and completed directories. Perhaps through the API there could/should be a way to clear the database?
-If I create a crashpad::SimpleStringDictionary* annotations and then call
crashpad_info->set_simple_annotationswill crashpad take care of deallocating that for me? It's probably not a big deal to leak that memory when the application eithercrashes or quits normally since the OS should in theory reclaim the memory anyhow but I figured I would ask.
-How do I shut down the handler when my application is quitting, or is that even necessary any more? In the past I calledBreakpadRelease(breakpad);
-Currently I'm calling crashpad_info->set_simple_annotations *after* I call StartHandler and UseHandler. This seems to work fine. Is that when you would suggest calling that function? I do add annotations later using the technique you suggested.
rsesek / @chromium.org
OK, now I'm definitely getting close. I followed your suggestions and have successfully started sending crash reports to my server and generated emails with summaries of the crashes. I've successfully attached other information (e.g. beta tester email addresses). That said there are a few issues that remain:
-I'm seeing the following warnings at compile time. Perhaps these can be fixed in the future.
crashpad/third_party/mini_chromium/mini_chromium/base/memory/scoped_ptr.h:102: warning: unused parameter 'other' [-Wunused-parameter]
template <typename U> DefaultDeleter(const DefaultDeleter<U>& other) {
crashpad/third_party/mini_chromium/mini_chromium/base/logging.h:39: warning: unused parameter 'file' [-Wunused-parameter]
static inline int GetVlogLevel(const char* file) {
-If I create a crashpad::SimpleStringDictionary* annotations and then call
crashpad_info->set_simple_annotationswill crashpad take care of deallocating that for me? It's probably not a big deal to leak that memory when the application eithercrashes or quits normally since the OS should in theory reclaim the memory anyhow but I figured I would ask.
-How do I shut down the handler when my application is quitting, or is that even necessary any more? In the past I calledBreakpadRelease(breakpad);
-Currently I'm calling crashpad_info->set_simple_annotations *after* I call StartHandler and UseHandler. This seems to work fine. Is that when you would suggest calling that function? I do add annotations later using the technique you suggested.
-I still need to throw together a UI to give the user a chance to write a description of what they were doing, provide their email address in case I don't have it, and some day it would be great if they could attach a file or files to the crash report (e.g. if one of our file importers is choking on a non-native file format we support opening). The Breakpad framework provided that out of the box. On Windows I accomplished this by specifying a minidump callback function when allocating the ExceptionHandler. Are you suggesting that adopters of Crashpad are suggested to compile their own version of crashpad_handler to provide this UI? I wonder if this could be simplified, or at least if an example of that could be included in the future example program.
-I'm seeing the following warnings at compile time. Perhaps these can be fixed in the future.
crashpad/third_party/mini_chromium/mini_chromium/base/memory/scoped_ptr.h:102: warning: unused parameter 'other' [-Wunused-parameter]
template <typename U> DefaultDeleter(const DefaultDeleter<U>& other) {
crashpad/third_party/mini_chromium/mini_chromium/base/logging.h:39: warning: unused parameter 'file' [-Wunused-parameter]
static inline int GetVlogLevel(const char* file) {We don’t consider -Wunused-parameter a valuable warning and build our own code with it disabled, by using -Wno-unused-parameter. However, if this is the only instance of that warning that you’re seeing as a result of #including our files, I’d be willing to fix it for you.
The simple annotations need to be accessible as long as they’re pointed to by CrashpadInfo. It is correct to not delete it. You wouldn’t want to delete it anyway, because then it would be garbage if a crash happened after it was deleted. Sure, you could set_simple_annotations(nullptr), but then you’ve lost any annotations if the crash happens after it was cleared out.All of the memory that belongs to a process gets cleaned up when the process exits. This is practice, not theory. :)
-How do I shut down the handler when my application is quitting, or is that even necessary any more? In the past I calledBreakpadRelease(breakpad);There is intentionally no API to do this. As with the annotations, you want the handler around to catch crashes that could happen even as the application is exiting.The handler will exit on its own once it doesn’t have any processes to monitor for crashes.
-Currently I'm calling crashpad_info->set_simple_annotations *after* I call StartHandler and UseHandler. This seems to work fine. Is that when you would suggest calling that function? I do add annotations later using the technique you suggested.I prefer to UseHandler() as early as possible, and then set_simple_annotations() after. If something’s wrong with set_simple_annotations() or anything that you need to do to get the annotation values, I’d prefer to get a crash report about it, even with an incomplete set of annotations. The best strategy is to get the handler set up as early as possible, ideally in main() or even before main().
Those are mangled (“decorated”) symbol names. You can convert them to human-readable names with c++filt. You can pipe the minidump_stackwalk output through c++filt, or pipe the dump_syms output through c++filt.That said, I don’t know why this would have changed for you, if you were using the same dump_syms and same minidump_stackwalk as before. Crashpad has no influence over whether your processing machinery shows mangled or unmangled names. In a typical Breakpad pipeline, dump_syms calls abi::__cxa_demangle() and outputs demangled names all on its own.
45 SnapGene!BaseApplication::notify(QObject*, QEvent*) [baseApplication.cpp : 201 + 0x16]
where as now I"m seeing stuff like this:
2 SnapGene!__ZN9DebugMenu18qt_static_metacallEP7QObjectN11QMetaObject4CallEiPPv + 0x44e
-I still need to throw together a UI to give the user a chance to write a description of what they were doing, provide their email address in case I don't have it, and some day it would be great if they could attach a file or files to the crash report (e.g. if one of our file importers is choking on a non-native file format we support opening). The Breakpad framework provided that out of the box. On Windows I accomplished this by specifying a minidump callback function when allocating the ExceptionHandler. Are you suggesting that adopters of Crashpad are suggested to compile their own version of crashpad_handler to provide this UI? I wonder if this could be simplified, or at least if an example of that could be included in the future example program.We don’t provide UI in Crashpad as-is because we prefer reporting to be silent and automatic when enabled. I realize that not all developers will be motivated by the same constraints that informed our decision.That the Mac Breakpad framework even offered UI at all was kind of a goof. It was never in the design for that software.
With Crashpad’s design, once a program has crashed, there’s no longer any chance to run any code in it. The only thing that you can do is run code in the handler. This is really much more reliable, because there aren’t any guarantees about the state of a crashed process, and so there’s no assurance that it’s healthy enough to do complex tasks like run UI.
That leaves the handler as the only place to do UI. If you need this, I do suggest a custom crashpad_handler. Right now, the easiest way to do this would be to make local modifications to crashpad/handler/mac in the areas I’ve identified, but this will become easier with time: a lot of the logic in crashpad_handler will be moving out of the handler and into library functions. At that point, it’ll be much easier to roll your own handler. Until then, the least invasive way about it would be to take control in crashpad_handler right before it tries to write the minidump, and show some UI that might result in more annotations being added or might result in not writing or uploading the report at all.
You might also be happy to know that I took a look at the errors you mentioned seeing for cl_kernels, and have a fix for Crashpad out for review to suppress those.
Thanks for all of the early feedback, it’s really helping us appreciate how this all looks from an outsider’s perspective, and what we need to focus on in our documentation and samples.
Those are the only two warnings I'm getting. If you could fix that that would be great. I personally like that warning since it alerts me to places in my code where I no longer need to be passing in such information and could avoid stack overhead. It happens as a project evolves over time.
Interesting. I recently upgraded my build environment from 10.6 to 10.10 and stopped supporting 10.6. In order to support debuggin with the modern XCode and Instruments I switched from passing the compiler -gstabs to -g. I wonder if this may have caused the problem. All the same c++filt appears to do a great job. The one gotcha is that I used to get nice filenames and line numbers at the end and now I'm missing those. All I see now at he end is the funny offset or soemthing values, e.g. + 0x10 which mean nothing to me. E.g. in the past I might see:45 SnapGene!BaseApplication::notify(QObject*, QEvent*) [baseApplication.cpp : 201 + 0x16]where as now I"m seeing stuff like this:2 SnapGene!__ZN9DebugMenu18qt_static_metacallEP7QObjectN11QMetaObject4CallEiPPv + 0x44e
Which when I give the content beginning with the second _ all the way to the space to c++lint gives me back:c++filt -n _ZN9DebugMenu18qt_static_metacallEP7QObjectN11QMetaObject4CallEiPPv->DebugMenu::qt_static_metacall(QObject*, QMetaObject::Call, int, void**)So I have to be smart enough to pop off the "SnapGene!" as well as the first of the _'s, and any content after the first space, before passing it off to c++lint. Why I'm losing my filenames and line numbers of beyond me. I just verified I'm seeing a similar issue for my existing back builds that are still using Breakpad but were built with 10.10 so the issue is not Crashpad. Do you recommend any changes to my compiler flags in order to preserve the filenames and line numbers? I suspect by switching from STABS to DWARF for release builds I may have lost encoding the filename / line number information entirely.
Interesting. Moving a much logical out of the handler into library code sounds great. Once that is done I wonder if the handler itself will be so trivial that it could be easily reproduced in a new program and then that program would just link to the .a files. That said, I'm not entirely sure how this will all work. I don't consider myself a Cocoa expert at all. I'm used to developing within the confines of Qt so that as much of our application is cross platform by default. With Breakpad you could set a callback function that would be run when the application crashed. This worked really well for me. I wrote a small Qt app that showed a dialog that apologized for the crash and let you enter a comment, your email, etc. I would run this reporter application from my call back function and pass it the filename of the mini dump that should be submitted. I wonder if a similar setup could be supported in crashpad on both Mac and Windows. If so then my custom GUI for reporting a crash, which based on Qt is already cross platform, could be used for both Mac and Windows and my crash handling experience would be identical on both OS's at long last. ;-)
Not a problem. My hope is to adopt Crashpad on Windows as well once it is ready so I would be happy to provide feedback there as well when the time is right. Thank you all for being so responsive and helpful as I embark on this migration.
Thank you, this fixed the problem. dsymutil took a long time and produced a > 600 MB directory, but in the end it all worked out and the breakpad symbol file is only about 22 MB. That said, I noticed a TON of warnings being dumped out while running dump_syms now, e.g.:
/path/to/SnapGene.dSYM/Contents/Resources/DWARF/SnapGene: warning: function at offset 0xba61ca0 has no name/path/to/SnapGene.dSYM/Contents/Resources/DWARF/SnapGene: in compilation unit '../src/_viewers/sequenceViewer/sequenceView/sequenceViewLine/sequenceViewElementSet.cpp' (offset 0xba913b7):As far as I can tell things all work out just fine. I suspect this is because I'm linking against Qt w/o debugging symbols. I'm fine with that. If that is indeed the issue, is there any way to quiet these warnings somehow?
That's all very interesting. I look forward to watching your progress on things. I'll look into how to implement my UI based on your prior message as well. At the very least I now have a working headless crash reporter on Yosemite. :-)
There aren’t really any plans to silence them in dump_syms, but the good news is that the plan for Crashpad’s eventual processing pipeline is to not require the use of dump_syms or a dump_syms-like tool on most platforms.
There aren’t really any plans to silence them in dump_syms, but the good news is that the plan for Crashpad’s eventual processing pipeline is to not require the use of dump_syms or a dump_syms-like tool on most platforms.Whoa, but dump_syms allows you to reduce a giant .dSYM and non-stripped binary into a much smaller stripped binary and tiny breakpad symbol file in comparison. What is the alternative you guys are envisioning?
--
You received this message because you are subscribed to a topic in the Google Groups "Crashpad-dev" group.
To unsubscribe from this topic, visit https://groups.google.com/a/chromium.org/d/topic/crashpad-dev/NaB7PrfW04g/unsubscribe.
To unsubscribe from this group and all its topics, send an email to crashpad-dev...@chromium.org.
To post to this group, send email to crashp...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/crashpad-dev/CAHk1GDwz5txTxhmyw5FaxKm87JE67YWD5TKJ3X_TMFoUGwnONg%40mail.gmail.com.