Subject: Re: Info needed. Something is wrong with my gdb.
To: Haru Mizuno <mizuno@tanuki.twics.com>
From: Allen Briggs <briggs@puma.bevd.blacksburg.va.us>
List: macbsd-general
Date: 07/02/1995 14:32:18
I offer my sincere apologies for how long it's taken to get back
to you...

> Some questions about gdb.  Running gdb on NetBSD/mac68k[1.0], I came
> up with some unexpected behaviour of the debugger:

I think that most of these problems are fixed with the current kernel
and binaries.  There are still some problems with disabling breakpoints
and so forth.  I tried your test and it seems much better...

>   > (gdb) break 9
>   > Breakpoint 1 at 0x2700: file loop.c, line 9.
>   > (gdb) run
>   > Starting program: /home/mizuno/TestStuff/progs/./loop 
>   > 
>   > Breakpoint 1, main () at loop.c:9
>   > 9             (void)printf("Loop count = %d.\n", i);
>   > (gdb) print i
>   > $1 = 4
>   > (gdb) print i
>   > $2 = 0            <== gdb reports bad value
>   > (gdb) 

Here's what I get, now:
> (gdb) break 9
> Breakpoint 1 at 0x26e0: file loop.c, line 9.
> (gdb) run
> Starting program: /tmp/loop 
> 
> Breakpoint 1, main () at loop.c:9
> 9             (void)printf("Loop count = %d.\n", i);
> (gdb) print i
> $1 = 4
> (gdb) 
> $2 = 4
> (gdb) cont
> Continuing.
> Loop count = 4.
> 
> Breakpoint 1, main () at loop.c:9
> 9             (void)printf("Loop count = %d.\n", i);
> (gdb) print i
> $3 = 5
> (gdb) 

Thanks for the report.  The problem was in the kernel vs. the
definitions that gdb was using, I think.

-allen

-- 
Allen Briggs - end killing - allen.briggs@bev.net ** MacBSD == NetBSD/mac68k **