From: Pedro Alves <palves@redhat.com>
To: sellcey@cavium.com, gdb@sourceware.org
Subject: Re: gdb / thread_db / multiple ABI question
Date: Fri, 07 Jul 2017 18:36:00 -0000 [thread overview]
Message-ID: <306e2da9-4fea-76a2-e130-f6661f9826e8@redhat.com> (raw)
In-Reply-To: <201707071820.v67IKXSr017199@sellcey-dt.caveonetworks.com>
On 07/07/2017 07:20 PM, Steve Ellcey wrote:
> It makes sense that the LP64 gdb cannot dlopen the ILP32 thread_db that
> corresponds to the ILP32 thread library that the program being debugged
> uses but I don't know what to do about it.
>
> I looked at x86 and when I compile a 32 bit program there and then debug
> it with a 64 bit gdb I see:
>
> [Thread debugging using libthread_db enabled]
> Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
>
> So I am guessing that aarch64 needs to use the 64 bit libthread_db.so.1 even
> when debugging 32 bit programs, is that right?
Yes.
Though I have no idea whether an Aarch64 build of libthread_db is
capable of biarch debugging. It may be that GDB is already trying to
the load the 64-bit libthread_db, but then libthread_db rejects
the inferior for some reason. The "set debug libthread-db" option should
help you figure that out. See below.
> What do I need to do to tell
> gdb to do that? I tried adding /home/sellcey/gdb-ilp32/install/lib64 to
> solib-search-path but that did not help. I am not sure what triggers the
> difference in behaviour between aarch64 and x86.
See:
(gdb) apropos libthread
info auto-load libthread-db -- Print the list of loaded inferior specific libthread_db
set auto-load libthread-db -- Enable or disable auto-loading of inferior specific libthread_db
set debug libthread-db -- Set libthread-db debugging
set libthread-db-search-path -- Set search path for libthread_db
show auto-load libthread-db -- Show whether auto-loading inferior specific libthread_db is enabled
show debug libthread-db -- Show libthread-db debugging
show libthread-db-search-path -- Show the current search path or libthread_db
The related GDB code is in gdb/linux-thread-db.c.
Thanks,
Pedro Alves
next prev parent reply other threads:[~2017-07-07 18:36 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-07-07 18:20 Steve Ellcey
2017-07-07 18:36 ` Pedro Alves [this message]
2017-07-07 20:30 ` Steve Ellcey
2017-07-10 7:39 ` Yao Qi
2017-07-10 16:58 ` Steve Ellcey
2017-07-10 8:29 ` Andreas Schwab
2017-07-10 9:43 ` Pedro Alves
2017-07-10 18:02 ` Steve Ellcey
2017-07-10 18:21 ` Pedro Alves
2017-07-10 19:45 ` Steve Ellcey
2017-07-11 8:38 ` Yao Qi
2017-07-10 21:22 ` Steve Ellcey
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=306e2da9-4fea-76a2-e130-f6661f9826e8@redhat.com \
--to=palves@redhat.com \
--cc=gdb@sourceware.org \
--cc=sellcey@cavium.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox