summaryrefslogtreecommitdiff
path: root/gdb/ChangeLog
diff options
context:
space:
mode:
authorqiyao <qiyao>2013-10-04 07:16:44 +0000
committerqiyao <qiyao>2013-10-04 07:16:44 +0000
commit17b0ea1ae0ae3d4dfe714e2c880a9377b8b344c3 (patch)
tree5e07a8be2ebc6fbf88cc2dd2a33ad6a021619744 /gdb/ChangeLog
parentd34e7bc2d3c61af8ac4a7dabf4d2fd8adbf39b60 (diff)
downloadgdb-17b0ea1ae0ae3d4dfe714e2c880a9377b8b344c3.tar.gz
Fix FIXME: xstrdup should not be here
Hi, This FIXME goes into my eyes, when I am about to modify something here, /* Name is allocated by name_of_child. */ /* FIXME: xstrdup should not be here. */ This FIXME was introduced in the python pretty-pretter patches. Python pretty-printing [6/6] https://sourceware.org/ml/gdb-patches/2009-05/msg00467.html create_child_with_value is called in two paths, 1. varobj_list_children -> create_child -> create_child_with_value, 2. install_dynamic_child -> install_dynamic_child -> varobj_add_child -> create_child_with_value In path #1, 'name' is allocated by name_of_child, as the original comment said, we don't have to duplicate NAME in create_child_with_value. In path #2, 'name' is got from PyArg_ParseTuple, and we have to duplicate NAME. This patch removes the call to xstrdup in create_child_with_value and call xstrudp in update_dynamic_varobj_children (path #2). gdb: 2013-10-04 Yao Qi <yao@codesourcery.com> * varobj.c (create_child_with_value): Remove 'const' from the type of parameter 'name'. (varobj_add_child): Likewise. (install_dynamic_child): Remove 'const' from the type of parameter 'name'. (varobj_add_child): Likewise. (create_child_with_value): Likewise. Update comments. Don't duplicate 'name'. (update_dynamic_varobj_children): Duplicate 'name' and pass it to install_dynamic_child.
Diffstat (limited to 'gdb/ChangeLog')
-rw-r--r--gdb/ChangeLog13
1 files changed, 13 insertions, 0 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 5e5427cb8db..079e2c6f50f 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,16 @@
+2013-10-04 Yao Qi <yao@codesourcery.com>
+
+ * varobj.c (create_child_with_value): Remove 'const' from the
+ type of parameter 'name'.
+ (varobj_add_child): Likewise.
+ (install_dynamic_child): Remove 'const' from the type of
+ parameter 'name'.
+ (varobj_add_child): Likewise.
+ (create_child_with_value): Likewise. Update comments. Don't
+ duplicate 'name'.
+ (update_dynamic_varobj_children): Duplicate 'name'
+ and pass it to install_dynamic_child.
+
2013-10-03 Phil Muldoon <pmuldoon@redhat.com>
* python/py-value.c (convert_value_from_python): Move PyInt_Check