Introduction
In this tutorial we learn how to install libdevel-gdb-perl
on Ubuntu 20.04.
What is libdevel-gdb-perl
libdevel-gdb-perl is:
The Devel::GDB package provides an interface for communicating
with GDB. Internally, it uses the GDB/MI interpreter
(see http://sourceware.org/gdb/current/onlinedocs/gdb_25.html),
which accurately informs the caller of the program state and,
through the use of tokens, guarantees that the results returned
actually correspond to the request sent.
By contrast, GDB’s console interpreter returns all responses on
STDOUT, and thus there is no way to ensure that a particular response
corresponds to a particular request.
Therefore, it is obviously preferable to use GDB/MI when programmatically
interacting with GDB. This can be done via the send_cmd family of functions
(send_cmd, send_cmd_excl, and send_cmd_async). There are, however,
some cases when there is no GDB/MI command corresponding to a particular
console command, or it has not yet been implemented (for example, -symbol-type,
corresponding to the console command ptype, is not yet implemented as of GDB
6.6). In this case, the get function provides a workaround by capturing all
output sent to the console stream.
There are three methods to install libdevel-gdb-perl
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 libdevel-gdb-perl Using apt-get
Update apt database with apt-get
using the following command.
sudo apt-get update
After updating apt database, We can install libdevel-gdb-perl
using apt-get
by running the following command:
sudo apt-get -y install libdevel-gdb-perl
Install libdevel-gdb-perl Using apt
Update apt database with apt
using the following command.
sudo apt update
After updating apt database, We can install libdevel-gdb-perl
using apt
by running the following command:
sudo apt -y install libdevel-gdb-perl
Install libdevel-gdb-perl 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 libdevel-gdb-perl
using aptitude
by running the following command:
sudo aptitude -y install libdevel-gdb-perl
How To Uninstall libdevel-gdb-perl on Ubuntu 20.04
To uninstall only the libdevel-gdb-perl
package we can use the following command:
sudo apt-get remove libdevel-gdb-perl
Uninstall libdevel-gdb-perl And Its Dependencies
To uninstall libdevel-gdb-perl
and its dependencies that are no longer needed by Ubuntu 20.04, we can use the command below:
sudo apt-get -y autoremove libdevel-gdb-perl
Remove libdevel-gdb-perl Configurations and Data
To remove libdevel-gdb-perl
configuration and data from Ubuntu 20.04 we can use the following command:
sudo apt-get -y purge libdevel-gdb-perl
Remove libdevel-gdb-perl configuration, data, and all of its dependencies
We can use the following command to remove libdevel-gdb-perl
configurations, data and all of its dependencies, we can use the following command:
sudo apt-get -y autoremove --purge libdevel-gdb-perl
References
Summary
In this tutorial we learn how to install libdevel-gdb-perl
package on Ubuntu 20.04 using different package management tools: apt
, apt-get
and aptitude
.