bug fixed (put solution in the documentation)

master
Marc Wäckerlin 20 years ago
parent 0fe2e6ea60
commit 4d4da167ec
  1. 44
      mrw/stacktrace.hpp

@ -9,6 +9,9 @@
@license LGPL, see file <a href="license.html">COPYING</a>
$Log$
Revision 1.10 2004/11/25 18:30:20 marc
bug fixed (put solution in the documentation)
Revision 1.9 2004/10/13 10:47:15 marc
no more need for ldd in StackTrace, read from /proc/self/maps
@ -147,41 +150,18 @@ namespace mrw {
and line number information if the executable was not compiled
with debug option @c -g.
@todo Add support for alternative symbol evaluation using @c
backtrace_symbols.
@note If file and line is wrong, but the function name is
correct, try to build without optimizations. For GNU compiler,
this means no option @c -O or @c -O0 and enable the debug
information with @c -g and don't inline functions with compiler
option @c -fno-inline. To build this project, you may enter:
@bug File and line is wrong where the exception is thrown. On
Address [0x4007830b] file and line is wrong, the file should be
/privat/home/marc/pro/mrw-c++/mrw/exception.cpp. File and line
are always wrong at the line where the exception is
instanciated. Why?!? (Could it be, because there is a string
created inline? The trace always shows basic_string.h.)
@code
UNEXPECTED EXCEPTION: ----------------------------
---------- Reason:
mrw::Exec: command execution failed
failed command was: "/bin/false"
error was: "execution failed"
---------- Stack:
1[0x8049b71] ../sysdeps/i386/elf/start.S:105 _start
[0x4022f92b] ????:0 __libc_start_main
[0x8049c96] /usr/include/g++/bits/basic_string.h:249 main
[0x40054668] ????:0 CppUnit::TextUi::TestRunner::run(std::string, bool, bool, bool)
[0x40054747] ????:0 CppUnit::TextUi::TestRunner::runTestByName(std::string, bool)
[0x400543ec] ????:0 CppUnit::TextUi::TestRunner::runTest(CppUnit::Test*, bool)
[0x4005525b] ????:0 CppUnit::TestSuite::run(CppUnit::TestResult*)
[0x4005525b] ????:0 CppUnit::TestSuite::run(CppUnit::TestResult*)
[0x4005525b] ????:0 CppUnit::TestSuite::run(CppUnit::TestResult*)
[0x4004aa06] ????:0 CppUnit::TestCase::run(CppUnit::TestResult*)
[0x804b164] /usr/include/cppunit/TestCaller.h:166 CppUnit::TestCaller<ExecTest, std::bad_exception>::runTest()
[0x804b299] /usr/include/g++/bits/stl_alloc.h:652 ExecTest::unexpectedExc()
[0x40078bda] /privat/home/marc/pro/mrw-c++/mrw/exec.cpp:77 mrw::Cmd::execute(bool) const
[0x4007830b] /usr/include/g++/bits/basic_string.h:249 mrw::Exec::execute(bool)
[0x40077941] /privat/home/marc/pro/mrw-c++/mrw/exec.cpp:38 mrw::ExecutionFailedExc::ExecutionFailedExc(std::string const&, std::string const&)
[0x400769d4] /privat/home/marc/pro/mrw-c++/mrw/exception.cpp:41 mrw::exception::exception()
[0x4007cbc5] /privat/home/marc/pro/mrw-c++/mrw/stacktrace.cpp:118 mrw::StackTrace::StackTrace()
-------------------------------------------------
CXXFLAGS="-g -fno-inline" ./configure && make clean check
@endcode
@todo Add support for alternative symbol evaluation using @c
backtrace_symbols.
*/
class StackTrace {
public:

Loading…
Cancel
Save