2016-09-04 72 views
4

我最近纔開始發現這個問題,並且我不知道什麼時候開始發生/什麼原因導致它。由於KERNELBASE.dll錯誤導致GDB無法運行程序

我有這個簡單的測試程序在這裏:

#include <iostream> 

int main() 
{ 
    return 0; 
} 

,但是當我嘗試正常運行它,它會創建一個STACKDUMP。

Stack trace: 
Frame  Function Args 
00CBC498 6101D93A (00000198, 0000EA60, 000000A4, 00CBC508) 
00CBC5C8 610E2F3F (00000000, 60FC04E8, 00CBC658, 7794ABEE) 

但是,當我嘗試在GDB中運行它時,它顯然不能這樣做。

gdb: unknown target exception 0x406d1388 at 0x778edae8 

Program received signal ?, Unknown signal. 
0x778edae8 in RaiseException() 
    from /cygdrive/c/WINDOWS/SYSTEM32/KERNELBASE.dll 
(gdb) n 
Single stepping until exit from function RaiseException, 
which has no line number information. 
[Thread 14880.0x11ac exited with code 1080890248] 
[Thread 14880.0x3fd8 exited with code 1080890248] 
[Thread 14880.0x3b24 exited with code 1080890248] 
[Inferior 1 (process 14880) exited with code 010033211610] 

這是我的編譯器的設置方式:

g++ -g -std=c++1y -Wall -c main.cpp -o main.o main.cpp compiled... 
g++ -g -std=c++1y -Wall -o a main.o Successfully compiled! 

任何想法,以我在做什麼錯在這裏? 我使用的平臺是Windows,我使用Cygwin作爲我的開發環境。

OF NOTE:無論我在main.cpp中有什麼,我仍會得到上述的GDB錯誤。

另外值得注意的是:這是在a.exe的可執行文件的其他文件:

我以往需要cygboost_filesystem.dll得到boost_filesystem工作,我需要libgcc_s_sjlj-1.dlllibstdc++6,因爲它不會沒有他們的工作。

+0

如果刪除函數體只是返回0會怎樣? – 4pie0

+0

@where_is_tftp沒有骰子 - 它仍然給出相同的結果。 – Zanaran

+0

,如果刪除了boost include和namespace definition,並且只留下#include int main() { return 0; } – 4pie0

回答

相關問題