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

Unified Diff: snapshot/win/module_snapshot_win.cc

Issue 1430773003: win: Handle binary with embedded CodeView debug record (Closed) Base URL: https://chromium.googlesource.com/crashpad/crashpad@master
Patch Set: . Created 5 years, 2 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
Index: snapshot/win/module_snapshot_win.cc
diff --git a/snapshot/win/module_snapshot_win.cc b/snapshot/win/module_snapshot_win.cc
index f45bedc68741075ba5c4523dbba1bf60b2fd17ae..55f30922f6f927d7286682f7ce85b691385e33f4 100644
--- a/snapshot/win/module_snapshot_win.cc
+++ b/snapshot/win/module_snapshot_win.cc
@@ -60,6 +60,14 @@ bool ModuleSnapshotWin::Initialize(
&uuid_, &age_dword, &pdb_name_)) {
static_assert(sizeof(DWORD) == sizeof(uint32_t), "unexpected age size");
age_ = age_dword;
+ } else {
+ // If we fully supported all old debugging formats, we would want to extract
+ // and emit a different type of CodeView record here (as old Microsoft tools
+ // would do). As we don't expect to ever encounter a module that wouldn't be
+ // be using .PDB that we actually have symbols for, we simply set a
+ // plausible name here, but this will never correspond to symbols that we
+ // have.
+ pdb_name_ = base::UTF16ToUTF8(name_);
}
INITIALIZATION_STATE_SET_VALID(initialized_);

Powered by Google App Engine
This is Rietveld 408576698