This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH] Fix FIXME: xstrdup should not be here
- From: Mark Kettenis <mark dot kettenis at xs4all dot nl>
- To: yao at codesourcery dot com
- Cc: gdb-patches at sourceware dot org
- Date: Fri, 13 Sep 2013 09:52:01 +0200 (CEST)
- Subject: Re: [PATCH] Fix FIXME: xstrdup should not be here
- Authentication-results: sourceware.org; auth=none
- References: <1377826046-21218-1-git-send-email-yao at codesourcery dot com> <522E84B9 dot 10502 at codesourcery dot com> <5232B567 dot 9020202 at codesourcery dot com>
> Date: Fri, 13 Sep 2013 14:49:11 +0800
> From: Yao Qi <yao@codesourcery.com>
>
> On 09/10/2013 10:32 AM, Yao Qi wrote:
> > gdb:
> >
> > 2013-09-10 Yao Qi<yao@codesourcery.com>
> >
> > * varobj.c (update_dynamic_varobj_children): Duplicate 'name'
> > and pass it to install_dynamic_child.
> > (create_child_with_value): Update comments. Don't duplicate
> > 'name'.
>
> Here is the updated version, with a cast NAME to 'char *'.
If you do this, you should drop the const from the
install_dynamic_child() prototype instead of adding the (char *) cast.