How to resolve error message: Undefined command: “debuginfo-install”. Try “help”. while debugging using GDB.

If you are debuggining any C program or any binary file, and faced similar error message below:


Temporary breakpoint 1, 0x08048427 in main ()
Missing separate debuginfos,

To resolve this issue, we need to install the missing glibc package corresponding to installed debuginfo.

Issue Details

[root@nglinux ~]# gdb /bin/deleteperm 
GNU gdb (GDB) Red Hat Enterprise Linux (7.2-92.el6)
Copyright (C) 2010 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later 
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 "i686-redhat-linux-gnu".
For bug reporting instructions, please see:
...
Reading symbols from /bin/deleteperm...(no debugging symbols found)...done.
(gdb) start
Temporary breakpoint 1 at 0x8048427
Starting program: /bin/deleteperm 

Temporary breakpoint 1, 0x08048427 in main ()
Missing separate debuginfos, use: debuginfo-install glibc-2.12-1.209.el6.i686
(gdb)

Solution

[root@nglinux ~]# debuginfo-install glibc-2.12-1.209.el6.i686
Failed to set locale, defaulting to C
Loaded plugins: fastestmirror, refresh-packagekit
enabling epel-debuginfo
Determining fastest mirrors
epel/metalink                                                                                                                      |  17 kB     00:00     
epel-debuginfo/metalink                                                                                                            |  16 kB     00:00     
 * base: ewr.edge.kernel.org
 * epel: sjc.edge.kernel.org
 * epel-debuginfo: sjc.edge.kernel.org
 * extras: mirrors.tripadvisor.com
 * updates: sjc.edge.kernel.org
base                                                                                                                               | 3.7 kB     00:00     
base-debuginfo                                                                                                                     | 2.5 kB     00:00     
base-debuginfo/primary_db                                                                                                          | 1.8 MB     00:02     
epel                                                                                                                               | 3.2 kB     00:00     
epel/primary                                                                                                                       | 2.9 MB     00:02     
epel                                                                                                                                          10196/10196
epel-debuginfo                                                                                                                     | 1.5 kB     00:00     
epel-debuginfo/primary                                                                                                             | 404 kB     00:00     
epel-debuginfo                                                                                                                                  2238/2238
extras                                                                                                                             | 3.3 kB     00:00     
updates                                                                                                                            | 3.4 kB     00:00     
updates/primary_db                                                                                                                 | 646 kB     00:01     
--> Running transaction check
---> Package glibc-debuginfo.i686 0:2.12-1.209.el6 will be installed
--> Processing Dependency: glibc-debuginfo-common = 2.12-1.209.el6 for package: glibc-debuginfo-2.12-1.209.el6.i686
---> Package nss-softokn-debuginfo.i686 0:3.14.3-23.3.el6_8 will be installed
---> Package yum-plugin-auto-update-debug-info.noarch 0:1.1.30-41.el6 will be installed
--> Running transaction check
---> Package glibc-debuginfo-common.i686 0:2.12-1.209.el6 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

==========================================================================================================================================================
 Package                                             Arch                     Version                              Repository                        Size
==========================================================================================================================================================
Installing:
 glibc-debuginfo                                     i686                     2.12-1.209.el6                       base-debuginfo                    10 M
 nss-softokn-debuginfo                               i686                     3.14.3-23.3.el6_8                    base-debuginfo                   1.6 M
 yum-plugin-auto-update-debug-info                   noarch                   1.1.30-41.el6                        base                              27 k
Installing for dependencies:
 glibc-debuginfo-common                              i686                     2.12-1.209.el6                       base-debuginfo                   7.6 M

Transaction Summary
==========================================================================================================================================================
Install       4 Package(s)

Total download size: 19 M
Installed size: 95 M
Is this ok [y/N]: y
Downloading Packages:
(1/4): glibc-debuginfo-2.12-1.209.el6.i686.rpm                                                                                     |  10 MB     00:07     
(2/4): glibc-debuginfo-common-2.12-1.209.el6.i686.rpm                                                                              | 7.6 MB     00:07     
(3/4): nss-softokn-debuginfo-3.14.3-23.3.el6_8.i686.rpm                                                                            | 1.6 MB     00:03     
(4/4): yum-plugin-auto-update-debug-info-1.1.30-41.el6.noarch.rpm                                                                  |  27 kB     00:00     
----------------------------------------------------------------------------------------------------------------------------------------------------------
Total                                                                                                                     819 kB/s |  19 MB     00:24     
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction

Now it will work.

0 0 votes
Article Rating
Subscribe
Notify of
guest

0 Comments
Newest
Oldest Most Voted
Inline Feedbacks
View all comments