<rt id="bn8ez"></rt>
<label id="bn8ez"></label>

  • <span id="bn8ez"></span>

    <label id="bn8ez"><meter id="bn8ez"></meter></label>

    JUST DO IT ~

    我只想當個程序員

    2015年4月12日

         摘要: 檢查宏定義
    WIN32
    _DEBUG
    _WINDOWS
    _USRDLL  閱讀全文
    posted @ 2017-08-16 10:43 小高 閱讀(402) | 評論 (0)編輯 收藏

    GDB筆記

    概覽

    基礎(chǔ)

    用戶態(tài)會話

    調(diào)試模式

    • 轉(zhuǎn)儲文件調(diào)試

      瞬間靜態(tài)分析,進程死狀態(tài)。
      gdb –core=file

    • 交互調(diào)試

      1. 調(diào)試新進程
        gdb exe
        gdb –args exe [args]

      2. 調(diào)試已經(jīng)運行的進程
        gdb –pid= 進程號

      3. 內(nèi)核調(diào)試

    3種調(diào)試已有進程

    gdb exe

    .

    gdb –args exe [args]

    .

    gdb
    file exe
    run [args]

    .

    gdb –args gcc a.c -o a

    命令行參數(shù)

    show args

    set args 多次運行設(shè)置命令行參數(shù)

    環(huán)境變量和執(zhí)行路徑

    path directory

    .

    show paths

    .

    show environment [varname]

    .

    set environment varname[=value] 清除或者設(shè)置環(huán)境變量

    工作目錄

    繼承進入gdb工作目錄

    改變工作目錄

    cd dirctory

    顯示路徑

    pwd

    輸入輸出

    info terminal
    run > a.txt
    tty /dev/ttyb

    遠程調(diào)試可用這些輔助。

    inferior 下層 多個進程調(diào)試

    inferior gdb維護的一系列對象,每個inf對應(yīng)一個調(diào)試目標進程。

    info inferior 顯示下層信息
    NULL 程序沒有跑或者已經(jīng)終止
    clone-inferior -copies 2 復(fù)制當前下層2份

    (gdb) info inferiors
    Num Description Executable
    * 1 process 10087 /home/gao/code/a
    (gdb) clone-inferior -copies 2
    Added inferior 2.
    Added inferior 3.
    (gdb) info inferiors
    Num Description Executable
    3 程序沒有跑或者已經(jīng)終止 /home/gao/code/a
    2 /home/gao/code/a
    * 1 process 10087 /home/gao/code/a
    (gdb)

    切換下程

    inferior 2 切換2這個下程。
    進程號是0,沒開始運行。
    run 運行起來。

    .

    增加一個運行下層

    add-inferior -exec executeable 增加一個運行下層
    比如說調(diào)試一個服務(wù)端程序,一個客戶端程序。

    remove-inferior n 刪掉一個下層
    detach inferior 繼續(xù)運行 quit
    kill inferior 調(diào)試進程退了,但是inferior紀錄還在。

    Tab 幫助

    (gdb) remove-
    remove-inferiors remove-symbol-file
    (gdb) remove-
    remove-inferiors remove-symbol-file
    (gdb) remove-

    file 命令

    file a.exe 可自行文件和符號文件是一個文件

    可自行文件和符號文件分開

    exec-file 指定目標文件

    .

    symbol-file 指定符號文件

    run 開始運行
    可以支持 run > >> < 重定向

    set args 清理命令行參數(shù)

    附加到進程

    gdb –pid= pid

    attach pid

    終止調(diào)試進程

    detach pid 分離進程繼續(xù)運行

    .

    quit 進程退出

    .

    q
    ctrl + D

    執(zhí)行控制

    斷點

    軟件斷點

    break 普通
    tbreak 一次性
    rbreak 正則表達式一批斷點

    • 基于cpu斷點指令,x86 int3機器碼0xcc。
    • 替換斷點位置的指令
    • CPU自執(zhí)行這里觸發(fā)斷點異常。
    • 沒有斷點數(shù)量限制。

    硬件斷點

    • 基于cpu調(diào)試寄存器,dr0~dr7,數(shù)量限制。x86可以設(shè)定4個斷點。數(shù)量限制。
    • 不修改代碼,在只讀內(nèi)存上設(shè)置斷點。EEPROM上的代碼設(shè)置。
    • 有數(shù)量限制。

    location

    • linespec

    1. 行號
    2. -/+ 偏移
    3. 文件名 :行號
    4. 函數(shù)名
    5. 函數(shù):標號
    6. 文件名:函數(shù)
    7. 標號

    • explicit

    1. -source linename
    2. -function function
    3. -label label
    4. -line number

    • address location break * address

    實踐

    file banner
    b main 中斷在main函數(shù)
    info funciton useage 顯示useage函數(shù)地址
    info *0x88888e4 直接寫地址設(shè)定斷點
    info b 顯示所有斷點
    list usage 顯示useage函數(shù)
    b line.c:11
    b +2 當前顯示到14行+2行所以設(shè)定在17行

    虛擬機設(shè)定硬件斷點會失敗.
    (gdb)hbreak hd_ioctl
    (gdb) info b
    物理機可以設(shè)定.

    (gdb) hbreak v
    Hardware assisted breakpoint 2 at 0x40053a: v. (2 locations)
    (gdb) info b
    Num Type Disp Enb Address What
    1 breakpoint keep y
    breakpoint already hit 1 time
    1.1 y 0x000000000040054f in main at a.c:10 inf 1
    1.2 y 0x000000000040054f in main at a.c:10 inf 2
    2 hw breakpoint keep y
    2.1 y 0x000000000040053a in v at a.c:4 inf 1
    2.2 y 0x000000000040053a in v at a.c:4 inf 2
    (gdb)

    管理斷點

    info b 顯示斷點
    delete 1 刪除
    disable 1
    enable 1
    delete 刪除所有的斷點
    clear sum 刪除sum函數(shù)入口的所有斷點

    擴展斷點

    watchpoint 監(jiān)視一個表達式,值變化中斷。

    watch a*b+c/d
    watch *( int * )

    watch fd 監(jiān)控局部變量fd
    c 繼續(xù)運行
    info b //
    注意,x86硬件調(diào)試,寫操作,執(zhí)行過這一行,gdb顯示下一行,要看上一行。hw watchpoint,在x86平臺wachtpoint基于硬件實現(xiàn),其他平臺可能是基于軟件實現(xiàn)。 vc6純軟件執(zhí)行,執(zhí)行目標速度低。
    執(zhí)行位置超過當前區(qū)域,無效監(jiān)視點會被刪除。

    訪問監(jiān)視點
    rwatch 讀停下來。
    awatch 讀或?qū)懲O聛怼?awatch fd
    watch -l

    b hd_ioctl thread 1

    info threads 帶* 當前線程

    繁忙函數(shù)解決方案

    b hd_ioctl thread 1 if fd > 0

    當斷點,斷了后執(zhí)行命令
    ()command 12
    ()silent
    ()print “fd is %d\n”,fd
    ()continue
    ()end

    動態(tài)ping不修改代碼。

    tracepoint 遠程主機通訊調(diào)試,前端stub立刻恢復(fù)執(zhí)行,但會記錄下來。

    catchpoint

    執(zhí)行控制

    進入子函數(shù)內(nèi)部。單步 step

    匯編 stepi

    stepi 4
    類似nexti

    不要進入子函數(shù)

    next

    繼續(xù)執(zhí)行

    continue

    跑起來直到3號斷點命中

    until 3
    跑起來直到3號斷點命中,快捷禁止其他斷點。

    恢復(fù)執(zhí)行直到函數(shù)返回。

    finish

    調(diào)用函數(shù)!

    gdb 杜撰代碼調(diào)用函數(shù)。
    call sum(1,2) …

    強制返回

    強制main函數(shù) return。
    return 1

    觸發(fā)中斷

    異常或斷點進入調(diào)試器。
    調(diào)試器發(fā)起中斷,讓程序中斷下來。ctrl+C,app收到中斷信號,進入調(diào)試器。

    符號

    調(diào)試器讀區(qū) 調(diào)試符號。

    二進制-調(diào)試符號-源碼

    linux dwarf 存儲調(diào)試符號信息。gcc

    readelf -h filename
    里面如果有l(wèi)ine location debug標示

    readelf -w 導(dǎo)出調(diào)試文件

    gcc -g 才能輸出符號

    ubuntu 符號服務(wù)器
    < ddebs.ubuntu.com/pool/main/>
    分離操作
    strip

    安裝ubunte的linux 內(nèi)核符號
    https://askubuntu.com/questions/197016/how-to-install-a-package-that-contains-ubuntu-kernel-debug-symbols

    安裝libc符號

    dpkg -s /lib/x86_64-linux-gun/libc-2.15.so
    dpkg -s libc.so.6
    sudo apt-get -c aptproxy.conf install libc6-dbg

    libc 調(diào)試符號

    sudo apt-get install libc6-dbg

    符號路徑

    gdb 使用file 或 symbol-file 加載符號文件
    自動搜索 path 路徑

    (gdb)i share
    * 共享庫沒調(diào)試信息

    搜索符號
    info vaiables regex 類名/函數(shù)名/變量名

    內(nèi)存地址與符號互換

    info addriess 函數(shù)名

    info symbol 地址

    (gdb) info address main
    Symbol “main” is a function at address 0x400547.
    (gdb) info symbol 0x400547
    main in section .text of /home/gao/code/a

    .

    info os

    查看加載的文件內(nèi)存位置

    info files

    列出全局變量

    info variable
    info va

    顯示源碼

    list
    list -
    dir 源碼路徑
    show dir

    常用命令源碼

    安裝系統(tǒng)工具源碼和調(diào)試

    apt-get source coreutils
    sudo apt-get install coreutils-dbgsym
    gdb /bin/ls
    list main
    dir ~/src/coreutils-7.4/src
    list main

    libc

    sudo apt-get source libc6-dev
    /home/ge/eglibc-2.15

    dir 搜索路徑 :分割
    $cdir 編譯路徑
    cwd 當前工作路徑

    查看調(diào)試目標

    觀察寄存器
    info reg


    子函數(shù)返回地址
    函數(shù)參數(shù)
    局部變量

    bt n 觀察函數(shù)返回地址
    frame n 切換棧幀
    up n
    down n
    info frame [address]
    info args
    info locals

    注意,切換棧幀之后可能會發(fā)生,本地變量值不準確,因為值存在寄存器中需要小心。

    觀察內(nèi)存
    print

    p /f 表達式 表達式要打印位置
    xduotcf

    x

    x /Nuf
    N 打印幾個單元
    u 每個單元大小 b-1byte w-2byte h-4byte g-8byte

    f s字符串i指令格式

    x/s 0xfffff81946000 打印字符串

    x /32bx arg bit 16禁制

    (gdb) x /32bx &i
    0x7fffffffc76c: 0x01 0x00 0x00 0x00 0x70 0x05 0x40 0x00
    0x7fffffffc774: 0x00 0x00 0x00 0x00 0x40 0xfa 0xa2 0xf7
    0x7fffffffc77c: 0xff 0x7f 0x00 0x00 0x58 0xc8 0xff 0xff
    0x7fffffffc784: 0xff 0x7f 0x00 0x00 0x58 0xc8 0xff 0xff
    (gdb)

    p arg[0]
    p arg[i]

    p *&a[0]@10 a0數(shù)組開始的10個元素

    反匯編

    disas main main反匯編代碼
    x/5i schedule 這個地址開始的5條匯編指令。

    gdb mov 從左往右賦值at&t匯編。

    高級技巧

    信號

    • info signals 異常/同步/中斷

    stop 要不要中斷下來看
    printf 打印信息
    pass 要不要傳遞給應(yīng)用程序。

    • handle 修改規(guī)則 handle signal act print noprint stop nostop pass nopass

    handle SIGPIPE 不要中斷下來,打印一個信息,網(wǎng)絡(luò)程序常用

    (gdb) handle SIGPIPE nostop
    Signal Stop Print Pass to program Description
    SIGPIPE No Yes Yes Broken pipe

    Thread

    info threads

    LWP-light weight process 線程編號。
    * gdb當前線程

    切換當前線程

    thread 2

    打印所有線程

    thread apply all bt 針對一群線程的命令避免切換來看。

    線程改名字

    thread name [name]

    我自己經(jīng)驗 LWP 可以很好的觀察線程負載情況。

    posted @ 2017-05-24 14:18 小高 閱讀(316) | 評論 (0)編輯 收藏
         摘要: 繪圖控件重繪->其他操作->繪圖控件重繪

    進入了這樣一個死循環(huán),函數(shù)堆棧空間分配不足夠.  閱讀全文
    posted @ 2017-04-18 10:32 小高 閱讀(168) | 評論 (0)編輯 收藏
    eclipse 配置遇到 object 找不到問題 ?
    The type java.lang.object cannot be resolved - Eclipse buildpath not working

    因為替換了 jvm版本.
    解決辦法: 
    build->library -> add library->add jre library.


    tomcat部署問題.?
    1.清理 部署 重啟.  
    2.先刪掉部署項目,可以重新配置config.

    tomcat 找不到oracle 驅(qū)動程序?
    Tomcat error: java.sql.SQLException: No suitable driver found for jdbc
    catalina_home/lib 中已經(jīng)放入了jar文件后還是報錯.
    請在 context.xml 中配置
     <WatchedResource>WEB-INF/web.xml</WatchedResource>
     <ResourceLink global="jdbc/oracle" name="jdbc/oracle" type="javax.sql.DataSource"/>
     
    在 server.xml

           <Resource
            name="jdbc/oracle"
            auth="Container"
            type="javax.sql.DataSource"
            maxActive="100" maxIdle="30" maxWait="10000"
            driverClassName="oracle.jdbc.OracleDriver"
            url="jdbc:oracle:thin:@10.243.140.111:1521:test"
            username="core"
            password="core"/>

    eclipse 項目屬性, web deployment assembly設(shè)置   source: /webcontent   deploypath: / 


        
    tomcat 開啟gzip壓縮
    http://blog.csdn.net/hbcui1984/article/details/5666327



    Setting property 'source' to 'org.eclipse.jst.jee.server 這個不是問題.

    解決Setting property 'source' to 'org.eclipse.jst.jee.server的問題.
    http://blog.csdn.net/foreversilent/article/details/11147847

    posted @ 2017-03-09 10:02 小高 閱讀(194) | 評論 (1)編輯 收藏
         摘要:   閱讀全文
    posted @ 2016-12-15 09:34 小高 閱讀(500) | 評論 (0)編輯 收藏
         摘要: qt ubuntu 安裝和中文  閱讀全文
    posted @ 2016-12-01 16:30 小高 閱讀(341) | 評論 (0)編輯 收藏
         摘要:   閱讀全文
    posted @ 2016-05-13 15:59 小高 閱讀(234) | 評論 (0)編輯 收藏
         摘要:   閱讀全文
    posted @ 2015-12-27 17:07 小高 閱讀(491) | 評論 (0)編輯 收藏
         摘要:   閱讀全文
    posted @ 2015-12-15 15:57 小高 閱讀(270) | 評論 (0)編輯 收藏
         摘要: 解決socket 太多問題.  閱讀全文
    posted @ 2015-12-10 10:39 小高 閱讀(321) | 評論 (0)編輯 收藏

    C面向?qū)ο缶幊虆R集

    參考資料:
    Object-oriented Programming with ANSI-C
    1993年,第一份c如何編寫OO的資料,free.
    OOC.PDF
    https://www.cs.rit.edu/~ats/books/ooc.pdf

    中文翻譯:
    https://code.google.com/p/ooc/downloads/detail?name=ooc-translate-preview-r26.pdf&can=2&q=

    輕量級的C語言面向?qū)ο缶幊炭蚣?br/> http://sinojelly.blog.51cto.com/479153/281184

    UML—OOPC嵌入式C語言開發(fā)精講
    里面有一套框架可以 c寫OO.
    http://pan.baidu.com/share/link?shareid=3402978666&uk=3188261067&adapt=pc&fr=ftw#path=%252FC%25E8%25AF%25AD%25E8%25A8%2580

    你試過這樣寫C程序嗎 --函數(shù)式編程
    < >

    我所偏愛的 C 語言面向?qū)ο缶幊谭妒剑骑L(fēng)
    http://blog.codingnow.com/2010/03/object_oriented_programming_in_c.html

    C語言面向?qū)ο缶幊?-- 6篇專欄
    http://blog.csdn.net/column/details/object-orient-c.html

    posted @ 2015-11-24 23:32 小高 閱讀(418) | 評論 (0)編輯 收藏

    測試代碼的locality。
    數(shù)組的讀區(qū)方式不同,按照行讀,被cache也是按行連續(xù)加載的。
    如果按照列讀區(qū),那么效率很低,除非cache足夠大,而且也要遍歷所有的數(shù)據(jù),并且cache hash算法也好,實現(xiàn)的硬件還是多路組相聯(lián)的cache硬件實現(xiàn)。

    ** valgrind --tool=cachegrind ./test2**

    code1:

    #include <stdio.h>
    #define MAXROW 8000
    #define MAXCOL 8000
    int main () {
    int i,j;
     static int x[MAXROW][MAXCOL];
     printf ("Starting!\n");
           for (i=0;i<MAXROW;i++)
           for (j=0;j<MAXCOL;j++)
                  x[i][j] = i*j;
                 printf("Completed!\n");
    return 0;                                                    
     }
    

    code2:

    #include <stdio.h>                                                         
     #define MAXROW 8000
     #define MAXCOL 8000
     int main () {
     int i,j;
     static int x[MAXROW][MAXCOL];
     printf ("Starting!\n");
              for (j=0;j<MAXCOL;j++)
                             for (i=0;i<MAXROW;i++)
                     x[i][j] = i*j;
     printf("Completed!\n");
     return 0;
     }
     ```
    
    ##結(jié)果
    
    

    Command: ./test1
    Starting!
    Completed!

    I refs: 905,721,688
    I1 misses: 4,177
    LLi misses: 2,808
    I1 miss rate: 0.00%
    LLi miss rate: 0.00%

    D refs: 514,830,867 (386,118,735 rd + 128,712,132 wr)
    D1 misses: 4,025,828 ( 23,565 rd + 4,002,263 wr)
    LLd misses: 4,008,456 ( 6,997 rd + 4,001,459 wr)

    D1 miss rate: 0.8% ( 0.0% + 3.1% )
    LLd miss rate: 0.8% ( 0.0% + 3.1% )

    LL refs: 4,030,005 ( 27,742 rd + 4,002,263 wr)
    LL misses: 4,011,264 ( 9,805 rd + 4,001,459 wr)
    LL miss rate: 0.3% ( 0.0% + 3.1% )

    gcc -o test2 test2.c
    ** valgrind --tool=cachegrind ./test2**

    I refs: 905,720,801
    I1 misses: 4,113
    LLi misses: 2,811
    I1 miss rate: 0.00%
    LLi miss rate: 0.00%

    D refs: 514,830,348 (386,118,427 rd + 128,711,921 wr)
    D1 misses: 64,025,705 ( 23,462 rd + 64,002,243 wr)
    LLd misses: 4,016,427 ( 6,977 rd + 4,009,450 wr)
    D1 miss rate: 12.4% ( 0.0% + 49.7% )
    LLd miss rate: 0.8% ( 0.0% + 3.1% )

    LL refs: 64,029,818 ( 27,575 rd + 64,002,243 wr)
    LL misses: 4,019,238 ( 9,788 rd + 4,009,450 wr)
    LL miss rate: 0.3% ( 0.0% + 3.1% )

    Starting!
    Completed!
    ```

    參考:

    valgrind調(diào)試CPU緩存命中率和內(nèi)存泄漏
    http://laoxu.blog.51cto.com/4120547/1395236

    posted @ 2015-11-15 22:20 小高 閱讀(274) | 評論 (0)編輯 收藏
         摘要:   閱讀全文
    posted @ 2015-09-23 11:26 小高 閱讀(239) | 評論 (0)編輯 收藏
         摘要: <未完成>
    容錯系統(tǒng)的研究.
    豆瓣可以搜索幾本書.  閱讀全文
    posted @ 2015-09-16 14:05 小高 閱讀(240) | 評論 (0)編輯 收藏
         摘要: 未完成.  閱讀全文
    posted @ 2015-08-26 14:49 小高 閱讀(305) | 評論 (0)編輯 收藏
         摘要:   閱讀全文
    posted @ 2015-08-26 14:41 小高 閱讀(317) | 評論 (0)編輯 收藏
         摘要: 待學(xué).  閱讀全文
    posted @ 2015-08-26 13:33 小高 閱讀(316) | 評論 (0)編輯 收藏
         摘要:   閱讀全文
    posted @ 2015-08-26 10:53 小高 閱讀(289) | 評論 (0)編輯 收藏
         摘要: wget https://raw.github.com/trapd00r/LS_COLORS/master/LS_COLORS -O $HOME/.dircolors
    echo 'eval $(dircolors -b $HOME/.dircolors)' >> $HOME/.bashrc
    . $HOME/.bashrc   閱讀全文
    posted @ 2015-08-25 16:26 小高 閱讀(1804) | 評論 (0)編輯 收藏
         摘要: 未完成.  閱讀全文
    posted @ 2015-08-25 15:38 小高 閱讀(245) | 評論 (0)編輯 收藏
         摘要:   閱讀全文
    posted @ 2015-08-25 13:42 小高 閱讀(828) | 評論 (0)編輯 收藏
         摘要: typedef struct AA
    {
    AA * ptr;
    }AA ;  閱讀全文
    posted @ 2015-08-24 13:57 小高 閱讀(4591) | 評論 (0)編輯 收藏
         摘要: sysctl.conf  閱讀全文
    posted @ 2015-08-20 18:24 小高 閱讀(333) | 評論 (0)編輯 收藏
         摘要:   閱讀全文
    posted @ 2015-08-13 10:10 小高 閱讀(221) | 評論 (0)編輯 收藏
         摘要: 未完成.  閱讀全文
    posted @ 2015-08-02 12:12 小高 閱讀(221) | 評論 (0)編輯 收藏
         摘要:   閱讀全文
    posted @ 2015-07-28 16:51 小高 閱讀(245) | 評論 (0)編輯 收藏
         摘要: EXEC sp_configure 'remote query timeout', 0 ;
    GO
    RECONFIGURE ;
    GO  閱讀全文
    posted @ 2015-07-28 13:54 小高 閱讀(267) | 評論 (0)編輯 收藏
         摘要: ldd -r aa.so   閱讀全文
    posted @ 2015-07-26 18:08 小高 閱讀(420) | 評論 (0)編輯 收藏
         摘要:   閱讀全文
    posted @ 2015-07-23 22:18 小高 閱讀(300) | 評論 (0)編輯 收藏
         摘要: 未完成.  閱讀全文
    posted @ 2015-07-21 13:20 小高 閱讀(233) | 評論 (0)編輯 收藏
         摘要: 1. 用戶提交
    2. 有1/3重做日志緩沖區(qū)未被寫入磁盤
    3. 有大于1M的重做日志緩沖區(qū)未被寫入磁盤
    4. 每隔3 秒鐘
    5. DBWR 需要寫入的數(shù)據(jù)的SCN大于LGWR記錄的SCN,DBWR 觸發(fā)LGWR寫入。   閱讀全文
    posted @ 2015-07-20 16:24 小高 閱讀(834) | 評論 (0)編輯 收藏
         摘要:   閱讀全文
    posted @ 2015-07-19 23:11 小高 閱讀(498) | 評論 (0)編輯 收藏
         摘要: 待完成.  閱讀全文
    posted @ 2015-07-19 23:00 小高 閱讀(359) | 評論 (0)編輯 收藏
         摘要:   閱讀全文
    posted @ 2015-07-19 22:40 小高 閱讀(486) | 評論 (0)編輯 收藏
         摘要:   閱讀全文
    posted @ 2015-07-19 16:26 小高 閱讀(252) | 評論 (0)編輯 收藏
         摘要: time dd if=/dev/zero bs=1024 count=1000000 of=./1Gb.file
    dd if=./1Gb.file bs=64k |dd of=/dev/null
    dd if=./1Gb.file bs=1MB |dd of=/dev/null  閱讀全文
    posted @ 2015-07-19 12:12 小高 閱讀(512) | 評論 (0)編輯 收藏
         摘要: mac為什么主機名.local
    搞不清楚為什么.也許區(qū)分本地網(wǎng)絡(luò),進程間通訊優(yōu)化? 為了程序方便 /ect/hosts 添加127.0.0.1 指向主機名.
    sudo vim /etc/hosts   閱讀全文
    posted @ 2015-07-19 10:59 小高 閱讀(914) | 評論 (0)編輯 收藏
         摘要:   閱讀全文
    posted @ 2015-07-17 23:12 小高 閱讀(2252) | 評論 (0)編輯 收藏
         摘要: 未完成.  閱讀全文
    posted @ 2015-07-17 21:34 小高 閱讀(278) | 評論 (0)編輯 收藏
         摘要:   閱讀全文
    posted @ 2015-07-12 10:49 小高 閱讀(206) | 評論 (0)編輯 收藏
         摘要: 待完成.  閱讀全文
    posted @ 2015-07-12 09:27 小高 閱讀(338) | 評論 (0)編輯 收藏
         摘要: 待完成.  閱讀全文
    posted @ 2015-07-12 00:32 小高 閱讀(202) | 評論 (0)編輯 收藏
         摘要: 待完成.  閱讀全文
    posted @ 2015-07-12 00:27 小高 閱讀(345) | 評論 (0)編輯 收藏
         摘要: 待完成  閱讀全文
    posted @ 2015-07-12 00:17 小高 閱讀(330) | 評論 (0)編輯 收藏
         摘要: 待完成.  閱讀全文
    posted @ 2015-07-12 00:13 小高 閱讀(202) | 評論 (0)編輯 收藏
         摘要:   閱讀全文
    posted @ 2015-07-10 16:45 小高 閱讀(324) | 評論 (0)編輯 收藏
         摘要:   閱讀全文
    posted @ 2015-07-10 15:39 小高 閱讀(217) | 評論 (0)編輯 收藏
         摘要:   閱讀全文
    posted @ 2015-07-07 09:53 小高 閱讀(1003) | 評論 (0)編輯 收藏
         摘要:   閱讀全文
    posted @ 2015-07-06 15:20 小高 閱讀(213) | 評論 (0)編輯 收藏
         摘要:   閱讀全文
    posted @ 2015-07-06 15:13 小高 閱讀(302) | 評論 (0)編輯 收藏
         摘要:   閱讀全文
    posted @ 2015-07-06 15:08 小高 閱讀(252) | 評論 (0)編輯 收藏
         摘要:   閱讀全文
    posted @ 2015-07-06 14:39 小高 閱讀(216) | 評論 (0)編輯 收藏
         摘要:   閱讀全文
    posted @ 2015-07-06 14:39 小高 閱讀(163) | 評論 (0)編輯 收藏
         摘要:   閱讀全文
    posted @ 2015-07-06 14:36 小高 閱讀(267) | 評論 (0)編輯 收藏
         摘要:   閱讀全文
    posted @ 2015-07-06 14:09 小高 閱讀(488) | 評論 (0)編輯 收藏
         摘要: #ifdef WIN32
    WSADATA wsa_data;
    WSAStartup(0x0201, &wsa_data);
    #endif  閱讀全文
    posted @ 2015-07-06 12:33 小高 閱讀(882) | 評論 (0)編輯 收藏
         摘要: 待填坑.  閱讀全文
    posted @ 2015-07-01 13:52 小高 閱讀(282) | 評論 (0)編輯 收藏
         摘要: 在windows上編譯openssl 和 libevent.
    libevent-2.0.22-stable
    openssl-1.0.2c   閱讀全文
    posted @ 2015-07-01 10:36 小高 閱讀(2589) | 評論 (0)編輯 收藏
    libevent windows構(gòu)建
    warning LNK4098: 默認庫“LIBCMT”與其他庫的使用沖突
    問題原因:
    exe 是debug版本.
    靜態(tài)庫是release版本.
    編譯libevent 
    C:\dev\mylibevent\libevent-2.0.22-stable>nmake /f Makefile.nmake

    原來的修改 relase 版本多線程靜態(tài)庫  CFLAGS=    /MT

    編譯的時候需要配置合適的線程庫 

    拷貝出一個Makefile_D.nmake  多線程debug靜態(tài)庫
    CFLAGS= ....    /MTd

    工程中鏈接對應(yīng)的版本的lib文件.

    參考: 

    https://msdn.microsoft.com/zh-cn/library/vstudio/abx4dbyh(v=vs.110).aspx

    http://www.cnblogs.com/luxiaoxun/p/3603399.html
    http://zyan.cc/libevent_windows/

    posted @ 2015-06-30 11:21 小高 閱讀(508) | 評論 (0)編輯 收藏
         摘要:   閱讀全文
    posted @ 2015-06-30 10:05 小高 閱讀(281) | 評論 (0)編輯 收藏
         摘要:   閱讀全文
    posted @ 2015-06-29 14:48 小高 閱讀(255) | 評論 (0)編輯 收藏
         摘要: 高性能Linux服務(wù)器構(gòu)建實戰(zhàn):運維監(jiān)控、性能調(diào)優(yōu)與集群應(yīng)用

    構(gòu)建高可用Linux服務(wù)器 2  閱讀全文
    posted @ 2015-06-28 20:37 小高 閱讀(238) | 評論 (0)編輯 收藏
         摘要:   閱讀全文
    posted @ 2015-06-23 14:42 小高 閱讀(223) | 評論 (0)編輯 收藏
         摘要:   閱讀全文
    posted @ 2015-06-23 14:39 小高 閱讀(396) | 評論 (0)編輯 收藏
         摘要:   閱讀全文
    posted @ 2015-06-22 22:23 小高 閱讀(293) | 評論 (0)編輯 收藏
         摘要:   閱讀全文
    posted @ 2015-06-22 21:21 小高 閱讀(328) | 評論 (0)編輯 收藏
         摘要:   閱讀全文
    posted @ 2015-06-22 15:21 小高 閱讀(312) | 評論 (0)編輯 收藏
         摘要:   閱讀全文
    posted @ 2015-06-21 14:28 小高 閱讀(236) | 評論 (0)編輯 收藏
         摘要:   閱讀全文
    posted @ 2015-06-21 12:15 小高 閱讀(218) | 評論 (0)編輯 收藏
         摘要:   閱讀全文
    posted @ 2015-06-21 11:54 小高 閱讀(252) | 評論 (0)編輯 收藏
         摘要:   閱讀全文
    posted @ 2015-06-19 18:03 小高 閱讀(274) | 評論 (0)編輯 收藏
         摘要:   閱讀全文
    posted @ 2015-06-18 10:28 小高 閱讀(559) | 評論 (0)編輯 收藏
         摘要: 1.網(wǎng)絡(luò)io文件大小未定,作為類庫的設(shè)計者.
    小文件太多,不好.IO性能差.
    單個文件太大,如果都用memorybuffer,內(nèi)存占用會非常的大.
    設(shè)計者考慮2邊的靈活性.  閱讀全文
    posted @ 2015-06-17 21:12 小高 閱讀(294) | 評論 (0)編輯 收藏
         摘要: 8.8.8.8
    114.114.114.114
    223.5.5.5
    223.6.6.6  閱讀全文
    posted @ 2015-06-16 17:00 小高 閱讀(244) | 評論 (0)編輯 收藏
         摘要: xee下載地址
    https://code.google.com/p/xee/downloads/detail?name=Xee2.2.zip&can=1&q=
    自己開了一個分支
    https://github.com/gddg/xee   閱讀全文
    posted @ 2015-06-16 16:34 小高 閱讀(1034) | 評論 (0)編輯 收藏
         摘要:   閱讀全文
    posted @ 2015-06-08 14:41 小高 閱讀(302) | 評論 (0)編輯 收藏
         摘要: 0.1000M 網(wǎng)絡(luò).
    1.8口交換機
    2.支持vlan
    3.支持Qos
    4.支持端口聚合.
    Cisco SG200-08
    5.POE 通過網(wǎng)線供電給USB CAM 功能.
      閱讀全文
    posted @ 2015-06-06 16:54 小高 閱讀(313) | 評論 (0)編輯 收藏
         摘要:   閱讀全文
    posted @ 2015-05-29 18:16 小高 閱讀(224) | 評論 (0)編輯 收藏
         摘要:   閱讀全文
    posted @ 2015-05-29 18:04 小高 閱讀(217) | 評論 (0)編輯 收藏
         摘要:   閱讀全文
    posted @ 2015-05-20 17:21 小高 閱讀(294) | 評論 (0)編輯 收藏
         摘要:   閱讀全文
    posted @ 2015-05-19 22:57 小高 閱讀(312) | 評論 (0)編輯 收藏
         摘要:   閱讀全文
    posted @ 2015-05-15 15:51 小高 閱讀(219) | 評論 (0)編輯 收藏
         摘要:   閱讀全文
    posted @ 2015-05-11 14:51 小高 閱讀(252) | 評論 (0)編輯 收藏
    Error running 'requirements_debian_libs_install gawk libreadline6-dev libssl-dev libyaml-dev libsqlite3-dev sqlite3 autoconf libgdbm-dev libncurses5-dev automake libtool',
    showing last 15 lines of /home/gao/.rvm/log/1431136216_ruby-2.2.2/package_install_gawk_libreadline6-dev_libssl-dev_libyaml-dev_libsqlite3-dev_sqlite3_autoconf_libgdbm-dev_libncurses5-dev_automake_libtool.log
    sudo:/var/lib/sudo 對非所有者可寫(040777),模式應(yīng)該為 0700
    對不起,請重試。
    正在讀取軟件包列表...
    正在分析軟件包的依賴關(guān)系樹...
    正在讀取狀態(tài)信息...
    有一些軟件包無法被安裝。如果您用的是 unstable 發(fā)行版,這也許是
    因為系統(tǒng)無法達到您要求的狀態(tài)造成的。該版本中可能會有一些您需要的軟件
    包尚未被創(chuàng)建或是它們已被從新到(Incoming)目錄移出。
    下列信息可能會對解決問題有所幫助:
    下列軟件包有未滿足的依賴關(guān)系:
     libssl-dev : 依賴: libssl1.0.0 (= 1.0.1f-1ubuntu2) 但是 1.0.1f-1ubuntu2.4 正要被安裝
    E: 無法修正錯誤,因為您要求某些軟件包保持現(xiàn)狀,就是它們破壞了軟件包間的依賴關(guān)系。
    ++ return 100
    ++ return 100

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    解決辦法? 
    posted @ 2015-05-09 09:53 小高 閱讀(2291) | 評論 (0)編輯 收藏

    Jumping Into C++ 完整英文版 
    http://vdisk.weibo.com/s/lFnhClqHrmi
    posted @ 2015-05-08 16:34 小高 閱讀(241) | 評論 (0)編輯 收藏
         摘要:   閱讀全文
    posted @ 2015-05-08 10:47 小高 閱讀(216) | 評論 (0)編輯 收藏
         摘要: http://askubuntu.com/questions/50704/sudo-error-is-mode-0777-should-be-0440
      閱讀全文
    posted @ 2015-05-07 22:48 小高 閱讀(1410) | 評論 (0)編輯 收藏
         摘要:   閱讀全文
    posted @ 2015-05-07 22:35 小高 閱讀(922) | 評論 (0)編輯 收藏
         摘要:   閱讀全文
    posted @ 2015-05-07 14:03 小高 閱讀(225) | 評論 (0)編輯 收藏
         摘要:   閱讀全文
    posted @ 2015-05-07 14:01 小高 閱讀(238) | 評論 (0)編輯 收藏
         摘要:   閱讀全文
    posted @ 2015-05-07 10:59 小高 閱讀(385) | 評論 (0)編輯 收藏
         摘要:   閱讀全文
    posted @ 2015-05-06 07:50 小高 閱讀(216) | 評論 (0)編輯 收藏
         摘要:   閱讀全文
    posted @ 2015-05-02 08:59 小高 閱讀(250) | 評論 (0)編輯 收藏
         摘要:   閱讀全文
    posted @ 2015-05-01 22:43 小高 閱讀(374) | 評論 (0)編輯 收藏
         摘要:   閱讀全文
    posted @ 2015-05-01 13:34 小高 閱讀(980) | 評論 (0)編輯 收藏
         摘要:   閱讀全文
    posted @ 2015-04-28 13:27 小高 閱讀(200) | 評論 (0)編輯 收藏
         摘要:   閱讀全文
    posted @ 2015-04-23 07:11 小高 閱讀(688) | 評論 (0)編輯 收藏
         摘要: iconv -f gb2312 -t utf-8 20150422_0.log >>a.log  閱讀全文
    posted @ 2015-04-23 07:10 小高 閱讀(258) | 評論 (0)編輯 收藏
         摘要:   閱讀全文
    posted @ 2015-04-20 18:00 小高 閱讀(199) | 評論 (0)編輯 收藏
         摘要:   閱讀全文
    posted @ 2015-04-20 14:15 小高 閱讀(385) | 評論 (0)編輯 收藏
         摘要:   閱讀全文
    posted @ 2015-04-15 16:17 小高 閱讀(254) | 評論 (0)編輯 收藏
         摘要:   閱讀全文
    posted @ 2015-04-15 14:55 小高 閱讀(301) | 評論 (0)編輯 收藏
         摘要: echo "IRB.conf[:PROMPT_MODE] = :DEFAULT" > ~/.irbrc

    echo "IRB.conf[:PROMPT_MODE] = :SIMPLE" > ~/.irbrc  閱讀全文
    posted @ 2015-04-13 21:03 小高 閱讀(180) | 評論 (0)編輯 收藏
         摘要:   閱讀全文
    posted @ 2015-04-12 21:58 小高 閱讀(183) | 評論 (0)編輯 收藏
         摘要: 非常喜歡的一篇文章.介紹了execption c# 設(shè)計思路.  閱讀全文
    posted @ 2015-04-12 11:38 小高 閱讀(231) | 評論 (0)編輯 收藏

    導(dǎo)航

    <2015年4月>
    2930311234
    567891011
    12131415161718
    19202122232425
    262728293012
    3456789

    統(tǒng)計

    常用鏈接

    留言簿(3)

    隨筆分類(352)

    收藏夾(19)

    關(guān)注的blog

    手冊

    搜索

    積分與排名

    最新評論

    閱讀排行榜

    評論排行榜

    主站蜘蛛池模板: 亚洲国产成人精品无码区花野真一| 亚洲日本一线产区和二线 | 日韩中文无码有码免费视频| 亚洲av无码不卡私人影院| 亚洲精品视频在线| 国产乱子影视频上线免费观看| 亚洲精品无码久久久久去q| 亚洲成年人电影在线观看| 一个人看的www在线免费视频| 84pao强力永久免费高清| 男人的天堂亚洲一区二区三区 | 拍拍拍无挡视频免费观看1000| 国产h视频在线观看网站免费| 亚洲第一黄色网址| 亚洲无成人网77777| 日韩电影免费在线观看网址| 91久久精品国产免费直播| 国产免费一区二区三区| 亚洲精品无码久久久久AV麻豆| 亚洲国产精品一区二区久| 成人网站免费大全日韩国产 | 亚洲日本一区二区三区在线| 亚洲中文字幕无码久久2020 | 亚洲日韩精品无码专区网址| 亚洲精品国产第一综合99久久| 日本免费久久久久久久网站| 免费在线观看日韩| 亚洲免费黄色网址| 在线毛片片免费观看| 亚洲VA综合VA国产产VA中| 亚洲乱码一二三四五六区| APP在线免费观看视频| 又黄又爽的视频免费看| 亚洲六月丁香婷婷综合| 国产精品免费大片| 亚洲熟妇av一区二区三区漫画| 男男黄GAY片免费网站WWW| 国产免费av片在线看| 亚洲精品视频观看| 日本免费中文视频| 亚洲色无码专区在线观看|