mirror of
https://github.com/yuzu-emu/breakpad.git
synced 2024-12-23 14:15:28 +00:00
Discard age field in the dumped symbol file.
git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@139 4c0a9323-5329-0410-9bdc-e9ce6186880e
This commit is contained in:
parent
e2abee6b01
commit
825840253b
|
@ -493,7 +493,7 @@ bool WriteModuleInfo(int fd, ElfW(Half) arch, const std::string &obj_file) {
|
||||||
size_t slash_pos = obj_file.find_last_of("/");
|
size_t slash_pos = obj_file.find_last_of("/");
|
||||||
if (slash_pos != std::string::npos)
|
if (slash_pos != std::string::npos)
|
||||||
filename = obj_file.substr(slash_pos + 1);
|
filename = obj_file.substr(slash_pos + 1);
|
||||||
return WriteFormat(fd, "MODULE Linux %s %s 1 %s\n", arch_name,
|
return WriteFormat(fd, "MODULE Linux %s %s %s\n", arch_name,
|
||||||
id_no_dash, filename.c_str());
|
id_no_dash, filename.c_str());
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
|
|
|
@ -75,12 +75,12 @@ static void TokenizeByChar(const std::string &source_string,
|
||||||
}
|
}
|
||||||
|
|
||||||
//=============================================================================
|
//=============================================================================
|
||||||
// Parse out the module line which have 6 parts.
|
// Parse out the module line which have 5 parts.
|
||||||
// MODULE <os> <cpu> <uuid> <age> <module-name>
|
// MODULE <os> <cpu> <uuid> <module-name>
|
||||||
static bool ModuleDataForSymbolFile(const std::string &file,
|
static bool ModuleDataForSymbolFile(const std::string &file,
|
||||||
std::vector<std::string> *module_parts) {
|
std::vector<std::string> *module_parts) {
|
||||||
assert(module_parts);
|
assert(module_parts);
|
||||||
const size_t kModulePartNumber = 6;
|
const size_t kModulePartNumber = 5;
|
||||||
FILE *fp = fopen(file.c_str(), "r");
|
FILE *fp = fopen(file.c_str(), "r");
|
||||||
if (fp) {
|
if (fp) {
|
||||||
char buffer[1024];
|
char buffer[1024];
|
||||||
|
@ -105,14 +105,12 @@ static bool ModuleDataForSymbolFile(const std::string &file,
|
||||||
}
|
}
|
||||||
|
|
||||||
//=============================================================================
|
//=============================================================================
|
||||||
static std::string CompactIdentifier(const std::string &uuid,
|
static std::string CompactIdentifier(const std::string &uuid) {
|
||||||
const std::string &age) {
|
|
||||||
std::vector<std::string> components;
|
std::vector<std::string> components;
|
||||||
TokenizeByChar(uuid, '-', &components);
|
TokenizeByChar(uuid, '-', &components);
|
||||||
std::string result;
|
std::string result;
|
||||||
for (size_t i = 0; i < components.size(); ++i)
|
for (size_t i = 0; i < components.size(); ++i)
|
||||||
result += components[i];
|
result += components[i];
|
||||||
result += age;
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -126,20 +124,18 @@ static void Start(Options *options) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string compacted_id = CompactIdentifier(module_parts[3],
|
std::string compacted_id = CompactIdentifier(module_parts[3]);
|
||||||
module_parts[4]);
|
|
||||||
|
|
||||||
// Add parameters
|
// Add parameters
|
||||||
if (!options->version.empty())
|
if (!options->version.empty())
|
||||||
parameters["version"] = options->version;
|
parameters["version"] = options->version;
|
||||||
|
|
||||||
// MODULE <os> <cpu> <uuid> <age> <module-name>
|
// MODULE <os> <cpu> <uuid> <module-name>
|
||||||
// 0 1 2 3 4 5
|
// 0 1 2 3 4
|
||||||
parameters["age"] = "1";
|
|
||||||
parameters["os"] = module_parts[1];
|
parameters["os"] = module_parts[1];
|
||||||
parameters["cpu"] = module_parts[2];
|
parameters["cpu"] = module_parts[2];
|
||||||
parameters["debug_file"] = module_parts[5];
|
parameters["debug_file"] = module_parts[4];
|
||||||
parameters["code_file"] = module_parts[5];
|
parameters["code_file"] = module_parts[4];
|
||||||
parameters["debug_identifier"] = compacted_id;
|
parameters["debug_identifier"] = compacted_id;
|
||||||
std::string response;
|
std::string response;
|
||||||
bool success = HTTPUpload::SendRequest(options->uploadURLStr,
|
bool success = HTTPUpload::SendRequest(options->uploadURLStr,
|
||||||
|
|
Loading…
Reference in a new issue