|
From: Carlo W. <li...@us...> - 2002-01-10 05:04:45
|
CVSROOT : /cvsroot/libcw
Module : src
Commit time: 2002-00-10 05:04:44 UTC
Modified files:
libcwd/acinclude.m4 libcwd/elf32.cc
libcwd/testsuite/libcwd.tst/do.cc
Log message:
Work in progress.
---------------------- diff included ----------------------
Index: src/libcwd/acinclude.m4
diff -u src/libcwd/acinclude.m4:1.45 src/libcwd/acinclude.m4:1.46
--- src/libcwd/acinclude.m4:1.45 Mon Jan 7 18:12:41 2002
+++ src/libcwd/acinclude.m4 Wed Jan 9 21:04:34 2002
@@ -879,13 +879,13 @@
AC_CANONICAL_HOST
case "$host" in
*freebsd*) DEBUGOPTS=-ggdb ;; dnl FreeBSD needs -ggdb to include sourcefile:linenumber info in its object files.
- *) DEBUGOPTS=-g ;;
+ *) DEBUGOPTS=-ggdb3 ;;
esac
AC_SUBST(DEBUGOPTS)
dnl Other options
if test "$USE_MAINTAINER_MODE" = yes; then
-EXTRAOPTS="-O"
+EXTRAOPTS=""
else
EXTRAOPTS="-O"
fi
Index: src/libcwd/elf32.cc
diff -u src/libcwd/elf32.cc:1.29 src/libcwd/elf32.cc:1.30
--- src/libcwd/elf32.cc:1.29 Thu Jan 3 20:22:33 2002
+++ src/libcwd/elf32.cc Wed Jan 9 21:04:34 2002
@@ -1,4 +1,4 @@
-// $Header: /cvsroot/l/li/libcw/src/libcwd/elf32.cc,v 1.29 2002/01/04 04:22:33 libcw Exp $
+// $Header: /cvsroot/l/li/libcw/src/libcwd/elf32.cc,v 1.30 2002/01/10 05:04:34 libcw Exp $
//
// Copyright (C) 2001, by
//
@@ -614,7 +614,9 @@
object_files_string_set_ct::iterator M_source_iter;
Elf32_Half M_line;
+#if DEBUGSTABS || DEBUGDWARF
friend std::ostream& operator<<(std::ostream& os, location_st const& loc);
+#endif
};
class object_file_ct;
@@ -1910,18 +1912,14 @@
void object_file_ct::register_range(location_st const& location, range_st const& range)
{
+#if !DEBUGSTABS && !DEBUGDWARF
+ M_ranges.insert(std::pair<range_st, location_st>(range, location));
+#else
if ((DEBUGDWARF && M_dwarf_debug_line_section_index)
|| (DEBUGSTABS && M_stabs_section_index))
Dout(dc::bfd, std::hex << range.start << " - " << (range.start + range.size) << "; " << location << '.');
-#if DEBUGSTABS || DEBUGDWARF
- std::pair<object_files_range_location_map_ct::iterator, bool> p(
-#endif
- M_ranges.insert(std::pair<range_st, location_st>(range, location))
-#if DEBUGSTABS || DEBUGDWARF
- )
-#endif
- ;
-#if DEBUGSTABS || DEBUGDWARF
+
+ std::pair<object_files_range_location_map_ct::iterator, bool> p(M_ranges.insert(std::pair<range_st, location_st>(range, location)));
if (!p.second)
{
if ((*p.first).second.M_func_iter != location.M_func_iter)
Index: src/libcwd/testsuite/libcwd.tst/do.cc
diff -u src/libcwd/testsuite/libcwd.tst/do.cc:1.17 src/libcwd/testsuite/libcwd.tst/do.cc:1.18
--- src/libcwd/testsuite/libcwd.tst/do.cc:1.17 Sat Dec 29 20:17:51 2001
+++ src/libcwd/testsuite/libcwd.tst/do.cc Wed Jan 9 21:04:34 2002
@@ -38,6 +38,13 @@
#endif
Debug( libcw_do.on() );
+#ifdef DEBUGDEBUG
+ // Get rid of the `first_time'.
+ Debug( my_own_do.on() );
+ Debug( my_own_do.off() );
+ Debug( example::my_own_do.on() );
+ Debug( example::my_own_do.off() );
+#endif
Debug( dc::notice.on() );
Debug( dc::debug.on() );
----------------------- End of diff -----------------------
|