|
From: Carlo W. <li...@us...> - 2001-12-27 05:24:58
|
CVSROOT : /cvsroot/libcw
Module : src
Commit time: 2001-11-27 05:24:57 UTC
Modified files:
libcwd/debug.cc libcwd/elf32.cc
Log message:
Fix compilation when configured with --disable-libcwd-location
---------------------- diff included ----------------------
Index: src/libcwd/debug.cc
diff -u src/libcwd/debug.cc:1.47 src/libcwd/debug.cc:1.48
--- src/libcwd/debug.cc:1.47 Sat Sep 22 21:13:50 2001
+++ src/libcwd/debug.cc Wed Dec 26 21:24:47 2001
@@ -1,4 +1,4 @@
-// $Header: /cvsroot/l/li/libcw/src/libcwd/debug.cc,v 1.47 2001/09/23 04:13:50 libcw Exp $
+// $Header: /cvsroot/l/li/libcw/src/libcwd/debug.cc,v 1.48 2001/12/27 05:24:47 libcw Exp $
//
// Copyright (C) 2000, by
//
@@ -29,7 +29,7 @@
#endif
#endif // CWDEBUG
-RCSTAG_CC("$Id: debug.cc,v 1.47 2001/09/23 04:13:50 libcw Exp $")
+RCSTAG_CC("$Id: debug.cc,v 1.48 2001/12/27 05:24:47 libcw Exp $")
using namespace std;
@@ -500,7 +500,9 @@
channels::dc::malloc.initialize("MALLOC");
channels::dc::continued.initialize(continued_maskbit);
channels::dc::finish.initialize(finish_maskbit);
+#ifdef DEBUGUSEBFD
channels::dc::bfd.initialize("BFD");
+#endif
// What the heck, initialize all other debug channels too
channels::dc::warning.initialize("WARNING");
channels::dc::notice.initialize("NOTICE");
@@ -786,14 +788,24 @@
channel_set_st& debug_ct::operator|(fatal_channel_ct const&)
{
+#ifdef DEBUGUSEBFD
DoutFatal(dc::fatal, location_ct((char*)__builtin_return_address(0) + libcw::debug::builtin_return_address_offset) <<
" : Don't use Dout together with dc::core or dc::fatal! Use DoutFatal instead.");
+#else
+ DoutFatal(dc::core,
+ "Don't use Dout together with dc::core or dc::fatal! Use DoutFatal instead.");
+#endif
}
channel_set_st& debug_ct::operator&(channel_ct const&)
{
+#ifdef DEBUGUSEBFD
DoutFatal(dc::fatal, location_ct((char*)__builtin_return_address(0) + libcw::debug::builtin_return_address_offset) <<
- " : Use dc::core or dc::fatal together with DoutFatal.");
+ " : Use dc::core or dc::fatal together with DoutFatal.");
+#else
+ DoutFatal(dc::core,
+ "Use dc::core or dc::fatal together with DoutFatal.");
+#endif
}
void buf_st::init(char const* s, size_t l, bool first_time)
Index: src/libcwd/elf32.cc
diff -u src/libcwd/elf32.cc:1.26 src/libcwd/elf32.cc:1.27
--- src/libcwd/elf32.cc:1.26 Sat Sep 22 22:01:08 2001
+++ src/libcwd/elf32.cc Wed Dec 26 21:24:47 2001
@@ -1,4 +1,4 @@
-// $Header: /cvsroot/l/li/libcw/src/libcwd/elf32.cc,v 1.26 2001/09/23 05:01:08 libcw Exp $
+// $Header: /cvsroot/l/li/libcw/src/libcwd/elf32.cc,v 1.27 2001/12/27 05:24:47 libcw Exp $
//
// Copyright (C) 2001, by
//
@@ -18,7 +18,7 @@
#include <libcw/debug_config.h>
-#ifndef DEBUGUSEGNULIBBFD
+#if defined(DEBUGUSEBFD) && !defined(DEBUGUSEGNULIBBFD)
#include "sys.h"
#include <inttypes.h> // ISO C99 header, needed for int32_t etc.
@@ -33,7 +33,7 @@
#include <libcw/debug.h>
#include <libcw/elf32.h>
-RCSTAG_CC("$Id: elf32.cc,v 1.26 2001/09/23 05:01:08 libcw Exp $")
+RCSTAG_CC("$Id: elf32.cc,v 1.27 2001/12/27 05:24:47 libcw Exp $")
#define DEBUGELF32 0
#define DEBUGSTABS 0
@@ -1845,4 +1845,4 @@
} // namespace debug
} // namespace libcw
-#endif // !DEBUGUSEGNULIBBFD
+#endif // DEBUGUSEBFD && !DEBUGUSEGNULIBBFD
----------------------- End of diff -----------------------
|