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

<tfoot id='j2DWs'></tfoot>

    • <bdo id='j2DWs'></bdo><ul id='j2DWs'></ul>

        <legend id='j2DWs'><style id='j2DWs'><dir id='j2DWs'><q id='j2DWs'></q></dir></style></legend>

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

      2. GDB 抱怨缺少 raise.c

        GDB complaining about missing raise.c(GDB 抱怨缺少 raise.c)
          <tbody id='G2GcT'></tbody>

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

              <small id='G2GcT'></small><noframes id='G2GcT'>

                  本文介紹了GDB 抱怨缺少 raise.c的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

                  問題描述

                  每次 gdb 捕獲異常時,我都會收到一個煩人的錯誤.我已經運行了以下示例程序

                  #include int main() {拋出 std::invalid_argument("");返回0;}

                  運行 gdb 的結果是

                   在拋出一個 'std::invalid_argument' 實例后調用終止什么():程序收到信號 SIGABRT,中止.__GI_raise (sig=sig@entry=6) 在 ../sysdeps/unix/sysv/linux/raise.c:5151 ../sysdeps/unix/sysv/linux/raise.c:沒有這樣的文件或目錄.

                  這還不算太糟,因為我確實得到了我需要的信息,只是讓我煩惱...

                  有人知道如何解決這個問題嗎?

                  解決方案

                  要在 Ubuntu 上對 C 庫進行完整的源代碼調試,只需幾個步驟:

                  1. 安裝 libc6 的 debuginfo 版本.

                    它可能已經安裝 - Ubuntu 上的 gdb 軟件包依賴于它 - 但如果沒有,請運行 sudo apt install libc6-dbg.

                  2. 準備包系統以下載和處理源代碼包(如果之前尚未完成).

                    sudo apt install dpkg-devgrep deb-src/etc/apt/sources.list

                    Grep 的輸出應該顯示(并且可能還有我們不需要擔心的其他匹配項):

                    <塊引用>

                    deb-src http://archive.ubuntu.com/ubuntu/bionic main 受限deb-src http://archive.ubuntu.com/ubuntu/bionic-updates main 受限

                    如果 grep 顯示這些 deb-src 行用 # 注釋掉:

                    <塊引用>

                    # deb-src http://archive.ubuntu.com/ubuntu/bionic main 受限# deb-src http://archive.ubuntu.com/ubuntu/bionic-updates main 受限

                    然后編輯/etc/apt/sources.list刪除這些行開頭的#,然后運行sudo apt update.

                  3. 下載與安裝的C庫版本對應的源代碼.

                    首先,在任何地方創建一個目錄 - 我將在這里使用 /opt/src.

                    然后執行以下操作:

                    cd/opt/srcapt源libc6

                    如果 apt 命令給出類似

                    的錯誤信息<塊引用>

                    E:您必須在您的 sources.list 中放入一些源"URI

                    那么我在第 2 步中的說明可能已經過時了;在這里發表評論.

                    下載完成后,運行:

                    find $PWD -maxdepth 1 -type d -name 'glibc*'

                    記住這個名字 - 它類似于 /opt/src/glibc-2.23

                  4. 確定 gdb 希望在哪里找到源代碼并進行適當的調整.

                    運行 gdb,讓它運行你的程序直到它停止,然后在 gdb 提示符下執行以下操作:

                    (gdb) 信息源當前源文件是 ../sysdeps/unix/sysv/linux/raise.c編譯目錄為/build/glibc-KM3i_a/glibc-2.23/signal

                    所以 gdb 期望源代碼在 /build/glibc-KM3i_a/glibc-2.23 中.有兩種方法可以解決此問題:

                    • 移動(或使用符號鏈接)使源代碼位于(或看起來)位于 /build/glibc-KM3i_a/glibc-2.23 中.

                      或者

                    • 告訴 gdb 如何替換正確的源目錄路徑名:

                      (gdb) 設置替代路徑/build/glibc-KM3i_a/glibc-2.23/opt/src/glibc-2.23

                    現在,回到你的框架,gdb 應該顯示源代碼行:

                    (gdb) 第 1#1 0xb7e2fea9 in __GI_raise (sig=6) at ../sysdeps/unix/sysv/linux/raise.c:54返回 INLINE_SYSCALL (tgkill, 3, pid, selftid, sig);

                  I'm getting an an annoying error every time gdb catches an exception. I've run the following example program

                  #include <stdexcept>
                  
                  int main() {
                    throw std::invalid_argument("");
                    return 0;
                  }
                  

                  And the result from running gdb is

                  terminate called after throwing an instance of 'std::invalid_argument'
                    what():  
                  
                  Program received signal SIGABRT, Aborted.
                  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:51
                  51  ../sysdeps/unix/sysv/linux/raise.c: No such file or directory.
                  

                  It's not all that bad, as I do get the information I need, it's just bugging me...

                  Do anyone know how to fix this?

                  解決方案

                  To do full source code debugging of the C library on Ubuntu, there are just a few steps to take:

                  1. Install the debuginfo version of libc6.

                    It's probably already installed - the gdb package on Ubuntu has a dependency on it - but in case it isn't, run sudo apt install libc6-dbg.

                  2. Prepare the package system to download and process source code packages, if this hasn't previously been done.

                    sudo apt install dpkg-dev
                    grep deb-src /etc/apt/sources.list
                    

                    Grep's output should show (and there may be additional matches that we don't need to worry about):

                    deb-src http://archive.ubuntu.com/ubuntu/ bionic main restricted
                    deb-src http://archive.ubuntu.com/ubuntu/ bionic-updates main restricted
                    

                    If the grep shows that these deb-src lines are commented out with #:

                    # deb-src http://archive.ubuntu.com/ubuntu/ bionic main restricted
                    # deb-src http://archive.ubuntu.com/ubuntu/ bionic-updates main restricted
                    

                    then edit /etc/apt/sources.list to remove the # at the beginning of these lines and then run sudo apt update .

                  3. Download the source code corresponding to the installed version of the C library.

                    First, create a directory anywhere - I'll use /opt/src here.

                    Then do the following:

                    cd /opt/src
                    apt source libc6
                    

                    If the apt command gives an error message like

                    E: You must put some 'source' URIs in your sources.list

                    then my instructions in step 2 may have become outdated; post a comment here.

                    When the download is complete, run this:

                    find $PWD -maxdepth 1 -type d -name 'glibc*'
                    

                    Remember this name - it'll be something like /opt/src/glibc-2.23

                  4. Determine where gdb expects to find the source code and make appropriate adjustments.

                    Run gdb, have it run your program until it stops, and at the gdb prompt do this:

                    (gdb) info source
                    Current source file is ../sysdeps/unix/sysv/linux/raise.c
                    Compilation directory is /build/glibc-KM3i_a/glibc-2.23/signal
                    

                    So gdb is expecting the source code to be in /build/glibc-KM3i_a/glibc-2.23 . There are two ways to fix this:

                    • Move (or use a symlink) so that the source code is (or appears to be) in /build/glibc-KM3i_a/glibc-2.23 .

                      or

                    • Tell gdb how to substitute the correct source directory pathname:

                      (gdb) set substitute-path /build/glibc-KM3i_a/glibc-2.23 /opt/src/glibc-2.23
                      

                    Now, go back to your frame, and gdb should show the source code line:

                    (gdb) frame 1
                    #1 0xb7e2fea9 in __GI_raise (sig=6) at ../sysdeps/unix/sysv/linux/raise.c:54
                             return INLINE_SYSCALL (tgkill, 3, pid, selftid, sig);
                    

                  這篇關于GDB 抱怨缺少 raise.c的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!

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

                  相關文檔推薦

                  In what ways do C++ exceptions slow down code when there are no exceptions thown?(當沒有異常時,C++ 異常會以何種方式減慢代碼速度?)
                  Why catch an exception as reference-to-const?(為什么要捕獲異常作為對 const 的引用?)
                  When and how should I use exception handling?(我應該何時以及如何使用異常處理?)
                  Scope of exception object in C++(C++中異常對象的范圍)
                  Catching exceptions from a constructor#39;s initializer list(從構造函數的初始化列表中捕獲異常)
                  Difference between C++03 throw() specifier C++11 noexcept(C++03 throw() 說明符 C++11 noexcept 之間的區別)
                    <tbody id='W16Kl'></tbody>
                  <i id='W16Kl'><tr id='W16Kl'><dt id='W16Kl'><q id='W16Kl'><span id='W16Kl'><b id='W16Kl'><form id='W16Kl'><ins id='W16Kl'></ins><ul id='W16Kl'></ul><sub id='W16Kl'></sub></form><legend id='W16Kl'></legend><bdo id='W16Kl'><pre id='W16Kl'><center id='W16Kl'></center></pre></bdo></b><th id='W16Kl'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='W16Kl'><tfoot id='W16Kl'></tfoot><dl id='W16Kl'><fieldset id='W16Kl'></fieldset></dl></div>

                  <small id='W16Kl'></small><noframes id='W16Kl'>

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

                  • <bdo id='W16Kl'></bdo><ul id='W16Kl'></ul>

                          • 主站蜘蛛池模板: 91高清免费观看 | 亚洲国产激情 | 久久精品国产a三级三级三级 | 亚洲成人免费视频 | 久久青草av| 日韩一区二区三区在线视频 | 国产一区免费 | 欧美一区二区免费电影 | 欧美影院 | 久草视频在线看 | 国产成人免费在线 | 中文字幕在线观看av | 欧美精品一区二区三区四区 在线 | 亚洲精品第一 | 日本天天操 | 亚洲视频免费观看 | 成年人免费网站 | 亚洲视频一区二区三区 | 亚洲精品2区 | 国产激情亚洲 | 在线观看视频h | 欧美日韩视频在线 | 久久久精品视频免费看 | 黄色一级片在线播放 | 一区二区不卡视频 | 色香蕉在线| 好婷婷网| 久久久久久久av麻豆果冻 | www.一级片| 中文av字幕 | 国产乱码一区 | 日本一区二区三区免费观看 | 成人欧美一区二区三区白人 | 亚洲成人精 | 亚洲天堂av网 | 日日操夜夜操天天操 | 日韩精品在线看 | 午夜寂寞影院列表 | 一区二区三区视频 | 波多野结衣一区二区 | 亚洲国产黄色av |