aboutsummaryrefslogtreecommitdiff
path: root/binutils
diff options
context:
space:
mode:
authorJim Blandy <jimb@codesourcery.com>2007-10-10 19:43:43 +0000
committerJim Blandy <jimb@codesourcery.com>2007-10-10 19:43:43 +0000
commit6523721c1fd1407b26c338dea6c3b302b334d86e (patch)
tree71e9464a111058516101e513ae330872c371c699 /binutils
parent46738c9aeb6140719e265425db002a2f887107cc (diff)
downloadgdb-6523721c1fd1407b26c338dea6c3b302b334d86e.zip
gdb-6523721c1fd1407b26c338dea6c3b302b334d86e.tar.gz
gdb-6523721c1fd1407b26c338dea6c3b302b334d86e.tar.bz2
* dwarf.c (display_debug_lines): Print the offset of each line
number program header.
Diffstat (limited to 'binutils')
-rw-r--r--binutils/ChangeLog5
-rw-r--r--binutils/dwarf.c3
2 files changed, 8 insertions, 0 deletions
diff --git a/binutils/ChangeLog b/binutils/ChangeLog
index 0c5f723..810e9d2 100644
--- a/binutils/ChangeLog
+++ b/binutils/ChangeLog
@@ -1,3 +1,8 @@
+2007-10-10 Jim Blandy <jimb@codesourcery.com>
+
+ * dwarf.c (display_debug_lines): Print the offset of each line
+ number program header.
+
2007-10-09 H.J. Lu <hongjiu.lu@intel.com>
PR binutils/4476
diff --git a/binutils/dwarf.c b/binutils/dwarf.c
index 9cfb158..53e6120 100644
--- a/binutils/dwarf.c
+++ b/binutils/dwarf.c
@@ -1821,11 +1821,13 @@ display_debug_lines (struct dwarf_section *section, void *file)
unsigned char *standard_opcodes;
unsigned char *end_of_sequence;
unsigned char *hdrptr;
+ unsigned long hdroff;
int initial_length_size;
int offset_size;
int i;
hdrptr = data;
+ hdroff = hdrptr - start;
/* Check the length of the block. */
info.li_length = byte_get (hdrptr, 4);
@@ -1878,6 +1880,7 @@ display_debug_lines (struct dwarf_section *section, void *file)
info.li_line_base <<= 24;
info.li_line_base >>= 24;
+ printf (_(" Offset: 0x%lx\n"), hdroff);
printf (_(" Length: %ld\n"), info.li_length);
printf (_(" DWARF Version: %d\n"), info.li_version);
printf (_(" Prologue Length: %d\n"), info.li_prologue_length);