[PATCH V3]PR other/70268: map one directory name (old) to another (new) in __FILE__

Hongxu Jia hongxu.jia@windriver.com
Fri Mar 18 09:36:00 GMT 2016


On 03/18/2016 04:05 PM, Hongxu Jia wrote:
>>
>> Please explain why you first alloca() and then strdup the result 
>> instead of XNEWVEC
>

BTW, I just refer the implement of -fdebug-prefix-map:

In gcc/final.c
----------------
const char *
remap_debug_filename (const char *filename)
----------------

//Hongxu

> 1. alloca - allocate memory that is automatically freed when the
>     function remap_file_filename returns
>
> 2. XNEW - allocate memory for struct file_prefix_map
>
> 3. xstrdup - duplicate a string
>
> //Hongxu
>
>
>>
>> Thanks,



More information about the Gcc-patches mailing list