This is the mail archive of the
gdb-cvs@sourceware.org
mailing list for the GDB project.
[binutils-gdb] Mention that create_child takes ownership of the allocated name
- From: Simon Marchi <simark at sourceware dot org>
- To: gdb-cvs at sourceware dot org
- Date: 30 Jan 2015 20:15:07 -0000
- Subject: [binutils-gdb] Mention that create_child takes ownership of the allocated name
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=837ce2523fb0b81a8548624d204c857438c647ec
commit 837ce2523fb0b81a8548624d204c857438c647ec
Author: Simon Marchi <simon.marchi@ericsson.com>
Date: Fri Jan 30 15:14:46 2015 -0500
Mention that create_child takes ownership of the allocated name
gdb/ChangeLog:
* varobj.c (create_child): Modify comment.
Diff:
---
gdb/ChangeLog | 4 ++++
gdb/varobj.c | 5 ++++-
2 files changed, 8 insertions(+), 1 deletion(-)
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 35da6b6..bdf9fcc 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,9 @@
2015-01-30 Simon Marchi <simon.marchi@ericsson.com>
+ * varobj.c (create_child): Modify comment.
+
+2015-01-30 Simon Marchi <simon.marchi@ericsson.com>
+
* ada-varobj.c (ada_number_of_children): Constify struct varobj *
parameter.
(ada_name_of_variable): Same.
diff --git a/gdb/varobj.c b/gdb/varobj.c
index 0daef91..76bf495 100644
--- a/gdb/varobj.c
+++ b/gdb/varobj.c
@@ -2043,7 +2043,10 @@ uninstall_variable (struct varobj *var)
}
-/* Create and install a child of the parent of the given name. */
+/* Create and install a child of the parent of the given name.
+
+ The created VAROBJ takes ownership of the allocated NAME. */
+
static struct varobj *
create_child (struct varobj *parent, int index, char *name)
{