@@ -43,6 +43,7 @@ MinidumpDescriptor::MinidumpDescriptor(const MinidumpDescriptor& descriptor)
43
43
: mode_(descriptor.mode_),
44
44
fd_ (descriptor.fd_),
45
45
directory_(descriptor.directory_),
46
+ sessionid_(descriptor.sessionid_),
46
47
c_path_(NULL ),
47
48
size_limit_(descriptor.size_limit_),
48
49
address_within_principal_mapping_(
@@ -64,6 +65,7 @@ MinidumpDescriptor& MinidumpDescriptor::operator=(
64
65
mode_ = descriptor.mode_ ;
65
66
fd_ = descriptor.fd_ ;
66
67
directory_ = descriptor.directory_ ;
68
+ sessionid_ = descriptor.sessionid_ ;
67
69
path_.clear ();
68
70
if (c_path_) {
69
71
// This descriptor already had a path set, so generate a new one.
@@ -80,17 +82,22 @@ MinidumpDescriptor& MinidumpDescriptor::operator=(
80
82
return *this ;
81
83
}
82
84
85
+ // NOTE: for android we really shouldnt be using the guid at all
83
86
void MinidumpDescriptor::UpdatePath () {
84
87
assert (mode_ == kWriteMinidumpToFile && !directory_.empty ());
85
-
86
- GUID guid;
87
- char guid_str[kGUIDStringLength + 1 ];
88
- if (!CreateGUID (&guid) || !GUIDToString (&guid, guid_str, sizeof (guid_str))) {
89
- assert (false );
90
- }
91
-
88
+
92
89
path_.clear ();
93
- path_ = directory_ + " /" + guid_str + " .dmp" ;
90
+ if (sessionid_.empty ()) {
91
+ GUID guid;
92
+ char guid_str[kGUIDStringLength + 1 ];
93
+ if (!CreateGUID (&guid) || !GUIDToString (&guid, guid_str, sizeof (guid_str))) {
94
+ assert (false );
95
+ }
96
+ path_ = directory_ + " /" + guid_str + " .dmp" ;
97
+ }
98
+ else {
99
+ path_ = directory_ + " /" + sessionid_ + " .dmp" ;
100
+ }
94
101
c_path_ = path_.c_str ();
95
102
}
96
103
0 commit comments