久久久久久久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>

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

                  問題描述

                  限時送ChatGPT賬號..

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

                  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.

                  你有什么建議嗎?是否有編譯器標志可以自動為我執(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' 命令會在那個時間點打印當前幀(或者,您可以說是函數(shù)名稱).也許,每次調用函數(shù)時都可以(使用 gdb 腳本)調用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?

                  推薦答案

                  除了通常的調試器和面向方面的編程技術之外,您還可以使用 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++).

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

                  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. :)

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

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

                  相關文檔推薦

                  Why do two functions have the same address?(為什么兩個函數(shù)的地址相同?)
                  Why the initializer of std::function has to be CopyConstructible?(為什么 std::function 的初始化程序必須是可復制構造的?)
                  mixing templates with polymorphism(混合模板與多態(tài)性)
                  When should I use the keyword quot;typenamequot; when using templates(我什么時候應該使用關鍵字“typename?使用模板時)
                  Dependent name resolution amp; namespace std / Standard Library(依賴名稱解析命名空間 std/標準庫)
                  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>

                            主站蜘蛛池模板: 精品国产99 | 精品免费视频 | 91看片免费版 | 成人国产精品免费观看视频 | 中文字幕久久精品 | 久久久性色精品国产免费观看 | 成人国产精品久久久 | 国产三级精品三级在线观看四季网 | 亚洲一区在线播放 | 免费看啪啪网站 | 国产成人免费视频网站视频社区 | 亚洲在线观看视频 | 国产97久久| 欧美一区二区三区大片 | 91精品国产乱码久久久久久久 | 国产精品一区一区三区 | 特级丰满少妇一级aaaa爱毛片 | 欧美日韩国产免费 | 日韩蜜桃视频 | 超碰在线播 | 国产伦精品一区二区三区高清 | 中文成人在线 | 免费在线成人 | 免费一二区 | 日韩高清中文字幕 | 国产精品爱久久久久久久 | 成人午夜在线 | 午夜黄色 | 久久99精品久久久久久国产越南 | 午夜精品久久久久久久久久久久 | 日韩 欧美 综合 | 中文字幕国产一区 | 男女羞羞视频在线看 | 美女国产 | 色婷婷一区二区三区四区 | av片免费观看 | 人人种亚洲 | 91青青草视频 | 国产精品成人免费 | 久久精品91久久久久久再现 | 一区二区三区在线免费 |