|
From: Carlo W. <li...@us...> - 2002-01-11 02:23:44
|
CVSROOT : /cvsroot/libcw
Module : src
Commit time: 2002-00-11 02:23:42 UTC
Modified files:
libcwd/elf32.cc libcwd/maintMakefile.in
Log message:
More bug fixes for (recent changes to) dwarf2.
---------------------- diff included ----------------------
Index: src/libcwd/elf32.cc
diff -u src/libcwd/elf32.cc:1.31 src/libcwd/elf32.cc:1.32
--- src/libcwd/elf32.cc:1.31 Thu Jan 10 10:11:02 2002
+++ src/libcwd/elf32.cc Thu Jan 10 18:23:32 2002
@@ -1,4 +1,4 @@
-// $Header: /cvsroot/l/li/libcw/src/libcwd/elf32.cc,v 1.31 2002/01/10 18:11:02 libcw Exp $
+// $Header: /cvsroot/l/li/libcw/src/libcwd/elf32.cc,v 1.32 2002/01/11 02:23:32 libcw Exp $
//
// Copyright (C) 2001, by
//
@@ -710,6 +710,8 @@
DoutDwarf(dc::bfd, "--> Sequence end.");
if (is_valid())
M_store();
+ // Invalidate range tracking, we will start all over.
+ M_range.start = 0;
}
Elf32_Half get_line(void) const { LIBCWD_ASSERT( (M_flags & 1) ); return M_line; }
@@ -796,6 +798,7 @@
object_files_string_set_ct M_source_files;
object_files_range_location_map_ct M_ranges;
bool M_debug_info_loaded;
+ bool M_inside_find_nearest_line;
Elf32_Word M_stabs_section_index;
Elf32_Word M_dwarf_debug_info_section_index;
Elf32_Word M_dwarf_debug_abbrev_section_index;
@@ -839,7 +842,10 @@
M_used = true;
return;
}
- LIBCWD_ASSERT( M_range.start <= M_address );
+#if DEBUGDWARF
+ if (M_range.start > M_address)
+ core_dump();
+#endif
if (M_range.start == M_address)
DoutDwarf(dc::bfd, "Skipping M_store: address range is zero.");
else if (M_range.start)
@@ -1866,14 +1872,39 @@
if (!M_debug_info_loaded)
{
#ifdef LIBCWD_THREAD_SAFE
- // `object_files_string' and the STL containers using `_private_::object_files_allocator' in the
- // following functions need this lock.
- _private_::rwlock_tct<_private_::object_files_instance>::wrlock();
+ // `object_files_string' and the STL containers using `_private_::object_files_allocator' in the
+ // following functions need this lock.
+ _private_::rwlock_tct<_private_::object_files_instance>::wrlock();
#endif
+ if (M_inside_find_nearest_line) // Break loop caused by re-entry through a call to malloc.
+ {
+ *file = NULL;
+ *func = symbol->name;
+ *line = 0;
+ return;
+ }
+ M_inside_find_nearest_line = true;
+#if DEBUGSTABS || DEBUGDWARF
+ int off = libcw::debug::libcw_do._off;
+ libcw::debug::libcw_do._off = -1; // Force debug output on.
+ int cnt = 0;
+ Debug(
+ while(!dc::bfd.is_on())
+ {
+ ++cnt;
+ dc::bfd.on();
+ }
+ );
+#endif
if (M_dwarf_debug_line_section_index)
load_dwarf();
else if (M_stabs_section_index)
load_stabs();
+#if DEBUGSTABS || DEBUGDWARF
+ Debug( while(cnt) { --cnt; dc::bfd.off(); } );
+ libcw::debug::libcw_do._off = off;
+#endif
+ M_inside_find_nearest_line = false;
#ifdef LIBCWD_THREAD_SAFE
_private_::rwlock_tct<_private_::object_files_instance>::wrunlock();
#endif
@@ -1964,6 +1995,7 @@
if (DEBUGELF32)
Debug( libcw_do.inc_indent(4) );
M_debug_info_loaded = false;
+ M_inside_find_nearest_line = false;
M_stabs_section_index = 0;
M_dwarf_debug_line_section_index = 0;
for(int i = 0; i < M_header.e_shnum; ++i)
Index: src/libcwd/maintMakefile.in
diff -u src/libcwd/maintMakefile.in:1.18 src/libcwd/maintMakefile.in:1.19
--- src/libcwd/maintMakefile.in:1.18 Tue Jan 8 17:42:21 2002
+++ src/libcwd/maintMakefile.in Thu Jan 10 18:23:32 2002
@@ -103,16 +103,16 @@
full-check: Makefile
@( \
for c in \
- '--enable-maintainer-mode --enable-libcwd-debugm --enable-libcwd-debug --compilers=3.0.3,2.96,2.95.3' \
- '--enable-maintainer-mode --enable-libcwd-threading --compilers=3.0.3,3.0.2,3.0.1,3.0' \
- '--enable-maintainer-mode --compilers=3.0.3,2.96,2.95.3,2.95.1,2.95.2,3.0' \
- '--enable-maintainer-mode --enable-libcwd-threading --enable-libcwd-debugm --compilers=3.0.3' \
+ '--enable-maintainer-mode --enable-libcwd-threading --enable-libcwd-debugm --enable-libcwd-debug --disable-libcwd-debug-output --compilers=3.0.3,2.96,2.95.3' \
+ '--enable-maintainer-mode --enable-libcwd-debugm --enable-libcwd-debug --disable-libcwd-debug-output --compilers=3.0.3,2.96,2.95.3' \
+ '--enable-maintainer-mode --enable-libcwd-threading --enable-libcwd-debugm --compilers=3.0.3,2.96,2.95.3' \
'--enable-maintainer-mode --enable-libcwd-debugm --compilers=3.0.3,2.96,2.95.3' \
- '--enable-maintainer-mode --enable-libcwd-threading --enable-libcwd-debug --disable-libcwd-debug-output --compilers=3.0.3' \
+ '--enable-maintainer-mode --enable-libcwd-threading --enable-libcwd-debug --disable-libcwd-debug-output --compilers=3.0.3,2.96,2.95.3' \
'--enable-maintainer-mode --enable-libcwd-debug --disable-libcwd-debug-output --compilers=3.0.3,2.96,2.95.3' \
- '--enable-maintainer-mode --enable-libcwd-threading --enable-libcwd-debugm --enable-libcwd-debug --disable-libcwd-debug-output --compilers=3.0.3' \
- '--enable-maintainer-mode --enable-libcwd-debugm --enable-libcwd-debug --disable-libcwd-debug-output --compilers=3.0.3,2.96,2.95.3' \
- '--enable-maintainer-mode --enable-libcwd-threading --enable-libcwd-debugm --enable-libcwd-debug --compilers=3.0.3' \
+ '--enable-maintainer-mode --enable-libcwd-threading --enable-libcwd-debugm --enable-libcwd-debug --compilers=3.0.3,2.96,2.95.3' \
+ '--enable-maintainer-mode --enable-libcwd-debugm --enable-libcwd-debug --compilers=3.0.3,2.96,2.95.3' \
+ '--enable-maintainer-mode --enable-libcwd-threading --compilers=3.0.3,3.0.2,3.0.1,2.96,2.95.3,2.95.2' \
+ '--enable-maintainer-mode --compilers=3.0.3,3.0.2,3.0.1,2.96,2.95.3,2.95.2' \
; do \
config=`echo $$c | sed -e 's/ --compilers=.*$$//'`; \
case "$$c" in \
----------------------- End of diff -----------------------
|