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

Side by Side Diff: snapshot/win/process_snapshot_win.cc

Issue 1473073008: Build fixes for Clang on Windows (Closed) Base URL: https://chromium.googlesource.com/crashpad/crashpad.git@master
Patch Set: curlies Created 5 years 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 unified diff | Download patch
« no previous file with comments | « snapshot/win/pe_image_reader.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Crashpad Authors. All rights reserved. 1 // Copyright 2015 The Crashpad Authors. All rights reserved.
2 // 2 //
3 // Licensed under the Apache License, Version 2.0 (the "License"); 3 // Licensed under the Apache License, Version 2.0 (the "License");
4 // you may not use this file except in compliance with the License. 4 // you may not use this file except in compliance with the License.
5 // You may obtain a copy of the License at 5 // You may obtain a copy of the License at
6 // 6 //
7 // http://www.apache.org/licenses/LICENSE-2.0 7 // http://www.apache.org/licenses/LICENSE-2.0
8 // 8 //
9 // Unless required by applicable law or agreed to in writing, software 9 // Unless required by applicable law or agreed to in writing, software
10 // distributed under the License is distributed on an "AS IS" BASIS, 10 // distributed under the License is distributed on an "AS IS" BASIS,
(...skipping 362 matching lines...) Expand 10 before | Expand all | Expand 10 after
373 PointerVector<internal::MemorySnapshotWin>* into) { 373 PointerVector<internal::MemorySnapshotWin>* into) {
374 AddMemorySnapshot(us.Buffer, us.Length, into); 374 AddMemorySnapshot(us.Buffer, us.Length, into);
375 } 375 }
376 376
377 template <class Traits> 377 template <class Traits>
378 void ProcessSnapshotWin::AddMemorySnapshotForLdrLIST_ENTRY( 378 void ProcessSnapshotWin::AddMemorySnapshotForLdrLIST_ENTRY(
379 const process_types::LIST_ENTRY<Traits>& le, size_t offset_of_member, 379 const process_types::LIST_ENTRY<Traits>& le, size_t offset_of_member,
380 PointerVector<internal::MemorySnapshotWin>* into) { 380 PointerVector<internal::MemorySnapshotWin>* into) {
381 // Walk the doubly-linked list of entries, adding the list memory itself, as 381 // Walk the doubly-linked list of entries, adding the list memory itself, as
382 // well as pointed-to strings. 382 // well as pointed-to strings.
383 Traits::Pointer last = le.Blink; 383 typename Traits::Pointer last = le.Blink;
384 process_types::LDR_DATA_TABLE_ENTRY<Traits> entry; 384 process_types::LDR_DATA_TABLE_ENTRY<Traits> entry;
385 Traits::Pointer cur = le.Flink; 385 typename Traits::Pointer cur = le.Flink;
386 for (;;) { 386 for (;;) {
387 // |cur| is the pointer to LIST_ENTRY embedded in the LDR_DATA_TABLE_ENTRY. 387 // |cur| is the pointer to LIST_ENTRY embedded in the LDR_DATA_TABLE_ENTRY.
388 // So we need to offset back to the beginning of the structure. 388 // So we need to offset back to the beginning of the structure.
389 if (!process_reader_.ReadMemory( 389 if (!process_reader_.ReadMemory(
390 cur - offset_of_member, sizeof(entry), &entry)) { 390 cur - offset_of_member, sizeof(entry), &entry)) {
391 return; 391 return;
392 } 392 }
393 AddMemorySnapshot(cur - offset_of_member, sizeof(entry), into); 393 AddMemorySnapshot(cur - offset_of_member, sizeof(entry), into);
394 AddMemorySnapshotForUNICODE_STRING(entry.FullDllName, into); 394 AddMemorySnapshotForUNICODE_STRING(entry.FullDllName, into);
395 AddMemorySnapshotForUNICODE_STRING(entry.BaseDllName, into); 395 AddMemorySnapshotForUNICODE_STRING(entry.BaseDllName, into);
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after
511 // ProcessLocksList.Flink. 511 // ProcessLocksList.Flink.
512 current_address = 512 current_address =
513 critical_section_debug.ProcessLocksList.Flink - 513 critical_section_debug.ProcessLocksList.Flink -
514 offsetof(process_types::RTL_CRITICAL_SECTION_DEBUG<Traits>, 514 offsetof(process_types::RTL_CRITICAL_SECTION_DEBUG<Traits>,
515 ProcessLocksList); 515 ProcessLocksList);
516 } while (current_address != start_address_forward && 516 } while (current_address != start_address_forward &&
517 current_address != kInvalid); 517 current_address != kInvalid);
518 } 518 }
519 519
520 } // namespace crashpad 520 } // namespace crashpad
OLDNEW
« no previous file with comments | « snapshot/win/pe_image_reader.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698