This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: [PATCH] Patch 2 of 2 for aarch64 ILP32 support in gdb
- From: Yao Qi <qiyaoltc at gmail dot com>
- To: Steve Ellcey <sellcey at caviumnetworks dot com>
- Cc: binutils <binutils at sourceware dot org>, gdb-patches <gdb-patches at sourceware dot org>, Yury Norov <ynorov at caviumnetworks dot com>, Andreas Schwab <schwab at suse dot de>, "Pinski, Andrew" <Andrew dot Pinski at cavium dot com>
- Date: Wed, 1 Feb 2017 22:20:09 +0000
- Subject: Re: [PATCH] Patch 2 of 2 for aarch64 ILP32 support in gdb
- Authentication-results: sourceware.org; auth=none
- References: <1485303639.29977.10.camel@caviumnetworks.com> <20170126141414.GY28060@E107787-LIN> <1485555939.2509.5.camel@caviumnetworks.com> <20170129224045.ekflcodtmfs4hv54@localhost> <1485904559.22118.17.camel@caviumnetworks.com>
On 17-01-31 15:15:59, Steve Ellcey wrote:
> On Sun, 2017-01-29 at 22:40 +0000, Yao Qi wrote:
>
> > This changes the word size and address size, which is used to determine
> > the inferior is arm or aarch64 by checking "bits_per_word == 32" in
> > multi-arch debugging.????You can find some instances of such check in
> > aarch64-linux-nat.c.????If the bits_per_word is 32 in ILP32, GDB thinks
> > the inferior is an ARM one, rather than an AArch64 ILP32 one. which is
> > wrong.????We need to tweak the condition above to correctly identify the
> > ARM inferior.
> >??
> > Do you compare the ILP32 gdb test result with normal aarch64 one?
>
> OK, I fixed up??arch64-linux-nat.c and didn't find any other places were
> the bits_per_word was being checked and I fixed the TRUE/true
> FALSE/false constants. ??If I run gdb without any changes or with this
> patch but debugging 64 bit code I get around 500 failures. ??The number
> doesn't seem to be constant, I have gotten anywhere from 488 to 503
> failures testing the same code. ??My last run had:
>
> # of expected passes????????????????????????30428
> # of unexpected failures????????????????503
> # of expected failures????????????????????53
> # of unknown successes????????????????????2
> # of known failures??????????????????????????64
> # of untested testcases??????????????????66
> # of unresolved testcases??????????????6
> # of unsupported tests????????????????????293
>
> Many of the failures seem to be thread related and I see a lot of
> messages about timeouts and 'program is no longer running'. ??When
If you get 500 fails in vanilla GDB on aarch64-linux, there must be
something wrong. We only have 36 fails in buildbot slave.
What is your compiler, library and kernel? They may have some local
ilp32 patches.
> I run gdb on 32 bit programs with:
>
> RUNTESTFLAGS="--target_board=unix/-mabi=ilp32"
>
> I get 700+ failures. ??My last run had:
>
> # of expected passes????????????????????????29482
> # of unexpected failures????????????????740
> # of expected failures????????????????????30
> # of unknown successes????????????????????2
> # of known failures??????????????????????????65
> # of untested testcases??????????????????79
> # of unresolved testcases??????????????4
> # of unsupported tests????????????????????288
>
> So there are more failures in ILP32 mode but there seem to be enough
> passes that I think it still makes sense to check in the patch to get
> some gdb functionality working.
>
"even if GDB is horribly broken, many tests will still pass."
https://sourceware.org/gdb/wiki/TestingGDB#Caveat_emptor
500 fails and 240 regressions are not a good signal.
I don't see anything wrong from ilp32 gdb patch here, but I suspect
these 500 fails are caused by some bugs or oversights in other parts,
such as kernel or gliblc. aarch64-linux GDB test shouldn't have 500 fails on
aarch64-linux system with ilp32 enabled. Could you dig it out?
--
Yao