ddd
[Top][All Lists]
Advanced

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

Convenience variables and the 'graph' command


From: Raoul Nigel Haynes
Subject: Convenience variables and the 'graph' command
Date: Wed, 07 Nov 2001 17:58:56 +0000

Hi Gurus,
        I use Ddd 3.3 in conjunction with GDB for embedded target development.
The host OS is Linux - Mandrake 8.0 kernel 2.4.3-20.

        I am currently writing  'automatic' command scripts that use the Ddd
'graph' command to display array elements. I want to use a convenience
variable to index the array but this doesn't seem to work in conjunction
with the 'graph' command. An example:

define foo
  set $i = $arg0
  while $i <= $arg1
    graph display A[$i].elem
    set $i = $i + 1
  end
end

The result is a number of displays all labelled 'array[$i]' and all
containing the last value of '$i'. I would have expected to see a
display labelled
'array[0] .. array[x]' with their associated values.

I suspect the problem is that convenience variables are only known to
GDB thus
the Ddd 'graph' command does not know how to handle properly. Is there a
way to 'export' GDB convenience variables to Ddd so that their actual
values are used? 

Note1 :- I can't index the array using the '$argX' because they are not
lvalues hence '$arg0++' will not work. 

Note2 :- The 'from..to' notation does not work for more complex
expressions e.g. to display a 64bit word from two 32bit words:

define foo
 graph display (long long)A[$arg0..$arg1].elemH << 32 |
A[$arg0..$arg1].elemL
end

(For ranges 0..1 you get 0|0, 0|1, 1|0, 1|1)!

I am running out of permutations! Any help appreciated.

Regards,
--Raoul.



reply via email to

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