aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/common/dwarf/bytereader-inl.h2
-rw-r--r--src/common/dwarf/dwarf2reader.cc6
2 files changed, 7 insertions, 1 deletions
diff --git a/src/common/dwarf/bytereader-inl.h b/src/common/dwarf/bytereader-inl.h
index 606a2713..e8b4efaa 100644
--- a/src/common/dwarf/bytereader-inl.h
+++ b/src/common/dwarf/bytereader-inl.h
@@ -29,6 +29,8 @@
#ifndef UTIL_DEBUGINFO_BYTEREADER_INL_H__
#define UTIL_DEBUGINFO_BYTEREADER_INL_H__
+#include <cassert>
+
#include "common/dwarf/bytereader.h"
namespace dwarf2reader {
diff --git a/src/common/dwarf/dwarf2reader.cc b/src/common/dwarf/dwarf2reader.cc
index cc5cbca9..2580606f 100644
--- a/src/common/dwarf/dwarf2reader.cc
+++ b/src/common/dwarf/dwarf2reader.cc
@@ -28,6 +28,8 @@
#include <cassert>
#include <cstdio>
+#include <cstring>
+#include <memory>
#include <stack>
#include <utility>
@@ -90,7 +92,9 @@ void CompilationUnit::ReadAbbrevs() {
const char* abbrev_start = iter->second.first +
header_.abbrev_offset;
const char* abbrevptr = abbrev_start;
+#ifndef NDEBUG
const uint64 abbrev_length = iter->second.second - header_.abbrev_offset;
+#endif
while (1) {
CompilationUnit::Abbrev abbrev;
@@ -466,7 +470,7 @@ void CompilationUnit::ProcessDIEs() {
// we need semantics of boost scoped_ptr here - no intention of trasnferring
// ownership of the stack. use const, but then we limit ourselves to not
// ever being able to call .reset() on the smart pointer.
- auto_ptr<stack<uint64> > const die_stack(new stack<uint64>);
+ std::auto_ptr<stack<uint64> > const die_stack(new stack<uint64>);
while (dieptr < (lengthstart + header_.length)) {
// We give the user the absolute offset from the beginning of