fixed enabled inline assembler for backtrace on windows
authorPatrick von Reth <patrick.vonreth@gmail.com>
Sat, 6 Feb 2010 12:20:24 +0000 (13:20 +0100)
committerManuel Nickschas <sputnick@quassel-irc.org>
Tue, 16 Feb 2010 10:56:25 +0000 (11:56 +0100)
src/common/logbacktrace_win.cpp

index ed11ea4..b12c15d 100644 (file)
@@ -89,16 +89,16 @@ void Quassel::logBacktrace(const QString &filename) {
     ZeroMemory(&Context, sizeof(CONTEXT));
     Context.ContextFlags = CONTEXT_CONTROL;
 
-// TODO: port asssembler to mingw32
+
 #ifdef __MINGW32__
-//      asm("Label:\n\t"
-//        "movl %%ebp,%0;\n\t"
-//        "movl %%esp,%1;\n\t"
-//        "movl $Label,%%eax;\n\t"
-//        "movl %%eax,;\n\t"
-//        :"=r"(Content.Epb),"=r"(Context.Esp),"=r"(Context.Eip)
-//        ://no input
-//        :"ebp","esp","eax");
+      asm("Label:\n\t"
+        "movl %%ebp,%0;\n\t"
+        "movl %%esp,%1;\n\t"
+        "movl $Label,%%eax;\n\t"
+        "movl %%eax,%2;\n\t"
+        :"=r"(Context.Ebp),"=r"(Context.Esp),"=r"(Context.Eip)
+        ://no input
+        :"eax");
 #else
     _asm {
     Label: