bug-gdb
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Bug in gdb-5.1.1


From: Rob Stevens
Subject: Bug in gdb-5.1.1
Date: Sun, 27 Jan 2002 22:19:42 -0800
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.2.1) Gecko/20010901

The debugger seems to be hopeless confused about the line numbers in the source code.
Here is an example (you don't need the source code to understand that it
cannot be correct)

stepping with "next":

149 int cktype=CHECKTIM,errors=0,i, mod, bangf, ownf, safef, diff, nsys;(gdb)
159         lbl0();
(gdb)
160         printf("setrecv: process received files ...\n");
(gdb)
163         for(argv++; --argc > 0 && argv[0][0]=='-'; argv++) {
(gdb)
160         printf("setrecv: process received files ...\n");
(gdb)
setrecv: process received files ...
163         for(argv++; --argc > 0 && argv[0][0]=='-'; argv++) {

As you can see the printf statement at line 160 is hit twice (according to gdb)
with no branch to make that happen. The first report at line 160 is bogus
because the program being debugged doesn't print anything. Only the
second line160 trace is correct.

This appears to happen with any programs on which I run gdb.


Here are details:
gdb-5.1.1 build from sources:
       configure
   .    ...
       system reported as  i686-pc-linux-gnu
compiled with gcc-2.96
OS is RedHat Linux 7.2   (Linux kernel 2.4.7)


What on earth is wrong here?? This must be a major snafu


Rob Stevens








reply via email to

[Prev in Thread] Current Thread [Next in Thread]