public inbox for insight@sourceware.org
 help / color / mirror / Atom feed
* Displaying vectors in register window
@ 2003-06-26 21:18 Fred Fish
  2003-06-26 21:30 ` Keith Seitz
  0 siblings, 1 reply; 2+ messages in thread
From: Fred Fish @ 2003-06-26 21:18 UTC (permalink / raw)
  To: insight; +Cc: fnf

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Displaying vectors in register window
  2003-06-26 21:18 Displaying vectors in register window Fred Fish
@ 2003-06-26 21:30 ` Keith Seitz
  0 siblings, 0 replies; 2+ messages in thread
From: Keith Seitz @ 2003-06-26 21:30 UTC (permalink / raw)
  To: fnf; +Cc: insight

On Thu, 2003-06-26 at 14:18, Fred Fish wrote:
> 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?

None that I know of, but that doesn't really help you much. :-( I would
suggest experimenting with the table if you think this is a posibility.

>   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.

You can right-click the name of the register and it will show a list of
the different types, i.e, v4_float, v2_double, v16_int8, etc. Choose one
of them to display the register in that "format". Martin added this
feature some time ago. Maybe he'll drop in for a comment.

> One last question, how hard would it be to format each of the
> registers value into something other than a 1xN list.

Unlike almost every other debugger on the planet which uses a listbox
for registers, the Insight window is much more densely populated.
Allowing the display of registers this way would require a rather
fundemental rewrite of the register window for this. It's sad, but
that's the way it is (right now, at least -- and probably forever).

IMO, the easiest way to do specialized register displays (as I've long
advocated) is via the plug-in mechanism. This would be exceptionally
easier to implement, since it's basically a blank slate. (The plug-in
mechanism also allows you to only activate the code on your own terms,
i.e., if your username is "harry potter", or you're debugging a certain
target, or on a specific host, etc.)

I wish I had better news. Sorry.
Keith


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2003-06-26 21:30 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-06-26 21:18 Displaying vectors in register window Fred Fish
2003-06-26 21:30 ` Keith Seitz

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).