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] Add support for $sdir and $pdir to libthread-db-search-path


On Thu, May 12, 2011 at 1:12 PM, Tom Tromey <tromey@redhat.com> wrote:
>>>>>> "Doug" == Doug Evans <dje@google.com> writes:
>
> Doug> This patch adds $sdir to the patch referenced here:
> Doug> http://sourceware.org/ml/gdb-patches/2011-04/msg00553.html
>
> Doug> and puts $sdir ahead of $pdir.
> Doug> If/when gdb gets a security model I think $pdir should be moved
> Doug> ahead of $sdir.
>
> Doug> It also simplifies some of the code to parse libthread-db-search-path.
>
> Doug> Ok to check in?
>
> It looks ok to me.
>
> Well, actually, I think the pre-existing code has some problems, but
> they aren't introduced by your patch. ?I will clean them up separately.

Here is what I checked in.

2011-05-13  Doug Evans  <dje@google.com>

        Support $pdir and $sdir in libthread-db-search-path.
        * NEWS: Mention $sdir,$pdir.
        * gdb_thread_db.h (LIBTHREAD_DB_SEARCH_PATH): Add $sdir:$pdir.
        * linux-thread-db.c (try_thread_db_load_from_pdir): New
function.
        (try_thread_db_load_from_sdir): New function.
        (try_thread_db_load_from_dir): New function.
        (thread_db_load_search): Handle $pdir, $sdir.  Remove trying
of
        system directories if search of libthread-db-search-path
fails,
        that is now done via $sdir.
        (has_libpthread): New function.
        (thread_db_load): Remove search for libthread_db in directory
of
        libpthread, that is now done via $pdir.

        gdbserver/
        * thread-db.c (try_thread_db_load_from_sdir): New function.
        (try_thread_db_load_from_dir): New function.
        (thread_db_load_search): Handle $sdir, ignore $pdir.
        Remove trying of system directories if search of
        libthread-db-search-path fails, that is now done via $sdir.

        doc/
        * gdb.texinfo (Threads): Document $sdir,$pdir.
        (Server): Document $pdir exception.

Attachment: gdb-110513-pdir-3.patch.txt
Description: Text document


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