summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Henderson <rth@redhat.com>1999-06-26 15:48:47 +0000
committerRichard Henderson <rth@redhat.com>1999-06-26 15:48:47 +0000
commit69dd2e2d55f35811d5bf411ad62c5073caed42d6 (patch)
tree7b60a621e2d94e698df4f0e6d8f1251fcfc33bf2
parent1d7b28df8d646300cfc6a27be632ecdfd96f5a85 (diff)
downloadbinutils-gdb-69dd2e2d55f35811d5bf411ad62c5073caed42d6.tar.gz
David Mosberger <davidm@hpl.hp.com>
* dwarf2.c (struct dwarf2_debug): Add member dwarf_line_buffer. (decode_line_info): Add variable STASH and initialize it to point to the per-bfd dwarf2_debug info. Remove static variable dwarf_line_buffer and use stash->dwarf_line_buffer in its place.
-rw-r--r--bfd/ChangeLog7
-rw-r--r--bfd/dwarf2.c13
2 files changed, 16 insertions, 4 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index df85e980c01..405f110734e 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,3 +1,10 @@
+1999-06-26 David Mosberger <davidm@hpl.hp.com>
+
+ * dwarf2.c (struct dwarf2_debug): Add member dwarf_line_buffer.
+ (decode_line_info): Add variable STASH and initialize it to point
+ to the per-bfd dwarf2_debug info. Remove static variable
+ dwarf_line_buffer and use stash->dwarf_line_buffer in its place.
+
1999-06-26 Ian Lance Taylor <ian@zembu.com>
* elflink.h (elf_link_output_extsym): It's OK for a -Bsymbolic
diff --git a/bfd/dwarf2.c b/bfd/dwarf2.c
index 010d049618f..57f5482e735 100644
--- a/bfd/dwarf2.c
+++ b/bfd/dwarf2.c
@@ -99,6 +99,9 @@ struct dwarf2_debug {
/* Length of the loaded .debug_abbrev section. */
unsigned long dwarf_abbrev_size;
+
+ /* Buffer for decode_line_info. */
+ char *dwarf_line_buffer;
};
@@ -710,7 +713,7 @@ decode_line_info (unit)
{
bfd *abfd = unit->abfd;
- static char* dwarf_line_buffer = 0;
+ struct dwarf2_debug *stash;
struct line_info_table* table;
@@ -727,7 +730,9 @@ decode_line_info (unit)
bfd_vma hi_pc = 0, lo_pc = ~ (bfd_vma) 0;
#endif
- if (! dwarf_line_buffer)
+ stash = elf_tdata (abfd)->dwarf2_find_line_info;
+
+ if (! stash->dwarf_line_buffer)
{
asection *msec;
unsigned long size;
@@ -741,7 +746,7 @@ decode_line_info (unit)
}
size = bfd_get_section_size_before_reloc (msec);
- dwarf_line_buffer = (char*) bfd_alloc (abfd, size);
+ stash->dwarf_line_buffer = (char *) bfd_alloc (abfd, size);
if (! dwarf_line_buffer)
return 0;
@@ -768,7 +773,7 @@ decode_line_info (unit)
table->files = NULL;
table->last_line = NULL;
- line_ptr = dwarf_line_buffer + unit->line_offset;
+ line_ptr = stash->dwarf_line_buffer + unit->line_offset;
/* read in the prologue */
lh.total_length = read_4_bytes (abfd, line_ptr);