This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB 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]

Re: [mi] -list-features


On Friday 31 August 2007 14:01:57 Nick Roberts wrote:
>  > So clearly, 
>  > 
>  > 	["feature1","feature2"]
>  > 
>  > is a valid list and the output I gave is also valid. 
> 
> I don't think this syntax is possible using the functions ui_out_field_string,
> etc.  but if you tried to implement your proposal we would find out for
> sure and wouldn't need to debate it.

I *did* implemented it, and posted a code patch and here's what I get in
my local copy (with two dummy features, for local testing)

	(gdb)
	-list-features
	^done,features=["feature1","feature2"]

>  >                                                       What you wrote:
>  > 
>  > 	^done,result=[name="feature1",name="feature2"]
>  > 
>  > is also permitted by the current grammar, but I don't see any possible
>  > meaning in the "name=". I believe using variable names inside lists
>  > is old usage, and new commands should not do that. In contrast, tuples are
>  > in the form:
>  > 
>  > 	{name1=value1,name2=value2,....}
>  > 
>  > and the names are required for tuples. Are you sure you haven't confused tuples
>  > and lists?
> 
> -stack-list-locals 0
> ^done,locals=[name="aaa",name="zxcv"]
> (gdb) 

This is historical code and gdb manual say this:

	 New GDB/MI commands should only output lists containing values.


- Volodya

 



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