root/linux/gdb_bdm @ 306

Revision 270, 1.3 kB (checked in by smidl, 15 years ago)

Changes in the very root classes!
* rv and rvc are no longer compulsory,
* samplecond does not return ll
* BM has drv

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        output $M.data[$j*$rs+$i]
17        printf " "
18        set $j++
19     end
20     printf "]"
21     printf "\n"
22     set $i++
23   end
24end
25
26define dm2
27   set $i=0
28
29   set $M = $arg0
30   set $rs = $M.no_rows
31   set $col = $M.no_cols
32
33   while $i < $rs
34     set $j=0
35     printf "["
36     while $j< $col
37        printf "%2.2f,",$M.data[$j*$rs+$i]
38        printf " "
39        set $j++
40     end
41     printf "]"
42     printf "\n"
43     set $i++
44   end
45end
46
47define dav
48   set $i=0
49   printf "{"
50   while $i < $arg0.ndata
51     dv $arg0.data[$i]
52     set $i++
53   end
54   printf "}"
55end
56
57define dam
58   set $i=0
59   printf "{"
60   while $i < $arg0.ndata
61     dm $arg0.data[$i]
62     set $i++
63   end
64   printf "}"
65end
66
67define das
68   set $i=0
69   printf "{"
70   while $i < $arg0.ndata
71     p $arg0.data[$i]
72     set $i++
73   end
74   printf "}"
75end
76
77define dv
78        if $arg0.datasize >0
79        output $arg0.data[0]@($arg0.datasize)
80        else
81                printf "{}"
82        end
83end
84
85define dl
86   dm $arg0.L
87   dv $arg0.D
88end
89
90define drv
91        dv $arg0.ids
92        dv $arg0.times
93end
Note: See TracBrowser for help on using the browser.