久久久久久久av_日韩在线中文_看一级毛片视频_日本精品二区_成人深夜福利视频_武道仙尊动漫在线观看

<i id='LAXPd'><tr id='LAXPd'><dt id='LAXPd'><q id='LAXPd'><span id='LAXPd'><b id='LAXPd'><form id='LAXPd'><ins id='LAXPd'></ins><ul id='LAXPd'></ul><sub id='LAXPd'></sub></form><legend id='LAXPd'></legend><bdo id='LAXPd'><pre id='LAXPd'><center id='LAXPd'></center></pre></bdo></b><th id='LAXPd'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='LAXPd'><tfoot id='LAXPd'></tfoot><dl id='LAXPd'><fieldset id='LAXPd'></fieldset></dl></div>

  • <legend id='LAXPd'><style id='LAXPd'><dir id='LAXPd'><q id='LAXPd'></q></dir></style></legend>
  • <tfoot id='LAXPd'></tfoot>

      1. <small id='LAXPd'></small><noframes id='LAXPd'>

          <bdo id='LAXPd'></bdo><ul id='LAXPd'></ul>

        自動將進入/退出功能日志添加到項目

        Automatically adding Enter/Exit Function Logs to a Project(自動將進入/退出功能日志添加到項目)
        <legend id='G6ggx'><style id='G6ggx'><dir id='G6ggx'><q id='G6ggx'></q></dir></style></legend>
      2. <small id='G6ggx'></small><noframes id='G6ggx'>

        <tfoot id='G6ggx'></tfoot>
          <bdo id='G6ggx'></bdo><ul id='G6ggx'></ul>

              <tbody id='G6ggx'></tbody>

          1. <i id='G6ggx'><tr id='G6ggx'><dt id='G6ggx'><q id='G6ggx'><span id='G6ggx'><b id='G6ggx'><form id='G6ggx'><ins id='G6ggx'></ins><ul id='G6ggx'></ul><sub id='G6ggx'></sub></form><legend id='G6ggx'></legend><bdo id='G6ggx'><pre id='G6ggx'><center id='G6ggx'></center></pre></bdo></b><th id='G6ggx'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='G6ggx'><tfoot id='G6ggx'></tfoot><dl id='G6ggx'><fieldset id='G6ggx'></fieldset></dl></div>

                • 本文介紹了自動將進入/退出功能日志添加到項目的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學(xué)習(xí)吧!

                  問題描述

                  限時送ChatGPT賬號..

                  我有一個需要調(diào)查的第 3 方源代碼.我想看看函數(shù)的調(diào)用順序,但我不想浪費時間打字:

                  I have a 3rd party source code that I have to investigate. I want to see in what order the functions are called but I don't want to waste my time typing:

                  printf("Entered into %s", __FUNCTION__)
                  

                  printf("Exited from %s", __FUNCTION__)
                  

                  對于每個函數(shù),我也不想接觸任何源文件.

                  for each function, nor do I want to touch any source file.

                  你有什么建議嗎?是否有編譯器標(biāo)志可以自動為我執(zhí)行此操作?

                  Do you have any suggestions? Is there a compiler flag that automagically does this for me?

                  對評論的澄清:

                  • 我將交叉編譯源代碼以在 ARM 上運行它.
                  • 我會用 gcc 編譯它.
                  • 我不想分析靜態(tài)代碼.我想跟蹤運行時.所以 doxygen 不會讓我的生活更輕松.
                  • 我有源代碼,我可以編譯它.
                  • 我不想使用面向方面的編程.

                  我發(fā)現(xiàn) gdb 提示符中的 'frame' 命令會在那個時間點打印當(dāng)前幀(或者,您可以說是函數(shù)名稱).也許,每次調(diào)用函數(shù)時都可以(使用 gdb 腳本)調(diào)用frame"命令.你怎么看?

                  I found that 'frame' command in the gdb prompt prints the current frame (or, function name, you could say) at that point in time. Perhaps, it is possible (using gdb scripts) to call 'frame' command everytime a function is called. What do you think?

                  推薦答案

                  除了通常的調(diào)試器和面向方面的編程技術(shù)之外,您還可以使用 gcc 的 -finstrument-functions 命令行選項.您必須實現(xiàn)自己的 __cyg_profile_func_enter()__cyg_profile_func_exit() 函數(shù)(在 C++ 中將它們聲明為 extern "C").

                  Besides the usual debugger and aspect-oriented programming techniques, you can also inject your own instrumentation functions using gcc's -finstrument-functions command line options. You'll have to implement your own __cyg_profile_func_enter() and __cyg_profile_func_exit() functions (declare these as extern "C" in C++).

                  它們提供了一種方法來跟蹤從何處調(diào)用了什么函數(shù).但是,該接口有點難以使用,因為例如傳遞的是被調(diào)用函數(shù)的地址及其調(diào)用點,而不是函數(shù)名稱.您可以記錄地址,然后使用類似 objdump 的東西從符號表中提取相應(yīng)的名稱--symsnm,當(dāng)然前提是這些符號沒有從相關(guān)二進制文件中刪除.

                  They provide a means to track what function was called from where. However, the interface is a bit difficult to use since the address of the function being called and its call site are passed instead of a function name, for example. You could log the addresses, and then pull the corresponding names from the symbol table using something like objdump --syms or nm, assuming of course the symbols haven't been stripped from the binaries in question.

                  使用 gdb 可能更容易.天啊.:)

                  It may just be easier to use gdb. YMMV. :)

                  這篇關(guān)于自動將進入/退出功能日志添加到項目的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網(wǎng)!

                  【網(wǎng)站聲明】本站部分內(nèi)容來源于互聯(lián)網(wǎng),旨在幫助大家更快的解決問題,如果有圖片或者內(nèi)容侵犯了您的權(quán)益,請聯(lián)系我們刪除處理,感謝您的支持!

                  相關(guān)文檔推薦

                  Why do two functions have the same address?(為什么兩個函數(shù)的地址相同?)
                  Why the initializer of std::function has to be CopyConstructible?(為什么 std::function 的初始化程序必須是可復(fù)制構(gòu)造的?)
                  mixing templates with polymorphism(混合模板與多態(tài)性)
                  When should I use the keyword quot;typenamequot; when using templates(我什么時候應(yīng)該使用關(guān)鍵字“typename?使用模板時)
                  Dependent name resolution amp; namespace std / Standard Library(依賴名稱解析命名空間 std/標(biāo)準(zhǔn)庫)
                  gcc can compile a variadic template while clang cannot(gcc 可以編譯可變參數(shù)模板,而 clang 不能)
                  <i id='kJtLP'><tr id='kJtLP'><dt id='kJtLP'><q id='kJtLP'><span id='kJtLP'><b id='kJtLP'><form id='kJtLP'><ins id='kJtLP'></ins><ul id='kJtLP'></ul><sub id='kJtLP'></sub></form><legend id='kJtLP'></legend><bdo id='kJtLP'><pre id='kJtLP'><center id='kJtLP'></center></pre></bdo></b><th id='kJtLP'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='kJtLP'><tfoot id='kJtLP'></tfoot><dl id='kJtLP'><fieldset id='kJtLP'></fieldset></dl></div>

                      <tbody id='kJtLP'></tbody>

                    1. <small id='kJtLP'></small><noframes id='kJtLP'>

                      <legend id='kJtLP'><style id='kJtLP'><dir id='kJtLP'><q id='kJtLP'></q></dir></style></legend>
                          <tfoot id='kJtLP'></tfoot>

                            <bdo id='kJtLP'></bdo><ul id='kJtLP'></ul>

                            主站蜘蛛池模板: 成人免费一区二区三区视频网站 | 一区二区av | 一区二区三区欧美在线观看 | www.99re5.com| 找个黄色片 | 青青草精品视频 | 精品视频在线观看 | 激情av在线 | 欧洲国产精品视频 | 成年视频在线观看 | 国产成人精品一区二区三区 | 久久久久亚洲精品 | 亚洲人成网亚洲欧洲无码 | 国产一区二区三区四区 | 国产精品久久久久久久久久不蜜臀 | www.色.com| 国产精品一区二区在线播放 | 亚洲a在线视频 | 国产精品免费视频一区 | 久久久久久久久国产精品 | 日韩中文在线视频 | 亚洲高清在线观看 | 在线观看av免费 | 日韩在线免费视频 | 91麻豆精品国产91久久久久久 | www.久久.com | 91久久精品日日躁夜夜躁国产 | 自拍视频精品 | 亚洲自拍一区在线观看 | 欧美精品在线播放 | 日本偷偷操| 亚洲视频 欧美视频 | 中文字幕亚洲一区 | 欧美国产91 | 人人操日日干 | 国产日批| 亚洲婷婷一区 | 欧美在线视频网 | 嫩草网 | 精品成人免费一区二区在线播放 | 999久久久久久久久6666 |