How To Install rust-gdb on Ubuntu 20.04

In this tutorial we learn how to install rust-gdb on Ubuntu 20.04. rust-gdb is Rust debugger (gdb) Rust debugger (gdb) Rust debugger (gdb)

Introduction

In this tutorial we learn how to install rust-gdb on Ubuntu 20.04.

What is rust-gdb

rust-gdb is:

Rust is a curly-brace, block-structured expression language. It visually resembles the C language family, but differs significantly in syntactic and semantic details. Its design is oriented toward concerns of “programming in the large”, that is, of creating and maintaining boundaries - both abstract and operational - that preserve large-system integrity, availability and concurrency.

It supports a mixture of imperative procedural, concurrent actor, object-oriented and pure functional styles. Rust also supports generic programming and meta-programming, in both static and dynamic styles.

This package contains pretty printers and a wrapper script for invoking gdb on rust binaries.

Package: rust-gdb Architecture: all Version: 1.43.0+dfsg1+llvm-1~exp1ubuntu1~20.04.1 Priority: extra Section: universe/devel Source: rustc Origin: Ubuntu Maintainer: Ubuntu Developers [email protected] Original-Maintainer: Debian Rust Maintainers [email protected] Bugs: https://bugs.launchpad.net/ubuntu/+filebug Installed-Size: 237 Depends: gdb Suggests: gdb-doc Replaces: rustc (« 1.1.0+dfsg1-1) Filename: pool/universe/r/rustc/rust-gdb_1.43.0+dfsg1+llvm-1~exp1ubuntu1~20.04.1_all.deb Size: 26632 MD5sum: d09ed1033e63e2a38c7f535701c43707 SHA1: 4693bbfd7d0d8ea6565c77673ffd49b6dca03b08 SHA256: db57fa0757b28875dd365f1dcd27c3936d571504e9749974ebeaa7b12e500f2d SHA512: b45e4f456d16b87c8b9e216f322e5241ddad901f512dd767ec54367eee0ebd2a2b65d76dc059e6a00560e80ed00cdfc8de79dc62e2d6434068547291dc2289a9 Homepage: http://www.rust-lang.org/ Description-en: Rust debugger (gdb) Rust is a curly-brace, block-structured expression language. It visually resembles the C language family, but differs significantly in syntactic and semantic details. Its design is oriented toward concerns of “programming in the large”, that is, of creating and maintaining boundaries - both abstract and operational - that preserve large-system integrity, availability and concurrency.

It supports a mixture of imperative procedural, concurrent actor, object-oriented and pure functional styles. Rust also supports generic programming and meta-programming, in both static and dynamic styles.

This package contains pretty printers and a wrapper script for invoking gdb on rust binaries.

Package: rust-gdb Architecture: all Version: 1.41.0+dfsg1+llvm-0ubuntu2 Priority: extra Section: universe/devel Source: rustc Origin: Ubuntu Maintainer: Ubuntu Developers [email protected] Original-Maintainer: Debian Rust Maintainers [email protected] Bugs: https://bugs.launchpad.net/ubuntu/+filebug Installed-Size: 231 Depends: gdb Suggests: gdb-doc Replaces: rustc (« 1.1.0+dfsg1-1) Filename: pool/universe/r/rustc/rust-gdb_1.41.0+dfsg1+llvm-0ubuntu2_all.deb Size: 26276 MD5sum: 8994e970799743eb3cd8da320aa3cd2b SHA1: aaae3b88c982a46c08448bc9287d33c6ce1cb1b9 SHA256: 0f155706ba81f327e5077aefcd0307d9222f0dd0c5eef42eaca90d712c7efc44 Homepage: http://www.rust-lang.org/ Description-en: Rust debugger (gdb) Rust is a curly-brace, block-structured expression language. It visually resembles the C language family, but differs significantly in syntactic and semantic details. Its design is oriented toward concerns of “programming in the large”, that is, of creating and maintaining boundaries - both abstract and operational - that preserve large-system integrity, availability and concurrency.

It supports a mixture of imperative procedural, concurrent actor, object-oriented and pure functional styles. Rust also supports generic programming and meta-programming, in both static and dynamic styles.

This package contains pretty printers and a wrapper script for invoking gdb on rust binaries.

There are three methods to install rust-gdb on Ubuntu 20.04. We can use apt-get, apt and aptitude. In the following sections we will describe each method. You can choose one of them.

Install rust-gdb Using apt-get

Update apt database with apt-get using the following command.

sudo apt-get update

After updating apt database, We can install rust-gdb using apt-get by running the following command:

sudo apt-get -y install rust-gdb

Install rust-gdb Using apt

Update apt database with apt using the following command.

sudo apt update

After updating apt database, We can install rust-gdb using apt by running the following command:

sudo apt -y install rust-gdb

Install rust-gdb Using aptitude

If you want to follow this method, you might need to install aptitude first since aptitude is usually not installed by default on Ubuntu. Update apt database with aptitude using the following command.

sudo aptitude update

After updating apt database, We can install rust-gdb using aptitude by running the following command:

sudo aptitude -y install rust-gdb

How To Uninstall rust-gdb on Ubuntu 20.04

To uninstall only the rust-gdb package we can use the following command:

sudo apt-get remove rust-gdb

Uninstall rust-gdb And Its Dependencies

To uninstall rust-gdb and its dependencies that are no longer needed by Ubuntu 20.04, we can use the command below:

sudo apt-get -y autoremove rust-gdb

Remove rust-gdb Configurations and Data

To remove rust-gdb configuration and data from Ubuntu 20.04 we can use the following command:

sudo apt-get -y purge rust-gdb

Remove rust-gdb configuration, data, and all of its dependencies

We can use the following command to remove rust-gdb configurations, data and all of its dependencies, we can use the following command:

sudo apt-get -y autoremove --purge rust-gdb

References

Summary

In this tutorial we learn how to install rust-gdb package on Ubuntu 20.04 using different package management tools: apt, apt-get and aptitude.