2013-02-01 143 views
2

我們使用Sun Solaris進行應用程序開發,並使用-m64編譯64位應用程序。在32位gdb工具上調試64位C++應用程序

但是,32位的GDB工具已經安裝在我的機器上,我們無法調試我們的64位應用程序。

輸出作爲

$ gdb cxlog 
GNU gdb 6.8 
Copyright (C) 2008 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 "sparc-sun-solaris2.10"... 
(gdb) break main 
Breakpoint 1 at 0x100001464: file cxlogger.c, line 147. 
(gdb) run 
Starting program: /usr33/SIR07140/GTB_HOME/GoTx_HOME/samples/cxlog 
procfs:4337 -- process not stopped. 
procfs: ...giving up... 
(gdb) n 
procfs: couldn't find pid 12372 (kernel thread 1) in procinfo list. 
(gdb). 

正常調試讚揚像下一&步驟不工作。

如果我使用-m32編譯我的應用程序GDB是工作文件。

在此先感謝。 桑達拉金德蘭。

+0

和你的問題是? – PlasmaHH

回答

2

你基本上有三種選擇 - 在我的優先順序:

  1. 在機器上安裝64位GDB。
  2. 在32位模式下重建應用程序並進行調試。
  3. 從源代碼爲64位目標構建您自己的gdb版本。

調試64位二進制文​​件的唯一方法是擁有一個爲64位構建的gdb [或其他一些調試器,但不管它是哪個,都需要爲64位構建目標]

相關問題