aboutsummaryrefslogtreecommitdiff
path: root/binutils
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2013-05-02 10:18:38 +0000
committerNick Clifton <nickc@redhat.com>2013-05-02 10:18:38 +0000
commit4925cdd75b2e9f5d1091795d8672f6b5634404a9 (patch)
treedbf9ba130a7af2b6f10e4d6bcc4e982c46710ae0 /binutils
parent1e456ce018e56b58f9820b0fa924375d4e6f8e35 (diff)
downloadgdb-4925cdd75b2e9f5d1091795d8672f6b5634404a9.zip
gdb-4925cdd75b2e9f5d1091795d8672f6b5634404a9.tar.gz
gdb-4925cdd75b2e9f5d1091795d8672f6b5634404a9.tar.bz2
* dwarf.c (display_debug_lines_raw): Do not treat .debug_line.dwo
sections as if they were fragmentary .debug_line sections. (display_debug_lines_decoded): Likewise.
Diffstat (limited to 'binutils')
-rw-r--r--binutils/ChangeLog6
-rw-r--r--binutils/dwarf.c25
2 files changed, 17 insertions, 14 deletions
diff --git a/binutils/ChangeLog b/binutils/ChangeLog
index 58f7657..9426e34 100644
--- a/binutils/ChangeLog
+++ b/binutils/ChangeLog
@@ -1,3 +1,9 @@
+2013-05-02 Nick Clifton <nickc@redhat.com>
+
+ * dwarf.c (display_debug_lines_raw): Do not treat .debug_line.dwo
+ sections as if they were fragmentary .debug_line sections.
+ (display_debug_lines_decoded): Likewise.
+
2013-04-29 Nick Clifton <nickc@redhat.com>
* dwarf.c (read_debug_line_header): New function. Reads in a
diff --git a/binutils/dwarf.c b/binutils/dwarf.c
index b11169b..774904c 100644
--- a/binutils/dwarf.c
+++ b/binutils/dwarf.c
@@ -2659,7 +2659,10 @@ display_debug_lines_raw (struct dwarf_section *section,
unsigned char *end_of_sequence;
int i;
- if (const_strneq (section->name, ".debug_line."))
+ if (const_strneq (section->name, ".debug_line.")
+ /* Note: the following does not apply to .debug_line.dwo sections.
+ These are full debug_line sections. */
+ && strcmp (section->name, ".debug_line.dwo") != 0)
{
/* Sections named .debug_line.<foo> are fragments of a .debug_line
section containing just the Line Number Statements. They are
@@ -2668,9 +2671,9 @@ display_debug_lines_raw (struct dwarf_section *section,
garbage collection decides to discard a .text.<foo> section it
can then also discard the line number information in .debug_line.<foo>.
- Since the section is a fragmnent it does not have the details
+ Since the section is a fragment it does not have the details
needed to fill out a LineInfo structure, so instead we use the
- details from the last one we processed. */
+ details from the last full debug_line section that we processed. */
end_of_sequence = end;
standard_opcodes = NULL;
linfo = saved_linfo;
@@ -2994,18 +2997,12 @@ display_debug_lines_decoded (struct dwarf_section *section,
unsigned char **directory_table = NULL;
unsigned int n_directories = 0;
- if (const_strneq (section->name, ".debug_line."))
+ if (const_strneq (section->name, ".debug_line.")
+ /* Note: the following does not apply to .debug_line.dwo sections.
+ These are full debug_line sections. */
+ && strcmp (section->name, ".debug_line.dwo") != 0)
{
- /* Sections named .debug_line.<foo> are fragments of a .debug_line
- section containing just the Line Number Statements. They are
- created by the assembler and intended to be used alongside gcc's
- -ffunction-sections command line option. When the linker's
- garbage collection decides to discard a .text.<foo> section it
- can then also discard the line number information in .debug_line.<foo>.
-
- Since the section is a fragmnent it does not have the details
- needed to fill out a LineInfo structure, so instead we use the
- details from the last one we processed. */
+ /* See comment in display_debug_lines_raw(). */
end_of_sequence = end;
standard_opcodes = NULL;
linfo = saved_linfo;