Arm linux gnueabihf gdb

Русские Блоги

# windows # кросс-компиляция gdb arm-linux-gnueabihf-gdb

GDB (символический отладчик GNU) — это просто инструмент отладки. Это бесплатное программное обеспечение, защищенное Стандартной общественной лицензией или GPL.

Как и все отладчики, GDB позволяет вам отлаживать программу, включая остановку программы там, где вы хотите, после чего вы можете просматривать переменные, регистры, память и стек. Кроме того, вы можете изменять переменные и значения памяти. GDB — очень мощный отладчик, он может отлаживать несколько языков. Здесь мы занимаемся отладкой только C и C ++, а не других языков. Следует также отметить, что GDB — это отладчик, а не интегрированная среда, такая как VC. Вы можете использовать некоторые внешние инструменты, такие как XXGDB, DDD и т. Д. Все они имеют графический интерфейс, поэтому им удобнее пользоваться, но они всего лишь оболочка GDB. Следовательно, вы все равно должны быть знакомы с командами GDB. Фактически, когда вы используете эти графические интерфейсы в течение длительного времени, вы обнаружите важность знакомства с командами GDB.

Среда отладки GDB встроенного Linux состоит из двух частей: хоста (ПК) и цели (ARM). Хост использует инструмент отладки arm-linux-gdb, а цель должна запускать gdbserver. Эти две части могут быть подключены через последовательный порт или Подключитесь к сетевому порту и верните выполнение приложения ARM на стороне Target хосту. Команда трассировки отладки выдается из arm-linux-gdb на стороне хоста. Следовательно, вам нужна перекрестная отладка GDB.

Вы можете загрузить соответствующую версию GDB с http://ftp.gnu.org/gnu/gdb/. Последняя версия — gdb-9.1.tar.xz. Я использую еще 8.2, поэтому скомпилированная версия — 8.2

Для компиляции исходного кода нам также необходимо установить MSYS

Откройте файл msys.bat, а затем введите каталог gdb, конкретную компиляцию и# linux # кросс-компиляция gdb arm-linux-gnueabihf-gdbРазницы почти нет. —host не заполняется, по умолчанию будет предложено

./configure --target=arm-linux-gnueabihf --program-prefix=arm-linux-gnueabihf- CC=arm-linux-gnueabihf-gcc --prefix=/c/arm-linux-gnueabihf-gdb-8.2
$ ./configure --target=arm-linux-gnueabihf --program-prefix=arm-linux-gnueabihf- CC=arm-linux-gnueabihf-gcc --prefix=/c /arm-linux-gnueabihf-gdb-8.2 checking build system type. i686-pc-mingw32 checking host system type. i686-pc-mingw32 checking target system type. arm-unknown-linux-gnueabihf checking for a BSD-compatible install. /bin/install -c checking whether ln works. yes checking whether ln -s works. no, using cp -pR checking for a sed that does not truncate output. /bin/sed checking for gawk. gawk checking for gcc. arm-linux-gnueabihf-gcc checking whether the C compiler works. yes checking for C compiler default output file name. a.out checking for suffix of executables. checking whether we are cross compiling. configure: error: in `/c/99_temp/gdb-8.2': configure: error: cannot run C compiled programs. If you meant to cross compile, use `--host'. See `config.log' for more details

Использовать конфигурацию по умолчанию ./configure Посмотреть текущий —host=i686-pc-mingw32

$ ./configure checking build system type. i686-pc-mingw32 checking host system type. i686-pc-mingw32 checking target system type. i686-pc-mingw32 checking for a BSD-compatible install. /bin/install -c checking whether ln works. yes checking whether ln -s works. no, using cp -pR

Присоединиться —host=i686-pc-mingw32

./configure --target=arm-linux-gnueabihf --host=i686-pc-mingw32 --program-prefix=arm-linux-gnueabihf- CC=arm-linux-gnueabihf-gcc --prefix=/c/arm-linux-gnueabihf-gdb-8.2

Источник

Читайте также:  Как в линуксе поменять время

arm-linux-gnueabihf-gdb versus gdb-multiarch

I’m trying to perform cross platform remote debugging from my x86 computer to a remote ARM device. (ex: Beagle Bone Black) I’m using Ubuntu 14.04 and Eclipse CDT. I installed the package gcc-arm-linux-gnueabihf but the gdb debugger is not in that package. (http://packages.ubuntu.com/precise/gcc-arm-linux-gnueabihf) Therefore, I’m wondering if I should use the Linaro toolchain (which include arm-linux-gnueabihf-gdb) or if I should install the gdb-multiarch package. What is the difference between gdb-multiarch and arm-linux-gnueabihf-gdb ? Is it better to use gdb-multiarch ? ssinfod

2 Answers 2

I received an answer from the linaro mailing list:

For Ubuntu hosts from 12.04 onwards, gdb-multiarch is used as gdb client for debugging. As name indicates it is a common client to any architecture and not restricted to ARM.

Generally, all gdb clients are architecture independent because architecture specific part is handled in gdbserver itself. So, other than the name arm-linux-gnueabihf-gdb, I am guessing it is same as gdb-multiarch.

I received another answer from the linaro mailing list:

The Linaro gdb release will generally be more up to date than the Ubuntu one. For example our latest release is 7.8, and that is only available in utopic, not trusty so if you plan to use an Ubuntu LTS release it might be better to use the Linaro shipped gdb. Linaro gdb also contains fixes and improvements that aren’t in the upstream stable branch. Historically Ubuntu has often picked these changes up too but that may not always be the case.

gdb-multiarch obviously supports a range of other architectures besides ARM, so if that is something that would be useful for you then it might make sense to use that.

Источник

ArchPKGs

How to Install arm-linux-gnueabihf-gdb with Command Line on Arch-Based Linux (Manjaro/Parabola)

«The GNU Debugger for the ARM hard float target» is the maintainer’s profile of arm-linux-gnueabihf-gdb . To install this package ( arm-linux-gnueabihf-gdb ) from AUR (Arch User Repository) on Arch Linux and Arch-based distros (e.g. Manjaro, EndeavourOS, Anarchy, Garuda, Parabola) is fairly simple. This guide will be covering how to install/update/uninstall the package with either the default package manager pacman or an AUR helper like yay .

Читайте также:  Расшаривание принтера astra linux

Table of Contents

There are commonly two ways to install arm-linux-gnueabihf-gdb from AUR. pacman is what you’re looking for if you are a seasoned Linux user and have the knowledge of how packages are built. Otherwise, yay is a popular alternative to install packages without the necessity to review PKGBUILD and build packages with makepkg yourself.

sudo pacman -S --needed git && git clone https://aur.archlinux.org/arm-linux-gnueabihf-gdb.git && cd arm-linux-gnueabihf-gdb && makepkg -si
  1. Install git if it is not already installed.
  2. clone the package’s git repository from upstream URL.
  3. cd into the folder of the repository.
  4. Use makepkg to build the package. Also, it will automatically be installed with pacman if built successfully.
yay -S arm-linux-gnueabihf-gdb

Updating AUR packages is pretty much the same as installing them. All you have to do is pull it from upstream then re-build it. Nevertheless, it is still recommended to upgrade your whole system first with sudo pacman -Syu before updating any packages to avoid dependency issues, since Arch is a rolling-release Linux distro.

git pull && makepkg -si
  1. pull from the package’s git repository.
  2. Use makepkg to build the package. Also, it will automatically be updated with pacman if built successfully.

Compared to installing and updating packages, uninstalling is the most uncomplicated of these three,all you have to do is choose whether to purge the dependencies that no longer required by other packages and the configuration files generated by the package.

sudo pacman -R arm-linux-gnueabihf-gdb
sudo pacman -Rs arm-linux-gnueabihf-gdb
sudo pacman -Rns arm-linux-gnueabihf-gdb
yay -R arm-linux-gnueabihf-gdb
yay -Rs arm-linux-gnueabihf-gdb
yay -Rns arm-linux-gnueabihf-gdb

Learn more details about how to install and update AUR packages on Arch-based Linux distributions, please refer to Two Ways to Install Packages from AUR.

How to Install octant-bin (Full Tutorial) on Arch Linux/Manjaro/Artix

octant-bin is «A web-based, highly extensible platform for developers to better understand the complexity of Kubernetes clusters.» based on its definition. To install and update octant-bin from AUR (Arch User Repository) on Arch Linux, Manjaro, EndeavourOS, Artix, Parabola, Anarchy and BlackArch is rather simple. This tutorial will taught you how to install/update/remove the package with either the default package manager pacman or an AUR helper (e.g. yay).

Читайте также:  Linux set owner permission

python-simpervisor Install/Update/Uninstall Tutorial on Arch Linux/Manjaro/EndeavourOS

python-simpervisor is «Simple async process supervisor» referring to its own profile. To install and update this package (python-simpervisor) from AUR (Arch User Repository) on Arch Linux, Manjaro, EndeavourOS and RebornOS is pretty uncomplicated. This tutorial will be covering how to install/update/remove the package with either the built-in package manager pacman or an AUR helper (e.g. yay).

mautrix-facebook-git Install (Update, Remove) Tutorial on Arch Linux, Manjaro and Parabola

«A double puppeting Facebook bridge with multi-user support for Hangouts» is their description of mautrix-facebook-git. To get mautrix-facebook-git from AUR (Arch User Repository) on Arch Linux and Arch-based Linux distributions (e.g. Manjaro, EndeavourOS, ArcoLinux, BlackArch, Anarchy) is rather straightforward. This tutorial will taught you how to install, update and remove the package with either the default package manager pacman or an AUR helper (e.g. yay).

Guide on Install, Update and Remove webex-teams-vdi on Arch Linux/Manjaro/Anarchy

«Webex Teams VDI is a lightweight client for virtual desktops.» is their definition of webex-teams-vdi. To get this package (webex-teams-vdi) from AUR (Arch User Repository) on Arch Linux and Arch-based distros (e.g. Manjaro, EndeavourOS, Anarchy, ArcoLinux, Artix, BlackArch) is fairly uncomplicated. This tutorial will be covering how to install, update and remove the package with either the default package manager pacman or an AUR helper like yay.

Complete Tutorial on r-multisight Installation on Arch Linux (Manjaro/Artix)

«Multi-omics Classification, Functional Enrichment and Network Inference analysis» is the developer’s gist of r-multisight. To install or remove this package (r-multisight) from AUR (Arch User Repository) on Arch Linux, Manjaro, EndeavourOS, Anarchy, BlackArch, Artix and Parabola is pretty simple. This guide will show you step-by-step how to install, update and uninstall the package with either the built-in package manager pacman or an AUR helper like yay.

A Straightforward Guide on gameoftrees Installation on Arch Linux/Manjaro/Artix

According to gameoftrees’s own definition, it’s «A version control system which prioritizes ease of use and simplicity over flexibility». To install and update gameoftrees from AUR (Arch User Repository) on Arch Linux and Arch-based distros (e.g. Manjaro, EndeavourOS, ArcoLinux, Parabola, Artix, BlackArch) is rather straightforward. This guide will cover how to install, update and remove the package with either the built-in package manager pacman or an AUR helper (e.g. yay).

More guides… copyright 2023 ArchPKGs. All Rights Reserved.

Источник

Оцените статью
Adblock
detector