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

Unified Diff: src/common/windows/omap.cc

Issue 1773183003: Windows dump_syms: Add dumping of x86_64 CFI from PDB files Base URL: https://chromium.googlesource.com/breakpad/breakpad.git@warning-fix
Patch Set: Created 4 years, 9 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/common/windows/dia_util.h ('k') | src/common/windows/pdb_source_line_writer.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/common/windows/omap.cc
diff --git a/src/common/windows/omap.cc b/src/common/windows/omap.cc
index 554a57c2db1459586025b2e472e32eb028f4b768..69c36370ae6e482e9d321a8196972f50baf32998 100644
--- a/src/common/windows/omap.cc
+++ b/src/common/windows/omap.cc
@@ -170,51 +170,8 @@ bool EndpointIndexLess(const EndpointIndex& ei1, const EndpointIndex& ei2) {
bool FindAndLoadOmapTable(const wchar_t* name,
IDiaSession* session,
OmapTable* table) {
- assert(name != NULL);
- assert(session != NULL);
- assert(table != NULL);
-
- CComPtr<IDiaEnumDebugStreamData> stream;
- if (!FindDebugStream(name, session, &stream))
- return false;
- assert(stream.p != NULL);
-
- LONG count = 0;
- if (FAILED(stream->get_Count(&count))) {
- fprintf(stderr, "IDiaEnumDebugStreamData::get_Count failed for stream "
- "\"%ws\"\n", name);
- return false;
- }
-
- // Get the length of the stream in bytes.
- DWORD bytes_read = 0;
- ULONG count_read = 0;
- if (FAILED(stream->Next(count, 0, &bytes_read, NULL, &count_read))) {
- fprintf(stderr, "IDiaEnumDebugStreamData::Next failed while reading "
- "length of stream \"%ws\"\n", name);
- return false;
- }
-
- // Ensure it's consistent with the OMAP data type.
- DWORD bytes_expected = count * sizeof(OmapTable::value_type);
- if (count * sizeof(OmapTable::value_type) != bytes_read) {
- fprintf(stderr, "DIA debug stream \"%ws\" has an unexpected length", name);
- return false;
- }
-
- // Read the table.
- table->resize(count);
- bytes_read = 0;
- count_read = 0;
- if (FAILED(stream->Next(count, bytes_expected, &bytes_read,
- reinterpret_cast<BYTE*>(&table->at(0)),
- &count_read))) {
- fprintf(stderr, "IDiaEnumDebugStreamData::Next failed while reading "
- "data from stream \"%ws\"\n", name);
- return false;
- }
-
- return true;
+ DWORD rva;
+ return FindAndLoadDebugStream(name, session, table, &rva);
}
// This determines the original image length by looking through the segment
« no previous file with comments | « src/common/windows/dia_util.h ('k') | src/common/windows/pdb_source_line_writer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698