Dear all,
I have managed to build my own agent successfully after following the subagent tutorial.
I am now trying to debug this subagent using gdb. The problem is that gdb is not stepping into a function coming from the shared libraries of net-snmp when I request him to do so.
Could you please guide me in order to perform proper debugging of this sub-agent.
If it helps this is my makefile:
CC=g++
CFLAGS= -g -DHL_LINUX
OBJS = xb-subagent.o
BUILDAGENTLIBS=-L/usr/local/lib -lnetsnmpmibs -ldl -lnetsnmpagent -Wl,-E -lnetsnmp -lm -lrt -lpthread
all: xb-subagent
xb-subagent: $(OBJS)
$(CC) $(OBJS) -o xb-subagent $(BUILDAGENTLIBS)
xb-subagent.o: xb-subagent.cpp
$(CC) $(CFLAGS) -c xb-subagent.cpp
clean:
rm $(OBJS) xb-subagent
Thanks and best regards,
Chris
Just a quick note:
Managed to solve this problem myself by adding
"export LD_LIBRARY_PATH=/usr/local/lib"
Regards,
Chris