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

Unified Diff: util/numeric/checked_address_range.h

Issue 1475023004: Get module versions and types from in-memory images (Closed) Base URL: https://chromium.googlesource.com/crashpad/crashpad@master
Patch Set: Address review feedback (2) 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « snapshot/win/system_snapshot_win.cc ('k') | util/numeric/checked_address_range.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: util/numeric/checked_address_range.h
diff --git a/util/numeric/checked_address_range.h b/util/numeric/checked_address_range.h
index e9514bbdec6e256082a6ccdad822c75d33692148..65f85fbd0f3375043c09a5d4a868dc98565964b6 100644
--- a/util/numeric/checked_address_range.h
+++ b/util/numeric/checked_address_range.h
@@ -17,6 +17,8 @@
#include <stdint.h>
+#include <string>
+
#include "build/build_config.h"
#include "util/numeric/checked_range.h"
@@ -108,6 +110,12 @@ class CheckedAddressRangeGeneric {
//! CheckedAddressRangeGeneric objects involved.
bool ContainsRange(const CheckedAddressRangeGeneric& that) const;
+ //! \brief Returns a string describing the address range.
+ //!
+ //! The string will be formatted as `"0x123 + 0x45 (64)"`, where the
+ //! individual components are the address, size, and bitness.
+ std::string AsString() const;
+
private:
#if defined(COMPILER_MSVC)
// MSVC cannot handle a union containing CheckedRange (with constructor, etc.)
« no previous file with comments | « snapshot/win/system_snapshot_win.cc ('k') | util/numeric/checked_address_range.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698