[patch][rfc] Allow GDB to search for the right libthread_db.so.1

Pedro Alves pedro@codesourcery.com
Mon May 11 13:13:00 GMT 2009


On Friday 01 May 2009 01:19:43, Paul Pluzhnikov wrote:
> Sorry, missed "space before parenth":
> 
> < +  return libpthread_name_p(so->so_name);
> > +  return libpthread_name_p (so->so_name);
> 
> Fix attached.

On Friday 01 May 2009 01:19:43, Paul Pluzhnikov wrote:

> handle = dlopen (library, RTLD_NOW);

I wonder if making this RTLD_LAZY until you found the correct one
wouldn't make sense?

> +static int
> +thread_db_load_search ()

                         ^ (void)

  (this function could be made to use `openat' at some point, but
   gdb is already assumes PATH_MAX is largest path possible elsewhere
   anyway)

I also wonder if `set sysroot' should affect this search path: I think
not, but I'm not 100% sure.

> +int libpthread_name_p (const char *name)
> +{

      ^ function name at column 0, please.


Other that those nits, this version looks good to me.  Everyone else
has already picked on what else could have been picked on.  :-)
AFAICS, this version addressed all of Daniel's concerns.  Daniel,
what do you think?

-- 
Pedro Alves



More information about the Gdb-patches mailing list