LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 08-12-2004, 04:48 PM   #1
tcma
Member
 
Registered: Aug 2004
Distribution: gentoo, Fedora Core
Posts: 54

Rep: Reputation: 15
my program does not single step with gdb in kdevelop


My program run like this:
$ snmpbulkwalkap -v 2c -c public 192.168.0.50

I compile with "-g" option:
...
/bin/sh ../libtool --mode=compile gcc -I../include -I../include -I.. -I./.. -I./../snmplib -I./../agent -I../agent/helpers -I./../agent/mibgroup -g -O2 -Dlinux -c -o snmpbulkwalkap.lo snmpbulkwalkap.c
rm -f .libs/snmpbulkwalkap.lo
gcc -I../include -I../include -I.. -I./.. -I./../snmplib -I./../agent -I../agent/helpers -I./../agent/mibgroup -g -O2 -Dlinux -c snmpbulkwalkap.c -fPIC -DPIC -o .libs/snmpbulkwalkap.lo
gcc -I../include -I../include -I.. -I./.. -I./../snmplib -I./../agent -I../agent/helpers -I./../agent/mibgroup -g -O2 -Dlinux -c snmpbulkwalkap.c -o snmpbulkwalkap.o >/dev/null 2>&1
mv -f .libs/snmpbulkwalkap.lo snmpbulkwalkap.lo
/bin/sh ../libtool --mode=link gcc -o snmpbulkwalkap snmpbulkwalkap.lo -L../snmplib -L../agent -L../agent/helpers ../snmplib/libnetsnmp.la -lcrypto -lm
gcc -o .libs/snmpbulkwalkap snmpbulkwalkap.o -L/home/tcma/net-snmp-5.1.1/snmplib -L/home/tcma/net-snmp-5.1.1/agent -L/home/tcma/net-snmp-5.1.1/agent/helpers ../snmplib/.libs/libnetsnmp.so -lcrypto -lm -Wl,--rpath -Wl,/usr/local/lib
creating snmpbulkwalkap

Inside kdevelop, I set two breakpoints at lines:
fprintf(stderr, "tcma 1 argc %d\n", argc);
fprintf(stderr, "tcma 2\n");

When the debugger is started inside kdevelop, it stopped at the first breakpoint, when I click the "Step over" button, the debugger do not single step to next line.
Why?

This is the gdb output:

gdb /home/tcma/net-snmp-5.1.1/apps/.libs/snmpbulkwalkap -fullname -nx -quiet
(gdb) set edit off
(gdb) set confirm off
Using host libthread_db library "/lib/libthread_db.so.1".
(gdb)
(gdb)
(gdb) set print static-members off
(gdb) tty /dev/pts/18
(gdb) set width 0
(gdb) set height 0
(gdb) set stop-on 1
(gdb) handle SIG32 pass nostop noprint
(gdb) handle SIG43 pass nostop noprint
(gdb) set print asm-demangle on
(gdb) cd /home/tcma/net-snmp-5.1.1/apps
(gdb) set args -v 2c -c public 192.168.0.50
(gdb) break snmpbulkwalkap.c:200
Breakpoint 1 at 0x401452: file snmpbulkwalkap.c, line 200.
(gdb) break snmpbulkwalkap.c:201
Breakpoint 2 at 0x401495: file snmpbulkwalkap.c, line 201.
(gdb) run
warning:
Unable to find dynamic linker breakpoint function.
GDB will be unable to debug shared library initializers
and track explicitly loaded dynamic code.
(gdb) backtrace
Stopped due to shared library event
#0 0x0000000000401080 in _start ()
(gdb) frame 0
#0 0x0000000000401080 in _start ()
(gdb) next
Single stepping until exit from function _start,
which has no line number information.


GNU gdb 6.0
kdevelop 3.0.4 on kde 3.2.2.
Linux version 2.6.7-gentoo-r11 (root@rose) (gcc version 3.4.1 (Gentoo Linux 3.4.1, ssp-3.4-2, pie-8.7.6.3))
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
unable to step through function in shared object library using gdb markhod Programming 2 01-03-2009 02:00 AM
KDevelop - can't start gdb soichih Linux - Software 15 11-09-2005 09:10 AM
gdb won't single step thru the function frankie_DJ Programming 2 10-06-2004 05:50 AM
using gdb with kdevelop 3.0 asmith Programming 7 05-16-2004 05:45 AM
kdevelop + gdb Zig Linux - Software 0 09-07-2003 12:49 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 08:25 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration