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: [PATCH] gdb: sim: handle target sysroot prefix


Mike Frysinger wrote:
> On 22 Jun 2015 10:50, Gary Benson wrote:
> > Please note that gdb_sysroot can be NULL.
> 
> how so ?  main.c:captured_main specifically handles that:
> 
>   /* Set the sysroot path.  */
>   gdb_sysroot = relocate_gdb_directory (TARGET_SYSTEM_ROOT,
>                     TARGET_SYSTEM_ROOT_RELOCATABLE);
> 
>   if (gdb_sysroot == NULL || *gdb_sysroot == '\0')
>     {
>       xfree (gdb_sysroot);
>       gdb_sysroot = xstrdup (TARGET_SYSROOT_PREFIX);
>     }

Good point.  I may go and clear out all the gdb_sysroot == NULL
checks.

Cheers,
Gary

-- 
http://gbenson.net/


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