aboutsummaryrefslogtreecommitdiff
path: root/src/google_breakpad/processor/minidump.h
diff options
context:
space:
mode:
authorjimblandy <jimblandy@4c0a9323-5329-0410-9bdc-e9ce6186880e>2010-02-05 17:17:24 +0000
committerjimblandy <jimblandy@4c0a9323-5329-0410-9bdc-e9ce6186880e>2010-02-05 17:17:24 +0000
commit2214cb9bc1872cafae9127778c0cba556c89e43d (patch)
tree9106ebba828abbb1eaf6fc0bed593ec113428a7a /src/google_breakpad/processor/minidump.h
parentBreakpad processor: Save Windows unwinding data earlier in x86 walker. (diff)
downloadbreakpad-2214cb9bc1872cafae9127778c0cba556c89e43d.tar.xz
Breakpad processor: Make PostfixEvaluator treat the MemoryRegion as const.
In order to be able to treat any MemoryRegion as const, the accessor functions need to be declared this-const, which means annotations on all the subclasses, etc. etc. Since MinidumpMemoryRegion fills its memory_ member on demand, that member needs to be marked 'mutable', but this is exactly the sort of situation the 'mutable' keyword was intended for, so that seems all right. a=jimblandy, r=nealsid git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@509 4c0a9323-5329-0410-9bdc-e9ce6186880e
Diffstat (limited to 'src/google_breakpad/processor/minidump.h')
-rw-r--r--src/google_breakpad/processor/minidump.h20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/google_breakpad/processor/minidump.h b/src/google_breakpad/processor/minidump.h
index 2a83c3f0..4575fca3 100644
--- a/src/google_breakpad/processor/minidump.h
+++ b/src/google_breakpad/processor/minidump.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2006, Google Inc.
+// Copyright (c) 2010, Google Inc.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
@@ -242,22 +242,22 @@ class MinidumpMemoryRegion : public MinidumpObject,
// Returns a pointer to the base of the memory region. Returns the
// cached value if available, otherwise, reads the minidump file and
// caches the memory region.
- const u_int8_t* GetMemory();
+ const u_int8_t* GetMemory() const;
// The address of the base of the memory region.
- u_int64_t GetBase();
+ u_int64_t GetBase() const;
// The size, in bytes, of the memory region.
- u_int32_t GetSize();
+ u_int32_t GetSize() const;
// Frees the cached memory region, if cached.
void FreeMemory();
// Obtains the value of memory at the pointer specified by address.
- bool GetMemoryAtAddress(u_int64_t address, u_int8_t* value);
- bool GetMemoryAtAddress(u_int64_t address, u_int16_t* value);
- bool GetMemoryAtAddress(u_int64_t address, u_int32_t* value);
- bool GetMemoryAtAddress(u_int64_t address, u_int64_t* value);
+ bool GetMemoryAtAddress(u_int64_t address, u_int8_t* value) const;
+ bool GetMemoryAtAddress(u_int64_t address, u_int16_t* value) const;
+ bool GetMemoryAtAddress(u_int64_t address, u_int32_t* value) const;
+ bool GetMemoryAtAddress(u_int64_t address, u_int64_t* value) const;
// Print a human-readable representation of the object to stdout.
void Print();
@@ -274,7 +274,7 @@ class MinidumpMemoryRegion : public MinidumpObject,
// Implementation for GetMemoryAtAddress
template<typename T> bool GetMemoryAtAddressInternal(u_int64_t address,
- T* value);
+ T* value) const;
// The largest memory region that will be read from a minidump. The
// default is 1MB.
@@ -285,7 +285,7 @@ class MinidumpMemoryRegion : public MinidumpObject,
MDMemoryDescriptor* descriptor_;
// Cached memory.
- vector<u_int8_t>* memory_;
+ mutable vector<u_int8_t>* memory_;
};