From 2214cb9bc1872cafae9127778c0cba556c89e43d Mon Sep 17 00:00:00 2001 From: jimblandy Date: Fri, 5 Feb 2010 17:17:24 +0000 Subject: 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 --- src/google_breakpad/processor/memory_region.h | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'src/google_breakpad/processor/memory_region.h') diff --git a/src/google_breakpad/processor/memory_region.h b/src/google_breakpad/processor/memory_region.h index 1ac3fe8d..6e01cddf 100644 --- a/src/google_breakpad/processor/memory_region.h +++ b/src/google_breakpad/processor/memory_region.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 @@ -50,10 +50,10 @@ class MemoryRegion { virtual ~MemoryRegion() {} // The base address of this memory region. - virtual u_int64_t GetBase() = 0; + virtual u_int64_t GetBase() const = 0; // The size of this memory region. - virtual u_int32_t GetSize() = 0; + virtual u_int32_t GetSize() const = 0; // Access to data of various sizes within the memory region. address // is a pointer to read, and it must lie within the memory region as @@ -63,10 +63,10 @@ class MemoryRegion { // program. Returns true on success. Fails and returns false if address // is out of the region's bounds (after considering the width of value), // or for other types of errors. - virtual bool GetMemoryAtAddress(u_int64_t address, u_int8_t* value) = 0; - virtual bool GetMemoryAtAddress(u_int64_t address, u_int16_t* value) = 0; - virtual bool GetMemoryAtAddress(u_int64_t address, u_int32_t* value) = 0; - virtual bool GetMemoryAtAddress(u_int64_t address, u_int64_t* value) = 0; + virtual bool GetMemoryAtAddress(u_int64_t address, u_int8_t* value) const =0; + virtual bool GetMemoryAtAddress(u_int64_t address, u_int16_t* value) const =0; + virtual bool GetMemoryAtAddress(u_int64_t address, u_int32_t* value) const =0; + virtual bool GetMemoryAtAddress(u_int64_t address, u_int64_t* value) const =0; }; -- cgit v1.2.1