Author: sh-sh-sh
Date: Tue Jan 22 15:28:54 2008
New Revision: 43828
URL: http://svn.opensuse.org/viewcvs/yast?rev=43828&view=rev
Log:
reduced line width in back trace: no more redundant prefixes
Modified:
trunk/core/liby2/src/genericfrontend.cc
Modified: trunk/core/liby2/src/genericfrontend.cc
URL: http://svn.opensuse.org/viewcvs/yast/trunk/core/liby2/src/genericfrontend.cc?rev=43828&r1=43827&r2=43828&view=diff
==============================================================================
--- trunk/core/liby2/src/genericfrontend.cc (original)
+++ trunk/core/liby2/src/genericfrontend.cc Tue Jan 22 15:28:54 2008
@@ -32,6 +32,7 @@
#include
#include
#include <sstream>
+#include <iomanip>
#include
#include <string>
@@ -67,12 +68,19 @@
size_t size = backtrace (frames, N);
char ** strings = backtrace_symbols (frames, size);
+ std::stringstream backtrace;
+
for (size_t i = 0; i < size; ++i)
{
- string demangled_name = demangle( strings[i] );
- y2error ("frame %2zd: %s", i, demangled_name.c_str() );
+ backtrace << " Frame "
+ << std::setw( 2 ) << i << ": "
+ << demangle( strings[i] ) << "\n";
+
}
+ y2error( "Back trace:\n\n%s\n== End of back trace ===\n",
+ backtrace.str().c_str() );
+
free (strings);
}
--
To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org
For additional commands, e-mail: yast-commit+help@opensuse.org