Unable to debug snmpd with gdb, compiled with "-g"

Bhartendu Maheshwari <[email protected]>
Newsgroups gmane.network.net-snmp.user
Message-ID <[email protected]>
Hi All,
 
I am trying to debug snmpd but unable to do so, the logs are dumped below. As per my understaning if I compile with "-g" option then we can run with gdb, I checked the snmpd and snmplib is successfully compiled with "-g" option but showing error as "no debugging symbols found". I am not able to understand why? Please correct me if I am wrong. Do I need to attach gdb with the snmpd task id. Please help me in debugging snmpd.
 
GCC Output
==========
/bin/sh ../libtool  --mode=link gcc -g -O2 -Dlinux  -o snmpd snmpd.lo    libnetsnmpagent.la libnetsnmpmibs.la helpers/libnetsnmphelpers.la  ../snmplib/libnetsnmp.la -ldl -lm
gcc -g -O2 -Dlinux -o .libs/snmpd snmpd.o  ./.libs/libnetsnmpagent.so ./.libs/libnetsnmpmibs.so helpers/.libs/libnetsnmphelpers.so ../snmplib/.libs/libnetsnmp.so -ldl -lm  -Wl,--rpath -Wl,/usr/local/lib
creating snmpd

GDB Output
==========
[root@localhost sbin]# gdb snmpd
GNU gdb Red Hat Linux (6.1post-1.20040607.43rh)
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "i386-redhat-linux-gnu"...(no debugging symbols found)...Using host libthread_db library "/lib/tls/libthread_db.so.1".
(gdb)
 
Thanks & Regards
Bhartendu


		
---------------------------------
 Enjoy this Diwali with Y! India Click here
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.