X-Git-Url: http://git.tdb.fi/?p=libs%2Fcore.git;a=blobdiff_plain;f=source%2Fdebug%2Fbacktrace.cpp;h=f9057dce833d95b9231917bd763a489f7a856fb1;hp=25a5e2186bc9e5869aa735ac426dac70e918c8cf;hb=5a32939eb6e576c223e1be5f80226d9e628a2398;hpb=cfc8e0b7b15ea505bd6a6a9599cbc5ce1e316963 diff --git a/source/debug/backtrace.cpp b/source/debug/backtrace.cpp index 25a5e21..f9057dc 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,24 +14,24 @@ namespace Debug { Backtrace Backtrace::create() { -#if !defined(WIN32) && defined(__GLIBC__) +#if !defined(_WIN32) && defined(__GLIBC__) void *addresses[50]; - int count=::backtrace(addresses, 50); + int count = ::backtrace(addresses, 50); Backtrace bt; Dl_info dli; for(int i=0; i &frames=bt.get_frames(); + const list &frames = bt.get_frames(); for(list::const_iterator i=frames.begin(); i!=frames.end(); ++i) out<<*i<<'\n';