root/gdb_bdm @ 35

Revision 33, 0.8 kB (checked in by smidl, 16 years ago)

Oprava PF a MPF + jejich implementace pro pmsm system

Line 
1# This file defines handy gdb macros for printing out ITPP types
2# To use it, add this line to your ~/.gdbinit :
3# source gdb_bdm
4
5define dm
6   set $i=0
7
8   set $M = $arg0
9   set $rs = $M.no_rows
10   set $col = $M.no_cols
11
12   while $i < $rs
13     set $j=0
14     printf "["
15     while $j< $col
16        printf "%f,",  $M.data[$j*$rs+$i]
17        set $j++
18     end
19     printf "]"
20     printf "\n"
21     set $i++
22   end
23end
24
25define dme
26   set $i=0
27
28   set $M = $arg0
29   set $rs = $M.no_rows
30   set $col = $M.no_cols
31
32   while $i < $rs
33     set $j=0
34     printf "["
35     while $j< $col
36        printf "%e,", $M.data[$j*$col+$i]
37        set $j++
38     end
39     printf "]"
40     printf "\n"
41     set $i++
42   end
43end
44
45define dv
46    print $arg0.data[0]@($arg0.datasize)
47end
48
49define dl
50   dm $M.L
51   dv $M.D
52end
Note: See TracBrowser for help on using the browser.