public inbox for frysk@sourceware.org
 help / color / mirror / Atom feed
* hpd command for DisplayValues
@ 2007-06-14 16:40 Adam Jocksch
  2007-06-14 17:04 ` Stan Cox
  0 siblings, 1 reply; 6+ messages in thread
From: Adam Jocksch @ 2007-06-14 16:40 UTC (permalink / raw)
  To: frysk; +Cc: Andrew Cagney

Ok, DisplayValues now work and, to a certain degree, auto-update. The 
next step is probably adding a command to the hpd to create a value 
display. Now the question is how should we format the command? Something 
like 'display x+y'?

Opinions?

Adam

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

* Re: hpd command for DisplayValues
  2007-06-14 16:40 hpd command for DisplayValues Adam Jocksch
@ 2007-06-14 17:04 ` Stan Cox
  2007-06-14 17:15   ` Adam Jocksch
  0 siblings, 1 reply; 6+ messages in thread
From: Stan Cox @ 2007-06-14 17:04 UTC (permalink / raw)
  To: Adam Jocksch; +Cc: Frysk List

On Thu, 2007-06-14 at 09:56 -0600, Adam Jocksch wrote:
> how should we format the command?

I see what you mean; there doesn't seem to be an equivalent hpd request.
Could display be another actionpoint (section 2.7) along with
breakpoints, watchpoints, and barriers?
(fhpd) display xxx
(fhpd) actions -display
 xxx ...
(fhpd) disable -display
(fhpd) enable -display

(just a thought)



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

* Re: hpd command for DisplayValues
  2007-06-14 17:04 ` Stan Cox
@ 2007-06-14 17:15   ` Adam Jocksch
  2007-06-14 17:18     ` Andrew Cagney
  0 siblings, 1 reply; 6+ messages in thread
From: Adam Jocksch @ 2007-06-14 17:15 UTC (permalink / raw)
  To: Stan Cox; +Cc: Frysk List

Stan Cox wrote:
>
> I see what you mean; there doesn't seem to be an equivalent hpd request.
> Could display be another actionpoint (section 2.7) along with
> breakpoints, watchpoints, and barriers?
> (fhpd) display xxx
> (fhpd) actions -display
>  xxx ...
> (fhpd) disable -display
> (fhpd) enable -display
>
> (just a thought)
>
>
>   
Hrm, maybe. Although reading in the hpd spec: "By defining actionpoints, 
the user may request in advance that target program execution stop
under certain conditions". Do we want the display to be similar to a 
watchpoint, except it applies to an expression rather than a single 
variable? Or do we want it to be an expression that is displayed when 
the program stops (I remember Andrew saying something about how gdb does 
this, and it's bad, so we probably want to avoid that).

While what the DisplayValue object is capable is well defined, I guess 
I'm not 100% sure of how it will be used.

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

* Re: hpd command for DisplayValues
  2007-06-14 17:15   ` Adam Jocksch
@ 2007-06-14 17:18     ` Andrew Cagney
  2007-06-14 17:34       ` Adam Jocksch
  0 siblings, 1 reply; 6+ messages in thread
From: Andrew Cagney @ 2007-06-14 17:18 UTC (permalink / raw)
  To: Adam Jocksch; +Cc: Stan Cox, Frysk List

Adam Jocksch wrote:
> Hrm, maybe. Although reading in the hpd spec: "By defining 
> actionpoints, the user may request in advance that target program 
> execution stop

Nice quote, the display object doesn't fit that model since it is 
passive - it doesn't directly trigger a stop since it doesn't implement 
a mechanism for detecting changes in the data (that would be watch).  
Instead it detects when the variable has changed after a stop.

For the command line, consider this:

> [] break main
> [] run ....
> main hit
> [] print argc
> ...
> [] step
> [] print argc
> [] step

vs:

> [] break main
> [] run ....
> main hit
> [] display argc
> ...
> [] step
> ... value of argc changed from 4 to -1
> [] step
> [] step
> Value of argc changed from -1 to 4

For a graphical interface the object facilitates the efficient 
implementation of a variable display window - it will only trigger a 
redraw of the display elements of the X display when there's something 
new to draw.

Andrew

> under certain conditions". Do we want the display to be similar to a 
> watchpoint, except it applies to an expression rather than a single 
> variable? Or do we want it to be an expression that is displayed when 
> the program stops (I remember Andrew saying something about how gdb 
> does this, and it's bad, so we probably want to avoid that).
>
> While what the DisplayValue object is capable is well defined, I guess 
> I'm not 100% sure of how it will be used.

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

* Re: hpd command for DisplayValues
  2007-06-14 17:18     ` Andrew Cagney
@ 2007-06-14 17:34       ` Adam Jocksch
  2007-06-14 17:51         ` Andrew Cagney
  0 siblings, 1 reply; 6+ messages in thread
From: Adam Jocksch @ 2007-06-14 17:34 UTC (permalink / raw)
  To: Andrew Cagney; +Cc: Stan Cox, Frysk List

Andrew Cagney wrote:
> Adam Jocksch wrote:
>> Hrm, maybe. Although reading in the hpd spec: "By defining 
>> actionpoints, the user may request in advance that target program 
>> execution stop
>
> Nice quote, the display object doesn't fit that model since it is 
> passive - it doesn't directly trigger a stop since it doesn't 
> implement a mechanism for detecting changes in the data (that would be 
> watch).  Instead it detects when the variable has changed after a stop.
>
> For the command line, consider this:
>
>> [] break main
>> [] run ....
>> main hit
>> [] print argc
>> ...
>> [] step
>> [] print argc
>> [] step
>
> vs:
>
>> [] break main
>> [] run ....
>> main hit
>> [] display argc
>> ...
>> [] step
>> ... value of argc changed from 4 to -1
>> [] step
>> [] step
>> Value of argc changed from -1 to 4
>
> For a graphical interface the object facilitates the efficient 
> implementation of a variable display window - it will only trigger a 
> redraw of the display elements of the X display when there's something 
> new to draw.
>
> Andrew
>
>> under certain conditions". Do we want the display to be similar to a 
>> watchpoint, except it applies to an expression rather than a single 
>> variable? Or do we want it to be an expression that is displayed when 
>> the program stops (I remember Andrew saying something about how gdb 
>> does this, and it's bad, so we probably want to avoid that).
>>
>> While what the DisplayValue object is capable is well defined, I 
>> guess I'm not 100% sure of how it will be used.
>
That sounds similar to what I had envisioned.

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

* Re: hpd command for DisplayValues
  2007-06-14 17:34       ` Adam Jocksch
@ 2007-06-14 17:51         ` Andrew Cagney
  0 siblings, 0 replies; 6+ messages in thread
From: Andrew Cagney @ 2007-06-14 17:51 UTC (permalink / raw)
  To: Adam Jocksch; +Cc: Stan Cox, Frysk List

BTW, a gdb interaction looks like the below.  The background to know is 
that "display" and "examine" are closely related vis:

(gdb) x/i $pc
0x807b6c0 <main>:       lea    0x4(%esp),%ecx
(gdb) stepi
0x0807b6c4      28      {
(gdb) x/i $pc
0x807b6c4 <main+4>:     and    $0xfffffff0,%esp
(gdb) stepi
0x0807b6c7      28      {
(gdb) display/i $pc
1: x/i $pc  0x807b6c7 <main+7>: pushl  0xfffffffc(%ecx)
(gdb) stepi
0x0807b6ca in main (argc=0x1, argv=0xbff4d0d4) at ../../gdb/gdb.c:28
28      {
1: x/i $pc  0x807b6ca <main+10>:        push   %ebp
(gdb)
0x0807b6cb      28      {
1: x/i $pc  0x807b6cb <main+11>:        mov    %esp,%ebp

The output reflects how "display" is implemented using the lower-level 
"examine" command - it doesn't detect change.

Andrew


Adam Jocksch wrote:
> Andrew Cagney wrote:
>> Adam Jocksch wrote:
>>> Hrm, maybe. Although reading in the hpd spec: "By defining 
>>> actionpoints, the user may request in advance that target program 
>>> execution stop
>>
>> Nice quote, the display object doesn't fit that model since it is 
>> passive - it doesn't directly trigger a stop since it doesn't 
>> implement a mechanism for detecting changes in the data (that would 
>> be watch).  Instead it detects when the variable has changed after a 
>> stop.
>>
>> For the command line, consider this:
>>
>>> [] break main
>>> [] run ....
>>> main hit
>>> [] print argc
>>> ...
>>> [] step
>>> [] print argc
>>> [] step
>>
>> vs:
>>
>>> [] break main
>>> [] run ....
>>> main hit
>>> [] display argc
>>> ...
>>> [] step
>>> ... value of argc changed from 4 to -1
>>> [] step
>>> [] step
>>> Value of argc changed from -1 to 4
>>
>> For a graphical interface the object facilitates the efficient 
>> implementation of a variable display window - it will only trigger a 
>> redraw of the display elements of the X display when there's 
>> something new to draw.
>>
>> Andrew
>>
>>> under certain conditions". Do we want the display to be similar to a 
>>> watchpoint, except it applies to an expression rather than a single 
>>> variable? Or do we want it to be an expression that is displayed 
>>> when the program stops (I remember Andrew saying something about how 
>>> gdb does this, and it's bad, so we probably want to avoid that).
>>>
>>> While what the DisplayValue object is capable is well defined, I 
>>> guess I'm not 100% sure of how it will be used.
>>
> That sounds similar to what I had envisioned.

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

end of thread, other threads:[~2007-06-14 17:34 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-06-14 16:40 hpd command for DisplayValues Adam Jocksch
2007-06-14 17:04 ` Stan Cox
2007-06-14 17:15   ` Adam Jocksch
2007-06-14 17:18     ` Andrew Cagney
2007-06-14 17:34       ` Adam Jocksch
2007-06-14 17:51         ` Andrew Cagney

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