X-Git-Url: http://git.tdb.fi/?p=libs%2Fcore.git;a=blobdiff_plain;f=source%2Fdebug%2Fbacktrace.cpp;h=de1f76e910611ee6dd95be1fadcda9dc727e4ff8;hp=f43a9edacccb2655eaaf42e094e4d5f74dd8742f;hb=f24e7b96e76b63c9b9b8a6bce4c7a9db64276ea8;hpb=d5dd704b2576f878809e87dbb8ff8591b9bdbce4 diff --git a/source/debug/backtrace.cpp b/source/debug/backtrace.cpp index f43a9ed..de1f76e 100644 --- a/source/debug/backtrace.cpp +++ b/source/debug/backtrace.cpp @@ -1,13 +1,6 @@ -/* $Id$ - -This file is part of libmspcore -Copyright © 2007 Mikko Rasa, Mikkosoft Productions -Distributed under the LGPL -*/ - // Must include something to test for glibc #include -#if !defined(WIN32) && defined(__GLIBC__) +#if !defined(_WIN32) && defined(__GLIBC__) #include #include #endif @@ -21,7 +14,7 @@ namespace Debug { Backtrace Backtrace::create() { -#if !defined(WIN32) && defined(__GLIBC__) +#if !defined(_WIN32) && defined(__GLIBC__) void *addresses[50]; int count = ::backtrace(addresses, 50); @@ -50,9 +43,8 @@ Backtrace Backtrace::create() ostream &operator<<(ostream &out, const Backtrace &bt) { - const list &frames = bt.get_frames(); - for(list::const_iterator i=frames.begin(); i!=frames.end(); ++i) - out<<*i<<'\n'; + for(const Backtrace::StackFrame &f: bt.get_frames()) + out<