[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Nested control structures in Apple GDB broken?
From: |
Andrew Cagney |
Subject: |
Re: Nested control structures in Apple GDB broken? |
Date: |
Mon, 13 Dec 2004 14:47:52 -0500 |
User-agent: |
Mozilla Thunderbird 0.8 (X11/20041020) |
Ryan Govostes wrote:
However, if I try this:
if($r3 == 0)
printf "$r3 is 0.\n"
else
if($r3 > 0)
printf "$r3 is greater than 0.\n"
else
printf "$r3 is less than 0.\n"
end
end
On Fedora Core 3 I'm seeing:
GNU gdb 6.3.50_2004-12-12-cvs
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain
conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for details.
This GDB was configured as "powerpc-unknown-linux-gnu"...Using host
libthread_db library "/lib/tls/libthread_db.so.1".
Setting up the environment for debugging gdb.
Breakpoint 1 at 0x1005c41c: file /home/scratch/GDB/src/gdb/utils.c, line
873.
Breakpoint 2 at 0x1009ae7c: file
/home/scratch/GDB/src/gdb/cli/cli-cmds.c, line 193.
(top-gdb) b main
Breakpoint 3 at 0x1004e62c: file /home/scratch/GDB/src/gdb/gdb.c, line 31.
(top-gdb) run
Starting program:
/home/scratch/GDB/N-localhost-powerpc-unknown-linux-gnu/gdb/gdb
Breakpoint 3, main (argc=0x1, argv=0x7ffff944)
at /home/scratch/GDB/src/gdb/gdb.c:31
31 args.argc = argc;
(top-gdb) if($r3 == 0)
> printf "$r3 is 0.\n"
>else
> if($r3 > 0)
> printf "$r3 is greater than 0.\n"
>else
> printf "$r3 is less than 0.\n"
>end
>end
$r3 is greater than 0.
(top-gdb) print $r3
$1 = 0x1
(top-gdb)
of course this GDB won't help you.
Andrew