🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.windows.x.kde
Article #37

my program does not single step with gdb in kdevelop

#37
From: TCMA
Date: Sat, 14 Aug 2004 00:40
78 lines
3854 bytes
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))
Technical Details
Message-ID: <226c0d0a.0408131640.9b064f6@posting.google.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!postnews2.google.com!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Thread: 10baf0,42bb496a01bed355,start
X-Google-Thread: 1103af,42bb496a01bed355,start
X-Google-Thread: ff9be,42bb496a01bed355,start
X-Google-Thread: 10f557,42bb496a01bed355,start
X-Google-Thread: 11318c,42bb496a01bed355,start
X-Google-Attributes: gid10baf0,gid1103af,gidff9be,gid10f557,gid11318c,public
X-Google-Language: ENGLISH,ASCII-7-bit
Path: arc1-ca.pugleaf.net!g2news1.google.com!postnews2.google.com!not-for-mail
From: maottawa2@yahoo.ca (TCMA)
Newsgroups: comp.windows.x.kde,comp.os.linux.misc,comp.os.linux.questions,alt.os.linux.gentoo,gnu.gcc.help
Subject: my program does not single step with gdb in kdevelop
Date: 13 Aug 2004 17:40:27 -0700
Organization: http://groups.google.com
Lines: 78
Message-ID: <226c0d0a.0408131640.9b064f6@posting.google.com>
NNTP-Posting-Host: 64.230.31.230
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 8bit
X-Trace: posting.google.com 1092444028 2478 127.0.0.1 (14 Aug 2004 00:40:28 GMT)
X-Complaints-To: groups-abuse@google.com
NNTP-Posting-Date: Sat, 14 Aug 2004 00:40:28 +0000 (UTC)