顯示具有 GDB 標籤的文章。 顯示所有文章
顯示具有 GDB 標籤的文章。 顯示所有文章

107.06.18 cygwin gdb redirection

redirection 就是透過 <、> 來操作資料流
例如
檔案 test.c:
#include <stdio.h>
int main(){
    int x;
    scanf("%d", &x);
    printf("%d", x);
    return 0;
}
編譯:
$ gcc test.c -o test

執行(使用 redirection):
$ ./test < input.txt  # integer 5 in input.txt
$ 5 # program output

107.06.18 好看的 gdb, gdb-dashboard

相信常常要與 Segmentation fault 對抗時 GDB 絕對是好夥伴
GDB 即為 GNU Debugger 的縮寫 (GNU 是 GNU's Not Unix....
而這次要介紹的是比較美觀的 GDB

^ Top