<output id="qn6qe"></output>

    1. <output id="qn6qe"><tt id="qn6qe"></tt></output>
    2. <strike id="qn6qe"></strike>

      亚洲 日本 欧洲 欧美 视频,日韩中文字幕有码av,一本一道av中文字幕无码,国产线播放免费人成视频播放,人妻少妇偷人无码视频,日夜啪啪一区二区三区,国产尤物精品自在拍视频首页,久热这里只有精品12

      調(diào)試toybox

      官網(wǎng)

      下載

      toybox-0.8.9.tar.gz

      編譯

      export CFLAGS=-g
      make
      

      調(diào)試

      $ gdb --args ./generated/unstripped/toybox ls
      
      GNU gdb (Ubuntu 10.2-0ubuntu1~20.04~1) 10.2
      Copyright (C) 2021 Free Software Foundation, Inc.
      License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
      This is free software: you are free to change and redistribute it.
      There is NO WARRANTY, to the extent permitted by law.
      Type "show copying" and "show warranty" for details.
      This GDB was configured as "x86_64-linux-gnu".
      Type "show configuration" for configuration details.
      For bug reporting instructions, please see:
      <https://www.gnu.org/software/gdb/bugs/>.
      Find the GDB manual and other documentation resources online at:
          <http://www.gnu.org/software/gdb/documentation/>.
      
      For help, type "help".
      Type "apropos word" to search for commands related to "word"...
      Reading symbols from ./generated/unstripped/toybox...
      (gdb) start
      Temporary breakpoint 1 at 0x126f0: file main.c, line 279.
      Starting program: /vol_8t/work/Perf_issue/toybox/toybox-0.8.9/generated/unstripped/toybox ls
      
      Temporary breakpoint 1, main (argc=2, argv=0x7fffffffda28) at main.c:279
      279     {
      (gdb) l
      274       }
      275       xputc('\n');
      276     }
      277
      278     int main(int argc, char *argv[])
      279     {
      280       int i;
      281
      282       for (i = 0; i < argc; i++)
      283           printf("argv[%d] = %s\n", i, argv[i]);
      (gdb)
      
      

      雜記

      以top命令為例,在toys/posix/ps.c中有關(guān)于top命名支持的參數(shù)的介紹:

      USE_TOP(NEWTOY(top, ">0O*h" "Hk*o*p*u*s#<1d%<100=3000m#n#<1bq[!oO]", TOYFLAG_USR|TOYFLAG_BIN|TOYFLAG_LOCALE))
      

      關(guān)于特殊字符的作用的介紹,參考lib/args.c:

      點(diǎn)擊查看代碼
      // Design goals:
      //   Don't use getopt() out of libc.
      //   Don't permute original arguments (screwing up ps/top output).
      //   Integrated --long options "(noshort)a(along)b(blong1)(blong2)"
      
      /* This uses a getopt-like option string, but not getopt() itself. We call
       * it the get_opt string.
       *
       * Each option in the get_opt string corresponds to a bit position in the
       * return value. The rightmost argument is (1<<0), the next to last is (1<<1)
       * and so on. If the option isn't seen in argv[], its bit remains 0.
       *
       * Options which have an argument fill in the corresponding slot in the global
       * union "this" (see generated/globals.h), which it treats as an array of longs
       * (note that sizeof(long)==sizeof(pointer) is guaranteed by LP64).
       *
       * You don't have to free the option strings, which point into the environment
       * space. List objects should be freed by main() when command_main() returns.
       *
       * Example:
       *   Calling get_optflags() when toys.which->options="ab:c:d" and
       *   argv = ["command", "-b", "fruit", "-d", "walrus"] results in:
       *
       *     Changes to struct toys:
       *       toys.optflags = 5 (I.E. 0101 so -b = 4 | -d = 1)
       *       toys.optargs[0] = "walrus" (leftover argument)
       *       toys.optargs[1] = NULL (end of list)
       *       toys.optc = 1 (there was 1 leftover argument)
       *
       *     Changes to union this:
       *       this[0]=NULL (because -c didn't get an argument this time)
       *       this[1]="fruit" (argument to -b)
       */
      
      // What you can put in a get_opt string:
      //   Any otherwise unused character (all letters, unprefixed numbers) specify
      //   an option that sets a flag. The bit value is the same as the binary digit
      //   if you string the option characters together in order.
      //   So in "abcdefgh" a = 128, h = 1
      //
      //   Suffixes specify that this option takes an argument (stored in GLOBALS):
      //       Note that pointer and long are always the same size, even on 64 bit.
      //     : string argument, keep most recent if more than one
      //     * string argument, appended to a struct arg_list linked list.
      //     # signed long argument
      //       <LOW     - die if less than LOW
      //       >HIGH    - die if greater than HIGH
      //       =DEFAULT - value if not specified
      //     - signed long argument defaulting to negative (say + for positive)
      //     . double precision floating point argument (with CFG_TOYBOX_FLOAT)
      //       Chop this option out with USE_TOYBOX_FLOAT() in option string
      //       Same <LOW>HIGH=DEFAULT as #
      //     @ occurrence counter (which is a long)
      //     % time offset in milliseconds with optional s/m/h/d suffix
      //     (longopt)
      //     | this is required. If more than one marked, only one required.
      //     ; Option's argument is optional, and must be collated: -aARG or --a=ARG
      //     ^ Stop parsing after encountering this argument
      //    " " (space char) the "plus an argument" must be separate
      //        I.E. "-j 3" not "-j3". So "kill -stop" != "kill -s top"
      //
      //   At the beginning of the get_opt string (before any options):
      //     <0 die if less than # leftover arguments (default 0)
      //     >9 die if > # leftover arguments (default MAX_INT)
      //     0 Include argv[0] in optargs
      //     ^ stop at first nonoption argument
      //     ? Pass unknown arguments through to command (implied when no flags).
      //     & first arg has imaginary dash (ala tar/ps/ar) which sets FLAGS_NODASH
      //     ~ Collate following bare longopts (as if under short opt, repeatable)
      //
      //   At the end: [groups] of previously seen options
      //     - Only one in group (switch off)    [-abc] means -ab=-b, -ba=-a, -abc=-c
      //     + Synonyms (switch on all)          [+abc] means -ab=-abc, -c=-abc
      //     ! More than one in group is error   [!abc] means -ab calls error_exit()
      //       primarily useful if you can switch things back off again.
      //
      //   You may use octal escapes with the high bit (127) set to use a control
      //   character as an option flag. For example, \300 would be the option -@
      
      // Notes from getopt man page
      //   - and -- cannot be arguments.
      //     -- force end of arguments
      //     - is a synonym for stdin in file arguments
      //   -abcd means -a -b -c -d (but if -b takes an argument, then it's -a -b cd)
      

      另外還有一定需要注意的是,上面參數(shù)的順序跟ps.c中定義的top結(jié)構(gòu)體對(duì)應(yīng)的成員變量是相反的。

          struct {
            long n, m, d, s;
            struct arg_list *u, *p, *o, *k, *O;
          } top;
      
      posted @ 2024-11-28 11:35  dolinux  閱讀(109)  評(píng)論(0)    收藏  舉報(bào)
      主站蜘蛛池模板: 日韩AV高清在线看片| 色妞www精品免费视频| 亚洲天堂av日韩精品| 色哟哟www网站入口成人学校| 337P日本欧洲亚洲大胆精品555588| 欧美熟妇乱子伦XX视频| 免费a级毛片18以上观看精品| av无码精品一区二区三区四区| 亚洲精品国产无套在线观| 四虎国产精品久久免费地址| 国产女人喷潮视频免费| 亚洲av成人无码精品电影在线| 日本精品成人一区二区三区视频| 国产成人精品无码播放| 18岁日韩内射颜射午夜久久成人| 女同亚洲精品一区二区三| 在线播放亚洲成人av| 国产精品久久久久久久久久久久| 国产呦交精品免费视频| 福利在线视频一区二区| 男人下部进女人下部视频| 视频一区二区 国产视频| 久久亚洲精品11p| 欧美18videosex性欧美黑吊| 中文字幕制服国产精品| 久久国产成人av蜜臀| 三原县| 亚洲一区二区无码影院| 亚洲精品国模一区二区| 动漫av纯肉无码av在线播放| 免费无码又爽又刺激网站直播| 337P日本欧洲亚洲大胆精品555588| 玩弄放荡人妻少妇系列 | 麻豆国产成人AV在线播放| 亚洲人成电影网站 久久影视| 陇川县| 人人爽人人爽人人片a免费| 亚洲VA中文字幕无码久久| 国产av一区二区不卡| 人成午夜大片免费视频77777| 精品国产亚洲第一区二区三区|