[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
convenience variable rejected in array cast
From: |
Vincent Liard |
Subject: |
convenience variable rejected in array cast |
Date: |
Wed, 10 Jun 2009 14:10:32 +0000 (UTC) |
User-agent: |
Pan/0.132 (Waxed in Black) |
Hello,
I am experiencing trouble with GDB 6.8-debian through emacs 22.2.1 while
casting a pointer to an array using "convenience variables" to indicate
its dimensions.
As an example, I have defined variables $lines and $columns.
(gdb) set $lines = 6
(gdb) set $columns = 6
I have an 6x6 array of doubles called "p" as shown below.
(gdb) print (double[6][6])*p
$12 = {{1, 0, 0, 0, 0, 0}, {0, 1, 0, 0, 0, 0}, {0, 0, 1, 0, 0, 0}, {0, 0,
0, 1, 0, 0}, {0, 0, 0, 0, 1, 0}, {0, 0, 0, 0, 0, 1}}
I just replace the explicit constants (6) by my variables $lines and
$columns in the above expression and it nolonger works.
(gdb) print (double[$lines][$columns])*p
A syntax error in expression, near `$lines][$columns])*p'.
It may be a limitation, not a bug, but I have found no clue. Could anyone
tell me if I'm doing anything wrong ?
Thanks !
Vincent Liard
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- convenience variable rejected in array cast,
Vincent Liard <=