This is the mail archive of the
gdb@sources.redhat.com
mailing list for the GDB project.
Re: Bug in gdb-5.1.1
- From: Andrew Cagney <ac131313 at cygnus dot com>
- To: Rob Stevens <robs at cruzio dot com>
- Cc: gdb at sources dot redhat dot com
- Date: Thu, 07 Mar 2002 13:36:08 -0500
- Subject: Re: Bug in gdb-5.1.1
- References: <3C54ED7E.6050104@cruzio.com>
Hello,
Can I suggest trying this with a current GDB
(http://sources.redhat.com/gdb/current/) and if the problem still
occures, filing a bug (http://sources.redhat.com/gdb/bugs/).
Andrew
> 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