diff options
author | Cary Coutant <ccoutant@google.com> | 2012-02-29 21:22:29 +0000 |
---|---|---|
committer | Cary Coutant <ccoutant@google.com> | 2012-02-29 21:22:29 +0000 |
commit | 5dd8762ad1a47548394c76ead1b56fc5dab64628 (patch) | |
tree | 54eeb14cc262fb233284909e649157185c6a92d2 /gold/dwarf_reader.h | |
parent | [Ada] processId: Do not modify already encoded IDs (diff) | |
download | binutils-gdb-5dd8762ad1a47548394c76ead1b56fc5dab64628.tar.gz binutils-gdb-5dd8762ad1a47548394c76ead1b56fc5dab64628.tar.bz2 binutils-gdb-5dd8762ad1a47548394c76ead1b56fc5dab64628.zip |
* dwarf_reader.cc (Sized_dwarf_line_info::Sized_dwarf_line_info):
Call Object::decompressed_section_contents.
* dwarf_reader.h (Sized_dwarf_line_info::~Sized_dwarf_line_info):
New dtor.
(Sized_dwarf_line_info::buffer_start_): New data member.
* merge.cc (Output_merge_data::do_add_input_section): Call
Object::decompressed_section_contents.
(Output_merge_string::do_add_input_section): Likewise.
* object.cc (need_decompressed_section): New function.
(build_compressed_section_map): Decompress sections needed later.
(Sized_relobj_file::do_decompressed_section_contents): New function.
(Sized_relobj_file::do_discard_decompressed_sections): New function.
* object.h (Object::decompressed_section_contents): New function.
(Object::discard_decompressed_sections): New function.
(Object::do_decompressed_section_contents): New function.
(Object::do_discard_decompressed_sections): New function.
(Compressed_section_info): New type.
(Compressed_section_map): Include decompressed section contents.
(Sized_relobj_file::do_decompressed_section_contents): New function.
(Sized_relobj_file::do_discard_decompressed_sections): New function.
Diffstat (limited to 'gold/dwarf_reader.h')
-rw-r--r-- | gold/dwarf_reader.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/gold/dwarf_reader.h b/gold/dwarf_reader.h index 3f92dd3eea2..722ee647afd 100644 --- a/gold/dwarf_reader.h +++ b/gold/dwarf_reader.h @@ -120,6 +120,13 @@ class Sized_dwarf_line_info : public Dwarf_line_info // information that pertains to the specified section. Sized_dwarf_line_info(Object* object, unsigned int read_shndx = -1U); + virtual + ~Sized_dwarf_line_info() + { + if (this->buffer_start_ != NULL) + delete[] this->buffer_start_; + } + private: std::string do_addr2line(unsigned int shndx, off_t offset, @@ -199,6 +206,10 @@ class Sized_dwarf_line_info : public Dwarf_line_info // the line info to read is. const unsigned char* buffer_; const unsigned char* buffer_end_; + // If the buffer was allocated temporarily, and therefore must be + // deallocated in the dtor, this contains a pointer to the start + // of the buffer. + const unsigned char* buffer_start_; // This has relocations that point into buffer. Track_relocs<size, big_endian> track_relocs_; |