mirror of
https://git.suyu.dev/suyu/breakpad.git
synced 2026-01-05 22:18:21 +01:00
Incorporate feedback from first Breakpad integration.
This upload fixes five issues: 1) Preston's email was hardcoded in the xib :-( 2) Changed from xib to NIB to facilitate Tiger building 3) Changed the logs location to be user specifiable by BreakpadMinidumpLocation key, or ~/Library/Breakpad/<BREAKPAD_PRODUCT> by default 4) Fixed GTM Defines problem in order to build on Tiger 5) Also set CFBundleIcon in the sender program correctly, and updated plist, and renamed ReporterIcons to crash_report_sendER.ICNS. However the rietveld upload script doesn't appear to pick up renamed files correctly, so that file doesn't show up in the patch upload. Also various comments were updated for accuracy. git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@323 4c0a9323-5329-0410-9bdc-e9ce6186880e
This commit is contained in:
parent
3ebdb1bd7a
commit
a3d4c97336
14 changed files with 204 additions and 942 deletions
|
|
@ -122,18 +122,9 @@ class ConfigFile {
|
|||
//=============================================================================
|
||||
class MinidumpLocation {
|
||||
public:
|
||||
MinidumpLocation() {
|
||||
NSString *minidumpDirBase = NSHomeDirectory();
|
||||
NSString *minidumpDir;
|
||||
|
||||
// Put root processes at root
|
||||
if (geteuid() == 0)
|
||||
minidumpDirBase = @"/";
|
||||
|
||||
minidumpDir =
|
||||
[minidumpDirBase stringByAppendingPathComponent:@"Library/Logs/Google"];
|
||||
|
||||
MinidumpLocation(const NSString *minidumpDir) {
|
||||
// Ensure that the path exists. Fallback to /tmp if unable to locate path.
|
||||
assert(minidumpDir);
|
||||
if (!EnsureDirectoryPathExists(minidumpDir)) {
|
||||
DEBUGLOG(stderr, "Unable to create: %s\n", [minidumpDir UTF8String]);
|
||||
minidumpDir = @"/tmp";
|
||||
|
|
@ -196,5 +187,3 @@ class Inspector {
|
|||
|
||||
|
||||
} // namespace google_breakpad
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -325,7 +325,33 @@ bool Inspector::InspectTask() {
|
|||
// keep the task quiet while we're looking at it
|
||||
task_suspend(remote_task_);
|
||||
|
||||
MinidumpLocation minidumpLocation;
|
||||
NSString *minidumpDir;
|
||||
|
||||
const char *minidumpDirectory =
|
||||
config_params_.GetValueForKey(BREAKPAD_DUMP_DIRECTORY);
|
||||
|
||||
// If the client app has not specified a minidump directory,
|
||||
// use a default of Library/<kDefaultLibrarySubdirectory>/<Product Name>
|
||||
if (0 == strlen(minidumpDirectory)) {
|
||||
NSArray *libraryDirectories =
|
||||
NSSearchPathForDirectoriesInDomains(NSLibraryDirectory,
|
||||
NSUserDomainMask,
|
||||
YES);
|
||||
|
||||
NSString *applicationSupportDirectory =
|
||||
[libraryDirectories objectAtIndex:0];
|
||||
|
||||
minidumpDir =
|
||||
[NSString stringWithFormat:@"%@/%s/%s",
|
||||
applicationSupportDirectory,
|
||||
kDefaultLibrarySubdirectory,
|
||||
config_params_.GetValueForKey(GOOGLE_BREAKPAD_PRODUCT)];
|
||||
} else {
|
||||
minidumpDir = [[NSString stringWithUTF8String:minidumpDirectory]
|
||||
stringByExpandingTildeInPath];
|
||||
}
|
||||
|
||||
MinidumpLocation minidumpLocation(minidumpDir);
|
||||
|
||||
config_file_.WriteFile( &config_params_,
|
||||
minidumpLocation.GetPath(),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue