Mention which return values need to be freed in lang_varobj_ops
authorSimon Marchi <simon.marchi@ericsson.com>
Mon, 2 Feb 2015 18:17:08 +0000 (13:17 -0500)
committerSimon Marchi <simon.marchi@ericsson.com>
Mon, 2 Feb 2015 18:17:19 +0000 (13:17 -0500)
This is the result of a little bit of investigation of the C and Ada
languages, as well as some common sense.

gdb/ChangeLog:

* varobj.h (lang_varobj_ops): Mention which return values need
to be freed.

gdb/ChangeLog
gdb/varobj.h

index 351ccdd2ebb014082f9225a3ff121ca1520db862..11097531290251a8bd31c2f38a4bfc950ddf206d 100644 (file)
@@ -1,3 +1,8 @@
+2015-02-02  Simon Marchi  <simon.marchi@ericsson.com>
+
+       * varobj.h (lang_varobj_ops): Mention which return values need
+       to be freed.
+
 2015-02-02  Joel Brobecker  <brobecker@adacore.com>
 
        * dwarf2loc.c (dwarf2_evaluate_property): Add i18n marker.
index 750660af1611195783b13f9342252b2ea7ebf9fd..30c31efc1884bea8978d364c730b64fef125facc 100644 (file)
@@ -169,14 +169,17 @@ struct lang_varobj_ops
   /* The number of children of PARENT.  */
   int (*number_of_children) (const struct varobj *parent);
 
-  /* The name (expression) of a root varobj.  */
+  /* The name (expression) of a root varobj.  The returned value must be freed
+     by the caller.  */
   char *(*name_of_variable) (const struct varobj *parent);
 
-  /* The name of the INDEX'th child of PARENT.  */
+  /* The name of the INDEX'th child of PARENT.  The returned value must be
+     freed by the caller.  */
   char *(*name_of_child) (struct varobj *parent, int index);
 
   /* Returns the rooted expression of CHILD, which is a variable
-     obtain that has some parent.  */
+     obtain that has some parent.  The returned value must be freed by the
+     caller.  */
   char *(*path_expr_of_child) (const struct varobj *child);
 
   /* The ``struct value *'' of the INDEX'th child of PARENT.  */
@@ -185,7 +188,8 @@ struct lang_varobj_ops
   /* The type of the INDEX'th child of PARENT.  */
   struct type *(*type_of_child) (struct varobj *parent, int index);
 
-  /* The current value of VAR.  */
+  /* The current value of VAR.  The returned value must be freed by the
+     caller.  */
   char *(*value_of_variable) (const struct varobj *var,
                              enum varobj_display_formats format);
 
This page took 0.03025 seconds and 4 git commands to generate.