diff options
author | jimblandy <jimblandy@4c0a9323-5329-0410-9bdc-e9ce6186880e> | 2010-08-25 15:10:19 +0000 |
---|---|---|
committer | jimblandy <jimblandy@4c0a9323-5329-0410-9bdc-e9ce6186880e> | 2010-08-25 15:10:19 +0000 |
commit | 42943c2391b6134b4caf5ff78e35c0c9edc57661 (patch) | |
tree | 1812b30102e3f7a2d2e861f0ddb12ba05d2f5278 /src | |
parent | Breakpad DWARF reader: Use uint64, not uint64_t in DWARF reader code. (diff) | |
download | breakpad-42943c2391b6134b4caf5ff78e35c0c9edc57661.tar.xz |
Breakpad DWARF parser: Don't use auto_ptr<stack<uint64> > where stack<uint64> would do.
Perhaps there once was some reason one needed the DIE offset stack to
have an unusual lifetime, but there is none now.
a=jimblandy, r=mmentovai
git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@666 4c0a9323-5329-0410-9bdc-e9ce6186880e
Diffstat (limited to 'src')
-rw-r--r-- | src/common/dwarf/dwarf2reader.cc | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/src/common/dwarf/dwarf2reader.cc b/src/common/dwarf/dwarf2reader.cc index 23f7ffa8..2c15ece6 100644 --- a/src/common/dwarf/dwarf2reader.cc +++ b/src/common/dwarf/dwarf2reader.cc @@ -39,7 +39,6 @@ #include <string.h> #include <map> -#include <memory> #include <stack> #include <utility> @@ -494,11 +493,8 @@ void CompilationUnit::ProcessDIEs() { else lengthstart += 4; - // 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. - std::auto_ptr<stack<uint64> > const die_stack(new stack<uint64>); - + stack<uint64> die_stack; + while (dieptr < (lengthstart + header_.length)) { // We give the user the absolute offset from the beginning of // debug_info, since they need it to deal with ref_addr forms. @@ -510,8 +506,8 @@ void CompilationUnit::ProcessDIEs() { // Abbrev == 0 represents the end of a list of children. if (abbrev_num == 0) { - const uint64 offset = die_stack->top(); - die_stack->pop(); + const uint64 offset = die_stack.top(); + die_stack.pop(); handler_->EndDIE(offset); continue; } @@ -525,7 +521,7 @@ void CompilationUnit::ProcessDIEs() { } if (abbrev.has_children) { - die_stack->push(absolute_offset); + die_stack.push(absolute_offset); } else { handler_->EndDIE(absolute_offset); } |