Re: gdb / thread_db / multiple ABI question

Steve Ellcey
2017-07-10T16:58:15Z

On Mon, 2017-07-10 at 08:39 +0100, Yao Qi wrote:
> Steve Ellcey <sellcey@cavium.com> writes:
>
> >
> > I don't see any code in gdb/linux-thread-db.c that seems to be
> > conditional on the word size (ILP32 vs LP64). Â I also don't see
> Take a look at aarch64-linux-nat.c:ps_get_thread_area.Â Â It calls
> aarch64_ps_get_thread_area.
>
> >
> > anything in glibc nptl-db directory that appears to be conditional
> > on
> > word size. Â Things like pthread_t andÂ __SIZEOF_PTHREAD_ATTR_T areÂ
> > different for the two different ABIs though. Â But that is true for
> > x86
> > too and things seem to be working there. Â I am not sure what (if
> > anything) would need to be done to libthread_db to support biarch
> > debugging.
> AArch64 linux GDB is able to debug arm-linux 32-bit program.

OK, there are actually changes in this file where as part of the
earlier ILP32 work, we changed:

(gdbarch_bfd_arch_info (gdbarch)->bits_per_word == 32)
to
(gdbarch_bfd_arch_info(gdbarch)->arch == bfd_arch_arm)

But maybe, forÂ ps_get_thread_area (and other places?) we need the
original test for word size and not the arch check.

Steve Ellcey
sellcey@cavium.com