Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* Re: [PATCH]: MI -var-set-format
@ 2008-01-24 21:49 Marc Khouzam
  2008-01-25 10:38 ` Eli Zaretskii
  0 siblings, 1 reply; 16+ messages in thread
From: Marc Khouzam @ 2008-01-24 21:49 UTC (permalink / raw)
  To: gdb-patches

>> I thought the intentio was to commit Vladimir's patch too:
>>> 
>>>   http://sourceware.org/ml/gdb/2008-01/msg00116.html
>>> 
>>> perhaps using xstrdup instead of strdup.  I can then make appropriate
>>> changes to Emacs in the CVS repository prior to the release of 22.2.
>>
>> One thread at a time is all I can handle.  Have we concluded that the
>> above patch is better than always using natural format to check for
>> updates?
>
> I thought that was part of the thread.  Isn't Marc's patch for
> -var-evaluate-expression meant to meet his requirement for multiple formats?

In my case, I agreed that this solution is sufficient (and probably the least intrusive.)
But we do need Vladimir's patch.

Here is a small patch for the doc to explain this requirement.  Feel free to reword
of course.

Marc

### Eclipse Workspace Patch 1.0
#P gdb
Index: doc/gdb.texinfo
===================================================================
RCS file: /cvs/src/src/gdb/doc/gdb.texinfo,v
retrieving revision 1.459
diff -u -r1.459 gdb.texinfo
--- doc/gdb.texinfo     23 Jan 2008 11:26:29 -0000      1.459
+++ doc/gdb.texinfo     24 Jan 2008 21:32:51 -0000
@@ -20058,6 +20058,9 @@
 recommended to use the @samp{--all-values} option, to reduce the
 number of MI commands needed on each program stop.
 
+To know if a variable object or any of its children has changed value in any 
+format instead of only the current one, the variable object and all its children
+should be in the natural format before issuing the @code{-var-update} command.  
 
 @subsubheading Example



^ permalink raw reply	[flat|nested] 16+ messages in thread
* [PATCH]: MI -var-set-format
@ 2006-05-02  6:19 Nick Roberts
  2006-05-05 18:11 ` Daniel Jacobowitz
  0 siblings, 1 reply; 16+ messages in thread
From: Nick Roberts @ 2006-05-02  6:19 UTC (permalink / raw)
  To: gdb-patches


Currently:

  -var-evaluate-expression var1
  ^done,value="18"

  -var-set-format var1 hexadecimal
  ^done,format="hexadecimal"

-var-set-format just repeats the format that has been set which is not
very useful since presumably the front end sent it in the first place.

I would like to add the value in the (new) current format, which I find
much more useful:

  -var-set-format var1 hexadecimal
  ^done,format="hexadecimal",value="0x12"

OK to apply if I update the testsuite accordingly?


-- 
Nick                                           http://www.inet.net.nz/~nickrob


2006-05-02  Nick Roberts  <nickrob@snap.net.nz>

	* mi/mi-cmd-var.c (mi_cmd_var_set_format): Add value field to output.



*** mi-cmd-var.c	31 Mar 2006 12:46:48 +1200	1.23
--- mi-cmd-var.c	02 May 2006 18:16:39 +1200	
***************
*** 211,216 ****
--- 211,219 ----
  
    /* Report the new current format */
    ui_out_field_string (uiout, "format", varobj_format_string[(int) format]);
+ 
+   /* Report the value in the new format */
+   ui_out_field_string (uiout, "value", varobj_get_value (var));
    return MI_CMD_DONE;
  }


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

end of thread, other threads:[~2008-01-25 14:16 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-01-24 21:49 [PATCH]: MI -var-set-format Marc Khouzam
2008-01-25 10:38 ` Eli Zaretskii
2008-01-25 15:46   ` Marc Khouzam
  -- strict thread matches above, loose matches on Subject: below --
2006-05-02  6:19 Nick Roberts
2006-05-05 18:11 ` Daniel Jacobowitz
2006-05-05 23:30   ` Nick Roberts
2006-05-15 17:07     ` Daniel Jacobowitz
2006-05-16  3:46       ` Nick Roberts
2008-01-22 20:13         ` Daniel Jacobowitz
2008-01-23  3:25           ` Nick Roberts
2008-01-23  3:48             ` Daniel Jacobowitz
2008-01-23  6:24               ` Nick Roberts
2008-01-23 13:17                 ` Daniel Jacobowitz
2008-01-23 21:17                   ` Nick Roberts
2008-01-23 21:24                     ` Daniel Jacobowitz
2008-01-23 22:30                       ` Nick Roberts

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox