This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [RFA 2/2] Make names in gdbtypes.h,symtab.h const char *.


>>>>> "Doug" == Doug Evans <dje@google.com> writes:

Doug> The changes to these two files involve a teensy bit of extra
Doug> work beyond simple mechanical changes.
Doug> This patch requires the main patch in
Doug> http://sourceware.org/ml/gdb-patches/2012-02/msg00043.html

FWIW this seems fine to me.

Doug> @@ -1455,10 +1455,11 @@ patch_type (struct type *type, struct ty
 
Doug>    if (TYPE_NAME (real_target))
Doug>      {
Doug> +      /* The previous copy of TYPE_NAME is allocated by
Doug> +	 process_coff_symbol.  */
Doug>        if (TYPE_NAME (target))
Doug> -	xfree (TYPE_NAME (target));
Doug> -      TYPE_NAME (target) = concat (TYPE_NAME (real_target), 
Doug> -				   (char *) NULL);
Doug> +	xfree ((char*) TYPE_NAME (target));
Doug> +      TYPE_NAME (target) = xstrdup (TYPE_NAME (real_target));
Doug>      }
Doug>  }

The old code here is pretty bad :(

Tom


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]