Add logging to minidump processor (#82). Part 2: add messages to the rest of

the processor.  r=ted.mielczarek

http://groups.google.com/group/google-breakpad-dev/browse_thread/thread/cf56b767383a5d4b


git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@172 4c0a9323-5329-0410-9bdc-e9ce6186880e
This commit is contained in:
mmentovai 2007-05-21 20:09:33 +00:00
parent 08c8c4ddcf
commit 65571f17ed
17 changed files with 265 additions and 60 deletions

View file

@ -36,7 +36,10 @@
#ifndef PROCESSOR_ADDRESS_MAP_INL_H__
#define PROCESSOR_ADDRESS_MAP_INL_H__
#include <cassert>
#include "processor/address_map.h"
#include "processor/logging.h"
namespace google_breakpad {
@ -45,8 +48,11 @@ bool AddressMap<AddressType, EntryType>::Store(const AddressType &address,
const EntryType &entry) {
// Ensure that the specified address doesn't conflict with something already
// in the map.
if (map_.find(address) != map_.end())
if (map_.find(address) != map_.end()) {
BPLOG(INFO) << "Store failed, address " << HexString(address) <<
" is already present";
return false;
}
map_.insert(MapValue(address, entry));
return true;
@ -56,8 +62,8 @@ template<typename AddressType, typename EntryType>
bool AddressMap<AddressType, EntryType>::Retrieve(
const AddressType &address,
EntryType *entry, AddressType *entry_address) const {
if (!entry)
return false;
BPLOG_IF(ERROR, !entry) << "AddressMap::Retrieve requires |entry|";
assert(entry);
// upper_bound gives the first element whose key is greater than address,
// but we want the first element whose key is less than or equal to address.