Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(839)

Unified Diff: src/processor/microdump.cc

Issue 1678463002: Parse additional microdump GPU line in the format: G GL_VERSION|GL_VENDOR|GL_RENDERER. (Closed) Base URL: https://chromium.googlesource.com/breakpad/breakpad.git@master
Patch Set: Sync Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/google_breakpad/processor/system_info.h ('k') | src/processor/microdump_processor_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/processor/microdump.cc
diff --git a/src/processor/microdump.cc b/src/processor/microdump.cc
index 6a51a9971a9256a0c436b23f1e520c0db247cff2..e276743f0fedcb006c6df8b8cb5840e3638bdb96 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);
« no previous file with comments | « src/google_breakpad/processor/system_info.h ('k') | src/processor/microdump_processor_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698