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
This commit is contained in:
parent
e87521a989
commit
2214cb9bc1
5 changed files with 35 additions and 35 deletions
|
@ -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
|
||||
|
@ -56,21 +56,21 @@ using google_breakpad::PostfixEvaluator;
|
|||
// the value.
|
||||
class FakeMemoryRegion : public MemoryRegion {
|
||||
public:
|
||||
virtual u_int64_t GetBase() { return 0; }
|
||||
virtual u_int32_t GetSize() { return 0; }
|
||||
virtual bool GetMemoryAtAddress(u_int64_t address, u_int8_t *value) {
|
||||
virtual u_int64_t GetBase() const { return 0; }
|
||||
virtual u_int32_t GetSize() const { return 0; }
|
||||
virtual bool GetMemoryAtAddress(u_int64_t address, u_int8_t *value) const {
|
||||
*value = address + 1;
|
||||
return true;
|
||||
}
|
||||
virtual bool GetMemoryAtAddress(u_int64_t address, u_int16_t *value) {
|
||||
virtual bool GetMemoryAtAddress(u_int64_t address, u_int16_t *value) const {
|
||||
*value = address + 1;
|
||||
return true;
|
||||
}
|
||||
virtual bool GetMemoryAtAddress(u_int64_t address, u_int32_t *value) {
|
||||
virtual bool GetMemoryAtAddress(u_int64_t address, u_int32_t *value) const {
|
||||
*value = address + 1;
|
||||
return true;
|
||||
}
|
||||
virtual bool GetMemoryAtAddress(u_int64_t address, u_int64_t *value) {
|
||||
virtual bool GetMemoryAtAddress(u_int64_t address, u_int64_t *value) const {
|
||||
*value = address + 1;
|
||||
return true;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue