X-Git-Url: http://git.tdb.fi/?p=libs%2Fcore.git;a=blobdiff_plain;f=source%2Fdebug%2Fbacktrace.cpp;h=1236145aa67088d0b2aae1fd02031bd4b14068a6;hp=1fda155e9665d497f629cb575ea93a33b12a7d3b;hb=8223c2aabe26469b6c580a223555496c5c5c5df5;hpb=c7afef88380ebebc8c2b04e48664d73281ec8848 diff --git a/source/debug/backtrace.cpp b/source/debug/backtrace.cpp index 1fda155..1236145 100644 --- a/source/debug/backtrace.cpp +++ b/source/debug/backtrace.cpp @@ -1,6 +1,6 @@ // Must include something to test for glibc #include -#if !defined(WIN32) && defined(__GLIBC__) +#if !defined(_WIN32) && defined(__GLIBC__) #include #include #endif @@ -14,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); @@ -43,19 +43,18 @@ 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 << f << '\n'; return out; } ostream &operator<<(ostream &out, const Backtrace::StackFrame &sf) { - out<