This is the mail archive of the insight@sources.redhat.com mailing list for the Insight project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Displaying vectors in register window


I'm working on a MIPS port that has a matrix coprocessor.  The
coprocessor has 32 registers, each of which can hold a 16 element
32-bit vector, organized as a matrix.  I.E the $m0 register is
initialized in C code with something like:

  matrix_t mval = {3,1,4,1,5,9,2,6,5,3,5,8,9,7,9,2};

I've made some changes to gdb to extend the existing vector support to
handle vectors that are 512 bits (16 regs X 32 bits), and from the
command line, this works fine.  For example, printing $m0 gives:

  (gdb) p $m0
  $1 = { v32_int16 = {0, 3, 0, 1, 0, 4, 0, 1, 0, 5, 0, 9, 0, 2, 0, 6, 0, 5, 0, 3, 0, 5, 0, 8, 0, 9, 0, 7, 0, 9, 0, 2}, v16_int32 = {3, 1, 4, 1, 5, 9, 2, 6, 5, 3, 5, 8, 9, 7, 9, 2}}

However using insight, this long of a string apparently chokes the
register window handling, as the scroll bar behaves very erratically
and the window contents get scrambled.  Is there some sort of length
limitation that could be causing this?

I tried using an x86 targeted insight (current CVS version) on RedHat
9 and it seems to handle the xmmN and mmN registers without choking.
I did notice though that it only displays the elements of the first
view.  I.E. if the command line prints:

  xmm0           {v4_float = {0x0, 0x0, 0x0, 0x0}, v2_double = {0x0, 0x0}, v16_int8 = {0x0 <repeats 16 times>}, v8_int16 = {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0}, v4_int32 = {0x0, 0x0, 0x0, 0x0}, v2_int64 = {0x0, 0x0}, uint128 = 0x00000000000000000000000000000000}

the register window only displays the v4_float view of the register
contents.  There doesn't appear to be any way to select the other
views, say the v8_int16 one.

One last question, how hard would it be to format each of the
registers value into something other than a 1xN list.  I.E. ideally
for our use we would prefer to see the $m0 example above formatted in
the register window as something like:

	m0	3	1	4	1

		5	9	2	6

		5	3	5	8

		9	7	9	2

	m1	..	..	..	..

		..	..	..	..

Thanks for any suggestion for resolving the display problem and hints
for how hard it would be to implement some more data specific methods
for viewing/formatting the output.

-Fred


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]