Mirror of the gdb mailing list
 help / color / mirror / Atom feed
* gdb / thread_db / multiple ABI question
@ 2017-07-07 18:20 Steve Ellcey
  2017-07-07 18:36 ` Pedro Alves
  0 siblings, 1 reply; 12+ messages in thread
From: Steve Ellcey @ 2017-07-07 18:20 UTC (permalink / raw)
  To: gdb

I have a question about debugging, the thread_db library, and multiple ABI's.
I am trying to support an ILP32 ABI to the aarch64 architecture.  Now I am
still building gdb as a LP64 object.  In most cases this seems fine, I can use
an LP64 gdb to debug an ILP32 object.  But when I have threaded objects and
need to use libthread_db.so, things don't seem to work.  When I try this
and set libthread_db_debug to 1, I get:

Trying host libthread_db library: /home/sellcey/gdb-ilp32/install/libilp32/libth
read_db.so.1.
dlopen failed: /home/sellcey/gdb-ilp32/install/libilp32/libthread_db.so.1: wrong
 ELF class: ELFCLASS32.
thread_db_load_search returning 0
warning: Unable to find libthread_db matching inferior's thread library, thread 
debugging will not be available.

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?  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.

Steve Ellcey
sellcey@cavium.com


^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2017-07-11  8:38 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-07-07 18:20 gdb / thread_db / multiple ABI question Steve Ellcey
2017-07-07 18:36 ` Pedro Alves
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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox