久久久久久久视色,久久电影免费精品,中文亚洲欧美乱码在线观看,在线免费播放AV片

<center id="vfaef"><input id="vfaef"><table id="vfaef"></table></input></center>

    <p id="vfaef"><kbd id="vfaef"></kbd></p>

    
    
    <pre id="vfaef"><u id="vfaef"></u></pre>

      <thead id="vfaef"><input id="vfaef"></input></thead>

    1. 站長(zhǎng)資訊網(wǎng)
      最全最豐富的資訊網(wǎng)站

      使用什么調(diào)試swoole程序

      使用什么調(diào)試swoole程序

      使用什么調(diào)試swoole程序

      可以使用GDB調(diào)試swoole程序。gdb是GNU debugger的縮寫(xiě),是編程調(diào)試工具。

      gdb的功能:

      1. 啟動(dòng)程序,可以按照用戶自定義的要求隨心所欲的運(yùn)行程序。

      2. 可讓被調(diào)試的程序在用戶所指定的調(diào)試斷點(diǎn)處停?。〝帱c(diǎn)可以是條件表達(dá)式)。

      3. 當(dāng)程序停住時(shí),可以檢查此時(shí)程序中所發(fā)生的事。比如,可以打印變量的值。

      4. 動(dòng)態(tài)改變變量程序的執(zhí)行環(huán)境。

      推薦學(xué)習(xí): swoole教程

      使用gdb調(diào)試swoole的方法:

      進(jìn)入gdb

      gdb php test.php

      gdbinit

      (gdb) source /path/to/swoole-src/gdbinit

      設(shè)置斷點(diǎn)

      例如co::sleep函數(shù)

      (gdb) b zim_swoole_coroutine_util_sleep

      打印當(dāng)前進(jìn)展的所有協(xié)程和狀態(tài)

      (gdb) co_list  coroutine 1 SW_CORO_YIELD coroutine 2 SW_CORO_RUNNING

      打印當(dāng)前運(yùn)行時(shí)協(xié)程的調(diào)用棧

      (gdb) co_bt  coroutine cid:[2] [0x7ffff148a100] SwooleCoroutine->sleep(0.500000) [internal function] [0x7ffff148a0a0] {closure}() /home/shiguangqi/php/swoole-src/examples/coroutine/exception/test.php:7  [0x7ffff141e0c0] go(object[0x7ffff141e110]) [internal function] [0x7ffff141e030] (main) /home/shiguangqi/php/swoole-src/examples/coroutine/exception/test.php:10

      打印指定協(xié)程id的調(diào)用棧

      (gdb) co_bt 1 [0x7ffff1487100] SwooleCoroutine->sleep(0.500000) [internal function] [0x7ffff14870a0] {closure}() /home/shiguangqi/php/swoole-src/examples/coroutine/exception/test.php:3  [0x7ffff141e0c0] go(object[0x7ffff141e110]) [internal function] [0x7ffff141e030] (main) /home/shiguangqi/php/swoole-src/examples/coroutine/exception/test.php:10

      打印串聯(lián)協(xié)程的狀態(tài)

      (gdb) co_status       stack_size: 2097152      call_stack_size: 1      active: 1      coro_num: 2      max_coro_num: 3000      peak_coro_num: 2

      贊(0)
      分享到: 更多 (0)
      ?
      網(wǎng)站地圖   滬ICP備18035694號(hào)-2    滬公網(wǎng)安備31011702889846號(hào)