aboutsummaryrefslogtreecommitdiff
path: root/src/processor/microdump.cc
diff options
context:
space:
mode:
authorMaria Mandlis <mmandlis@google.com>2016-02-11 10:04:04 -0800
committerMaria Mandlis <mmandlis@google.com>2016-02-11 10:04:04 -0800
commitdf280bb6314467dae14ace80b45c61760e683ae1 (patch)
tree324d2260d771a1d67abbd980f590945ceb6067c0 /src/processor/microdump.cc
parentRevert "Added a switch to dump minidump modules in minidump_stackwalk." (diff)
downloadbreakpad-df280bb6314467dae14ace80b45c61760e683ae1.tar.xz
Parse additional line introduced in the microdump format and containing the GPU infromation in the following format:
G GL_VERSION|GL_VENDOR|GL_RENDERER. The GPU version, vendor and renderer are extracted during microdump parsing and populated in the appropriate fields in the SystemInfo struct. This is to match the changes introduced in crrev.com/1343713002 and crrev.com/1334473003 BUG=chromium:536769 R=primiano@chromium.org Review URL: https://codereview.chromium.org/1678463002 .
Diffstat (limited to 'src/processor/microdump.cc')
-rw-r--r--src/processor/microdump.cc10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/processor/microdump.cc b/src/processor/microdump.cc
index 6a51a997..e276743f 100644
--- a/src/processor/microdump.cc
+++ b/src/processor/microdump.cc
@@ -54,11 +54,13 @@ static const char kMicrodumpBegin[] = "-----BEGIN BREAKPAD MICRODUMP-----";
static const char kMicrodumpEnd[] = "-----END BREAKPAD MICRODUMP-----";
static const char kOsKey[] = ": O ";
static const char kCpuKey[] = ": C ";
+static const char kGpuKey[] = ": G ";
static const char kMmapKey[] = ": M ";
static const char kStackKey[] = ": S ";
static const char kStackFirstLineKey[] = ": S 0 ";
static const char kArmArchitecture[] = "arm";
static const char kArm64Architecture[] = "arm64";
+static const char kGpuUnknown[] = "UNKNOWN";
template<typename T>
T HexStrToL(const string& str) {
@@ -292,6 +294,14 @@ Microdump::Microdump(const string& contents)
} else {
std::cerr << "Unsupported architecture: " << arch << std::endl;
}
+ } else if ((pos = line.find(kGpuKey)) != string::npos) {
+ string gpu_str(line, pos + strlen(kGpuKey));
+ if (strcmp(gpu_str.c_str(), kGpuUnknown) != 0) {
+ std::istringstream gpu_tokens(gpu_str);
+ std::getline(gpu_tokens, system_info_->gl_version, '|');
+ std::getline(gpu_tokens, system_info_->gl_vendor, '|');
+ std::getline(gpu_tokens, system_info_->gl_renderer, '|');
+ }
} else if ((pos = line.find(kMmapKey)) != string::npos) {
string mmap_line(line, pos + strlen(kMmapKey));
std::istringstream mmap_tokens(mmap_line);