public inbox for gdb@sourceware.org
 help / color / mirror / Atom feed
* Re: [rfc] Annotation level THREE
       [not found]           ` <3E774292.8070603@redhat.com>
@ 2003-03-21 17:53             ` Nick Roberts
  2003-03-21 19:22               ` Andrew Cagney
  0 siblings, 1 reply; 7+ messages in thread
From: Nick Roberts @ 2003-03-21 17:53 UTC (permalink / raw)
  To: Andrew Cagney; +Cc: Nick Roberts, gdb, bob_rossi

 > > Perhaps I could turn that question round. Which annotations are you planning
 > > to keep?
 > 
 > I think annotations can be split into two categores:
 > 
 > - events
 > These let GDB notify the GUI of internal state changes.
 > 
 > - markups
 > These try to make CLI output, intended solely for a human, machine parsable.
 > 
 > The events remain (target changed, breakpoint created, ....).  The 
 > markups are removed (*-{begin,end})

I would like to try this approach. Firstly for pragmatic reasons: this is
what is being offered. Secondly, it will give me a chance to experiment with
things like variable objects.

I have just one question:

How long do you expect level 3 annotations would remain in GDB?

Nick

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

* Re: [rfc] Annotation level THREE
  2003-03-21 17:53             ` [rfc] Annotation level THREE Nick Roberts
@ 2003-03-21 19:22               ` Andrew Cagney
  0 siblings, 0 replies; 7+ messages in thread
From: Andrew Cagney @ 2003-03-21 19:22 UTC (permalink / raw)
  To: Nick Roberts; +Cc: gdb, bob_rossi

>  > > Perhaps I could turn that question round. Which annotations are you planning
>  > > to keep?
>  > 
>  > I think annotations can be split into two categores:
>  > 
>  > - events
>  > These let GDB notify the GUI of internal state changes.
>  > 
>  > - markups
>  > These try to make CLI output, intended solely for a human, machine parsable.
>  > 
>  > The events remain (target changed, breakpoint created, ....).  The 
>  > markups are removed (*-{begin,end})
> 
> I would like to try this approach. Firstly for pragmatic reasons: this is
> what is being offered. Secondly, it will give me a chance to experiment with
> things like variable objects.
> 
> I have just one question:
> 
> How long do you expect level 3 annotations would remain in GDB?

How long is a piece of string?

Seriously.

Since the event notifications don't intrude into the CLI, and the new 
underlying event mechanism (observer.[hc]) is common to both annotations 
and the MI, I don't see there being a compelling reason to remove that 
mechanism (it's maintenance overhead is very low).

Contrast that to the markups that GDB is pushing hard to remove.  Their 
implementation intrudes badly into the CLI and hence, make it hard for 
GDB developers to consider even minor changes (for fear of breaking a 
GUI :-().

Andrew


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

* Re: [rfc] Annotation level THREE
       [not found]           ` <3E773B59.90403@redhat.com>
@ 2003-03-27 20:51             ` Nick Roberts
  2003-03-28 22:30               ` Andrew Cagney
  0 siblings, 1 reply; 7+ messages in thread
From: Nick Roberts @ 2003-03-27 20:51 UTC (permalink / raw)
  To: Andrew Cagney; +Cc: gdb


 > ...Further, unless your using some sort of changes-only 
 > mechanism, such as provided by the varobj, the display windows are just 
 > not going to scale.

If I change the value of a simple data type then I can see it in the
changelist. However, when I change an array value or that of a structure I
don't.

e.g

-var-create - * i
^done,name="var1",numchild="0",type="int"
(gdb) 
-var-create - * r
^done,name="var2",numchild="10",type="double [10]"
(gdb) 
set var i=3
&"set var i=3\n"
^done
(gdb) 
-var-update *
^done,changelist=[{name="var1",in_scope="true",type_changed="false"}]
(gdb) 
set var r[3]=6
&"set var r[3]=6\n"
^done
(gdb) 
-var-update *
^done,changelist=[]
(gdb) 

Is there a way round this?

Nick

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

* Re: [rfc] Annotation level THREE
  2003-03-27 20:51             ` Nick Roberts
@ 2003-03-28 22:30               ` Andrew Cagney
  2003-03-30 14:59                 ` variable objects (was: [rfc] Annotation level THREE) Nick Roberts
  0 siblings, 1 reply; 7+ messages in thread
From: Andrew Cagney @ 2003-03-28 22:30 UTC (permalink / raw)
  To: Nick Roberts; +Cc: gdb

> -var-create - * i
> ^done,name="var1",numchild="0",type="int"
> (gdb) 
> -var-create - * r
> ^done,name="var2",numchild="10",type="double [10]"
> (gdb) 
> set var i=3

Do -var-assign or -var-evaluate-expression work?  Regardless, this looks 
like a bug.

> &"set var i=3\n"
> ^done
> (gdb) 
> -var-update *
> ^done,changelist=[{name="var1",in_scope="true",type_changed="false"}]
> (gdb) 
> set var r[3]=6
> &"set var r[3]=6\n"
> ^done
> (gdb) 
> -var-update *
> ^done,changelist=[]
> (gdb) 


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

* variable objects (was: [rfc] Annotation level THREE)
  2003-03-28 22:30               ` Andrew Cagney
@ 2003-03-30 14:59                 ` Nick Roberts
  2003-03-30 15:11                   ` Andrew Cagney
  0 siblings, 1 reply; 7+ messages in thread
From: Nick Roberts @ 2003-03-30 14:59 UTC (permalink / raw)
  To: Andrew Cagney; +Cc: gdb

Andrew Cagney writes:
 > > -var-create - * i
 > > ^done,name="var1",numchild="0",type="int"
 > > (gdb) 
 > > -var-create - * r
 > > ^done,name="var2",numchild="10",type="double [10]"
 > > (gdb) 
 > > set var i=3
 > 
 > Do -var-assign or -var-evaluate-expression work?  Regardless, this looks 
 > like a bug.
 > 
 > > &"set var i=3\n"
 > > ^done
 > > (gdb) 
 > > -var-update *
 > > ^done,changelist=[{name="var1",in_scope="true",type_changed="false"}]
 > > (gdb) 
 > > set var r[3]=6
 > > &"set var r[3]=6\n"
 > > ^done
 > > (gdb) 
 > > -var-update *
 > > ^done,changelist=[]
 > > (gdb) 
 > 

If -var-assign is used (or, indeed, if the array element is changed within
execution) then the changelist reflects this e.g

-var-assign var2.3 6
^done,value="6"
(gdb) 
-var-update *
^done,changelist=[{name="var2.3",in_scope="true",type_changed="false"}]
(gdb) 

-var-evaluate-expression gives the following:

-var-evaluate-expression var2
^done,value="[10]"
(gdb) 

which possibly explains why nothing appears in the changelist when the CLI
command (set var r[3]=6) is used as the array size is not editable:

-var-show-attributes var2
^done,attr="noneditable"
(gdb) 


This is only a problem when trying to control GDB using both CLI and MI
commands which is what we would like to do in Emacs. Do Apple (Project 
Builder?) or Eclipse have a console where CLI commands can be entered?

Nick


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

* Re: variable objects (was: [rfc] Annotation level THREE)
  2003-03-30 14:59                 ` variable objects (was: [rfc] Annotation level THREE) Nick Roberts
@ 2003-03-30 15:11                   ` Andrew Cagney
  2003-03-31  9:01                     ` Jason Molenda
  0 siblings, 1 reply; 7+ messages in thread
From: Andrew Cagney @ 2003-03-30 15:11 UTC (permalink / raw)
  To: Nick Roberts; +Cc: gdb


> If -var-assign is used (or, indeed, if the array element is changed within
> execution) then the changelist reflects this e.g
> 
> -var-assign var2.3 6
> ^done,value="6"
> (gdb) 
> -var-update *
> ^done,changelist=[{name="var2.3",in_scope="true",type_changed="false"}]
> (gdb) 
> 
> -var-evaluate-expression gives the following:
> 
> -var-evaluate-expression var2
> ^done,value="[10]"
> (gdb) 
> 
> which possibly explains why nothing appears in the changelist when the CLI
> command (set var r[3]=6) is used as the array size is not editable:
> 
> -var-show-attributes var2
> ^done,attr="noneditable"
> (gdb) 

Bug   The CLI side is missing an invalidate.  Can you please file this 
as a bug report.  I'll then see about fixing it.  If you want to turn 
the above into a test case, then you'll know it

> This is only a problem when trying to control GDB using both CLI and MI
> commands which is what we would like to do in Emacs. Do Apple (Project 
> Builder?) or Eclipse have a console where CLI commands can be entered?

I suspect no one noticed because, up until now, things like Insight were 
using varobj to do updates (it is more robust than the `set' command).

Andrew


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

* Re: variable objects (was: [rfc] Annotation level THREE)
  2003-03-30 15:11                   ` Andrew Cagney
@ 2003-03-31  9:01                     ` Jason Molenda
  0 siblings, 0 replies; 7+ messages in thread
From: Jason Molenda @ 2003-03-31  9:01 UTC (permalink / raw)
  To: Andrew Cagney; +Cc: Nick Roberts, gdb

On Sun, Mar 30, 2003 at 10:11:35AM -0500, Andrew Cagney wrote:

> > This is only a problem when trying to control GDB using both CLI and MI
> > commands which is what we would like to do in Emacs. Do Apple (Project 
> > Builder?) or Eclipse have a console where CLI commands can be entered?
> 
> I suspect no one noticed because, up until now, things like Insight were 
> using varobj to do updates (it is more robust than the `set' command).

I just gave it a spin - the Apple GDB doesn't catch this case
either.  It's a bug, but not one that has been reported by any of
our users if I remember correctly.  Project Builder does have a
Console window where people can type all sorts of gdb commands,
but they'd be most naturally inclined to change a local variable
in the Locals window, I suspect, not the console.  (PB itself
uses var-assign to update varobjs, of course.)

J

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

end of thread, other threads:[~2003-03-31  9:01 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <3E6E7326.3020906@redhat.com>
     [not found] ` <15985.7336.23998.590592@nick.uklinux.net>
     [not found]   ` <3E751565.4030409@redhat.com>
     [not found]     ` <15990.10811.61395.996906@nick.uklinux.net>
     [not found]       ` <3E763228.9060104@redhat.com>
     [not found]         ` <15990.62618.114706.459904@nick.uklinux.net>
     [not found]           ` <3E774292.8070603@redhat.com>
2003-03-21 17:53             ` [rfc] Annotation level THREE Nick Roberts
2003-03-21 19:22               ` Andrew Cagney
     [not found]           ` <3E773B59.90403@redhat.com>
2003-03-27 20:51             ` Nick Roberts
2003-03-28 22:30               ` Andrew Cagney
2003-03-30 14:59                 ` variable objects (was: [rfc] Annotation level THREE) Nick Roberts
2003-03-30 15:11                   ` Andrew Cagney
2003-03-31  9:01                     ` Jason Molenda

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