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:
luly81 2007-04-04 03:26:40 +00:00
parent e2abee6b01
commit 825840253b
2 changed files with 10 additions and 14 deletions

View file

@ -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("/");
if (slash_pos != std::string::npos)
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());
}
return false;

View file

@ -75,12 +75,12 @@ static void TokenizeByChar(const std::string &source_string,
}
//=============================================================================
// Parse out the module line which have 6 parts.
// MODULE <os> <cpu> <uuid> <age> <module-name>
// Parse out the module line which have 5 parts.
// MODULE <os> <cpu> <uuid> <module-name>
static bool ModuleDataForSymbolFile(const std::string &file,
std::vector<std::string> *module_parts) {
assert(module_parts);
const size_t kModulePartNumber = 6;
const size_t kModulePartNumber = 5;
FILE *fp = fopen(file.c_str(), "r");
if (fp) {
char buffer[1024];
@ -105,14 +105,12 @@ static bool ModuleDataForSymbolFile(const std::string &file,
}
//=============================================================================
static std::string CompactIdentifier(const std::string &uuid,
const std::string &age) {
static std::string CompactIdentifier(const std::string &uuid) {
std::vector<std::string> components;
TokenizeByChar(uuid, '-', &components);
std::string result;
for (size_t i = 0; i < components.size(); ++i)
result += components[i];
result += age;
return result;
}
@ -126,20 +124,18 @@ static void Start(Options *options) {
return;
}
std::string compacted_id = CompactIdentifier(module_parts[3],
module_parts[4]);
std::string compacted_id = CompactIdentifier(module_parts[3]);
// Add parameters
if (!options->version.empty())
parameters["version"] = options->version;
// MODULE <os> <cpu> <uuid> <age> <module-name>
// 0 1 2 3 4 5
parameters["age"] = "1";
// MODULE <os> <cpu> <uuid> <module-name>
// 0 1 2 3 4
parameters["os"] = module_parts[1];
parameters["cpu"] = module_parts[2];
parameters["debug_file"] = module_parts[5];
parameters["code_file"] = module_parts[5];
parameters["debug_file"] = module_parts[4];
parameters["code_file"] = module_parts[4];
parameters["debug_identifier"] = compacted_id;
std::string response;
bool success = HTTPUpload::SendRequest(options->uploadURLStr,