Net-SNMP uses libtool while building it's applications. This means that sometimes the applications in the source/build directory are not actually binaries, but shell scripts. The libtool script does some magic so that the applications will run using the shared libraries in the build directory, instead of any libraries installed on the system. To run an application with GDB, you have to run GDB through libtool, like so:
 
Net-SNMP uses libtool while building it's applications. This means that sometimes the applications in the source/build directory are not actually binaries, but shell scripts. The libtool script does some magic so that the applications will run using the shared libraries in the build directory, instead of any libraries installed on the system. To run an application with GDB, you have to run GDB through libtool, like so:
   −
  $ '''./libtool gdb agent/snmpd'''
+
  $ '''./libtool --mode=execute gdb agent/snmpd'''
 
  (gdb) '''run -f -Lo'''
 
  (gdb) '''run -f -Lo'''
    
If testing snmpd (or another application) from within the source tree, you'll need to run gdb via libtool:
 
If testing snmpd (or another application) from within the source tree, you'll need to run gdb via libtool:
   −
  $ '''./libtool gdb agent/snmpd /tmp/core.70816'''
+
  $ '''./libtool --mode=execute gdb agent/snmpd /tmp/core.70816'''
   Exception encountered, of type "Error"