From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 130007 invoked by alias); 1 Feb 2017 22:20:22 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 129979 invoked by uid 89); 1 Feb 2017 22:20:21 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.5 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,RCVD_IN_SORBS_SPAM,SPF_PASS autolearn=no version=3.3.2 spammy=240, 170131, 17-01-31, H*f:sk:1485904 X-Spam-User: qpsmtpd, 2 recipients X-HELO: mail-qt0-f193.google.com Received: from mail-qt0-f193.google.com (HELO mail-qt0-f193.google.com) (209.85.216.193) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 01 Feb 2017 22:20:11 +0000 Received: by mail-qt0-f193.google.com with SMTP id w20so33689460qtb.1; Wed, 01 Feb 2017 14:20:11 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=VVrR6OAEUcpTy/RWnCzV1zO3xZ8y9EHMNN4O69rPnAA=; b=kWy1vRnu2EIBIqlpRmf3Q5pldZI05P0ycWGZ+yIIgN5PiypxGarKm6itTjtBNjkoKy aKP0J7MycJ2dDylqc+Lsct2n9uudsWgf/0pLP3eEjmF4akX8/Q/D+pv25aN3NeOaU1kY nU+Khb52SzMnCHu6SOtDXiILQj6F3DwkqOQHOYnujxhziHif1gK3RpOAnB+76Poq1ZF0 +ae1StPKnDbT7mEsI6ZRAbfjRSqa8i/5Mm0A/XYvZqEDHCJ3S0/JiRAl6bW9Lc+bcWhY d3UaE5hjiV9lFCv4nLBmjNKbdBDAyr7Wyg07UWAp53sesI7RMyic/PE/moKtXSGJdgHu +8pg== X-Gm-Message-State: AMke39kjH7xAnEgNuBaOPu5nbWgyqJD+Y3zdRJavV3uEwnzlsvZDAhrq9g0h+ZpbMJnNgv41B6OfHi4ziIKYOw== X-Received: by 10.55.137.7 with SMTP id l7mr5362965qkd.11.1485987609898; Wed, 01 Feb 2017 14:20:09 -0800 (PST) MIME-Version: 1.0 Received: by 10.12.140.194 with HTTP; Wed, 1 Feb 2017 14:20:09 -0800 (PST) In-Reply-To: <1485904559.22118.17.camel@caviumnetworks.com> 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> From: Yao Qi Date: Wed, 01 Feb 2017 22:20:00 -0000 Message-ID: Subject: Re: [PATCH] Patch 2 of 2 for aarch64 ILP32 support in gdb To: Steve Ellcey Cc: binutils , gdb-patches , Yury Norov , Andreas Schwab , "Pinski, Andrew" Content-Type: text/plain; charset=UTF-8 X-IsSubscribed: yes X-SW-Source: 2017-02/txt/msg00051.txt.bz2 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