文档
注册

调试前准备

支持在Linux环境与Windows环境进行应用工程调试,并具备远程调试的功能。

GDB安装

以下步骤仅供参考,具体安装步骤请参见GDB官方文档

若环境中未安装GDB,则需要安装GDB,可通过包管理(如apt-get install gdbyum install gdb)进行安装。

如无法使用包管理安装GDB,则需通过源码编译方式安装GDB,操作步骤如下:

  1. 获取GDB源码(获取链接),如获取“gdb-8.1.1.tar.gz”
  2. 解压GDB源码压缩包,以“gdb-8.1.1.tar.gz”为例。
    tar -zxvf gdb-8.1.1.tar.gz
  3. 进入到GDB目录文件,配置编译参数:
    cd gdb-8.1.1
    ./configure --host=aarch64-linux-gnu --prefix=/home/install/gdb
    • “--host”为可选参数,在需要交叉编译安装GDB时使用。“aarch64-linux-gnu”为用户获取的交叉编译器示例。
    • “/home/install/gdb”为指定安装目录示例,请用户根据实际情况自行替换。
  4. 编译。
    make -j8
    make install
  5. 配置环境变量。
    export PATH=/home/install/gdb/bin:$PATH
  6. 查看GDB是否安装成功。
    gdb --version

    如出现类似如下回显,表明安装成功。

    GNU gdb (GDB) 8.1.1
    Copyright (C) 2018 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.
搜索结果
找到“0”个结果

当前产品无相关内容

未找到相关内容,请尝试其他搜索词