aboutsummaryrefslogtreecommitdiff
path: root/gold/dwarf_reader.h
diff options
context:
space:
mode:
authorIan Lance Taylor <iant@google.com>2007-12-11 18:17:31 +0000
committerIan Lance Taylor <iant@google.com>2007-12-11 18:17:31 +0000
commit9430daf83add74a41974f641b65365f668476776 (patch)
treef8f3078fa0c9a3fb3ecefcdcdda40febd6ceaab0 /gold/dwarf_reader.h
parent8424d8f538ffb17bf5e61ac73137f86e47bc8952 (diff)
downloadfsf-binutils-gdb-9430daf83add74a41974f641b65365f668476776.zip
fsf-binutils-gdb-9430daf83add74a41974f641b65365f668476776.tar.gz
fsf-binutils-gdb-9430daf83add74a41974f641b65365f668476776.tar.bz2
From Craig Silverstein: Speed up ODR violation reporting.
Diffstat (limited to 'gold/dwarf_reader.h')
-rw-r--r--gold/dwarf_reader.h14
1 files changed, 10 insertions, 4 deletions
diff --git a/gold/dwarf_reader.h b/gold/dwarf_reader.h
index 48ded84..f522104 100644
--- a/gold/dwarf_reader.h
+++ b/gold/dwarf_reader.h
@@ -89,15 +89,19 @@ class Sized_dwarf_line_info : public Dwarf_line_info
{
public:
// Initializes a .debug_line reader for a given object file.
- Sized_dwarf_line_info(Object* object);
+ // If SHNDX is specified and non-negative, only read the debug
+ // information that pertains to the specified section.
+ Sized_dwarf_line_info(Object* object, off_t read_shndx = -1U);
private:
std::string
do_addr2line(unsigned int shndx, off_t offset);
// Start processing line info, and populates the offset_map_.
+ // If SHNDX is non-negative, only store debug information that
+ // pertains to the specified section.
void
- read_line_mappings();
+ read_line_mappings(off_t shndx);
// Reads the relocation section associated with .debug_line and
// stores relocation information in reloc_map_.
@@ -117,9 +121,11 @@ class Sized_dwarf_line_info : public Dwarf_line_info
const unsigned char*
read_header_tables(const unsigned char* lineptr);
- // Reads the DWARF2/3 line information.
+ // Reads the DWARF2/3 line information. If shndx is non-negative,
+ // discard all line information that doesn't pertain to the given
+ // section.
const unsigned char*
- read_lines(const unsigned char* lineptr);
+ read_lines(const unsigned char* lineptr, off_t shndx);
// Process a single line info opcode at START using the state
// machine at LSM. Return true if we should define a line using the