diff options
author | Simon Marchi <simon.marchi@ericsson.com> | 2015-02-02 13:17:08 -0500 |
---|---|---|
committer | Simon Marchi <simon.marchi@ericsson.com> | 2015-02-02 13:17:19 -0500 |
commit | aa3de2670f9f9327b25c47546c0005d4a80da546 (patch) | |
tree | f2479ce8b02f85e8b316d2a4f40cda6cdca5fd80 /gdb | |
parent | 6c2573b7abfc3a504b902e46169cc521b6aa5eb7 (diff) | |
download | gdb-aa3de2670f9f9327b25c47546c0005d4a80da546.zip gdb-aa3de2670f9f9327b25c47546c0005d4a80da546.tar.gz gdb-aa3de2670f9f9327b25c47546c0005d4a80da546.tar.bz2 |
Mention which return values need to be freed in lang_varobj_ops
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.
Diffstat (limited to 'gdb')
-rw-r--r-- | gdb/ChangeLog | 5 | ||||
-rw-r--r-- | gdb/varobj.h | 12 |
2 files changed, 13 insertions, 4 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 351ccdd..1109753 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -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. diff --git a/gdb/varobj.h b/gdb/varobj.h index 750660a..30c31ef 100644 --- a/gdb/varobj.h +++ b/gdb/varobj.h @@ -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); |