LoginSignup
6
2

More than 5 years have passed since last update.

[memo] Ubuntu 16.04 に gdb 8.0.1 をインストール

Last updated at Posted at 2017-09-20

Ubuntu 16.04 に gdb 8.0.1 を入れた際の忘備録です。
参考になれば幸いです。

標準インストールの gdb (7.11) のアンインストール

共存できるかもしれませんが、ややこしくなりそうなので一旦削除。

$> sudo apt remove gdb

Download

GDB: The GNU Project Debuggerダウンロードページ から 最新版(2017/9/21 日現在 8.0.1) をダウンロード。
ここでは gdb-8.0.1.tar.gz をダウンロードしたとして下記します。

gdb-8.0.1.tar.gz の 展開

$> tar -xvzf gdb-8.0.1.tar.gz

texinfoのインストール

sudo apt-get install texinfo

手元の環境では、 makeinfo (texinfo内に存在)が足りなくて、gdbのビルドに一度失敗しました。入れておきましょう。

Build

展開先の configure が存在するディレクトリに移動し、下記のコマンドを実行します。

$> ./configure
$> make -j4
$> sudo make install

手元の環境では、make -j4 の 4並列ビルドで 5~10 分位 かかりました。

gdb バージョン確認

$> gdb -v
GNU gdb (GDB) 8.0.1
Copyright (C) 2017 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-pc-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://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".

インストールできました。

以上です。

6
2
2

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
6
2