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] Only try to load libthread_db when we load libpthread.


On Mon, Oct 10, 2011 at 11:22 AM, Pedro Alves <pedro@codesourcery.com> wrote:
> This version goes back to breaking the "file right_executable" core
> or attach cases (with static binaries) that the previous patch
> fixed. ?:-)
> [...]
> (gdb -c core; file exec).

That scenario I hadn't thought of.
Thanks, at least the code will be there for a documented reason.
Note that the non-static case of that sequence was and still is broken.

I checked this in.

2011-10-10  Doug Evans  <dje@google.com>

        * linux-thread-db.c (thread_db_new_objfile): Only try to load
        libthread_db when we load libpthread or the main symbol file.
        (thread_db_inferior_created): New function.
        (_initialize_thread_db): Attach inferior_created observer.
        * linux-nat.c (linux_child_post_attach): Remove call to
        check_for_thread_db.
        (linux_child_post_startup_inferior): Ditto.
        * objfiles.h (OBJF_MAINLINE): Define.
        * symfile.c (symbol_file_add_with_addrs_or_offsets): Pass it to
        allocate_objfile when appropriate.

Attachment: gdb-111010-libthread-db-5.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]