From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 59255 invoked by alias); 14 Oct 2016 10:53:27 -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 59152 invoked by uid 89); 14 Oct 2016 10:53:26 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.0 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=ham version=3.3.2 spammy=insights, descriptors, frv, UD:examine-backward.exp X-HELO: mail-pf0-f193.google.com Received: from mail-pf0-f193.google.com (HELO mail-pf0-f193.google.com) (209.85.192.193) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 14 Oct 2016 10:53:16 +0000 Received: by mail-pf0-f193.google.com with SMTP id i85so3615465pfa.0 for ; Fri, 14 Oct 2016 03:53:16 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:subject:date:message-id; bh=Wzedg49x0XhSWUKuxpB81aKrBDOCevHlIIumkKzLP7o=; b=dVpAElOS3RuPK/whxGM1ltIe1dWCoQNfvH/b5gUVqwBf277y4ztaSzuhiw54i6PfIr Lhvgx/QAGaMveS37VyTDfRfDpJ+mZopJj/Ucs7QagX7jwWxdrKcWo7d7YMlkK0jaZkCB mXu5rK7S/I07plqL9UI7KV1NtxRjBi8UU5J4/31joGSg8NPFnRwMPk8q7+bxrmUmlnRg PUgPDSeAe3xEFQAYfyEc4LTPa1XVn0gXEDqpoGMYdmWWXaESEuvJ6h1aqUa6HA8xgG/I MqAWQAqRQgwsW9CKzJAUGxT2ezakv1QVN3cy1F+TtpqX/FGM9IcxrD2zwIGOWPjsazEd dgVg== X-Gm-Message-State: AA6/9RkcFBVJ4pgzQDloRNCDv3cP8R+gCNIdb0qhX4yrVo8IOBzz+us5LlD1pphEb1IkGw== X-Received: by 10.99.54.194 with SMTP id d185mr14416777pga.149.1476442394513; Fri, 14 Oct 2016 03:53:14 -0700 (PDT) Received: from E107787-LIN.cambridge.arm.com (gcc1-power7.osuosl.org. [140.211.15.137]) by smtp.gmail.com with ESMTPSA id b4sm26598432paw.10.2016.10.14.03.53.11 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 14 Oct 2016 03:53:12 -0700 (PDT) From: Yao Qi X-Google-Original-From: Yao Qi To: gdb-patches@sourceware.org Subject: [PATCH 0/3] Fix gdb.base/func-ptrs.exp fails in ppc64 and arm thumb mode Date: Fri, 14 Oct 2016 10:53:00 -0000 Message-Id: <1476442387-17291-1-git-send-email-yao.qi@linaro.org> X-IsSubscribed: yes X-SW-Source: 2016-10/txt/msg00430.txt.bz2 I see some test fails in gdb.base/func-ptrs.exp in arm thumb mode, because the LSB bit is lost when we assign a function to a function pointer in GDB. I proposed a patch https://sourceware.org/ml/gdb-patches/2016-06/msg00217.html but we decided to fix this problem rather than skip the test, and agreed that assignment in GDB should end up the same value as we do the same in .c file. When I looked into this problem again, I find such problem exists on all targets which have function descriptors, IOW, function pointer address isn't function address, like ppc64, ia64, frv and hppa32. (Function pointer with LSB set in arm thumb mode can be regarded as a function descriptor as well, IMO) This issue was discussed in GNU Cauldron this year, and I got some helpful insights from Pedro and Ulrich. I finally have a RFC in patch #2, which is the major part of this patch series. As I mentioned in patch #2, it has some user visible changes, and you can see these changes in patch #3. Comments are welcome! Regression tested on ppc64-linux (gcc110) native and arm-linux gdbserver. I failed to run ppc64-linux tests with gdbserver, because process-dies-while-detaching.exp, IIRC, generates a lot of zombie GDBservers and the following tests are slowed down and timeout. I didn't look into them in details. *** BLURB HERE *** Yao Qi (3): Use get_var_address in test cases Record function descriptor address instead of function address in value Update test cases gdb/arch-utils.c | 6 +++++ gdb/arch-utils.h | 1 + gdb/arm-tdep.c | 23 +++++++++++++++++ gdb/ax-gdb.c | 12 ++++++--- gdb/findvar.c | 5 ++++ gdb/gdbarch.c | 23 +++++++++++++++++ gdb/gdbarch.h | 6 +++++ gdb/gdbarch.sh | 4 +++ gdb/infcall.c | 2 +- gdb/ppc-linux-tdep.c | 2 ++ gdb/ppc64-tdep.c | 30 ++++++++++++++++++++++ gdb/ppc64-tdep.h | 3 ++- gdb/ppcfbsd-tdep.c | 2 ++ gdb/testsuite/gdb.base/break-fun-addr.exp | 4 +-- gdb/testsuite/gdb.base/breakpoint-in-ro-region.exp | 2 +- gdb/testsuite/gdb.base/examine-backward.exp | 3 ++- gdb/testsuite/gdb.mi/mi-var-cmd.exp | 4 +-- gdb/testsuite/gdb.python/py-events.exp | 7 +---- gdb/testsuite/gdb.trace/tracecmd.exp | 9 +++---- gdb/testsuite/lib/dwarf.exp | 5 ++-- gdb/testsuite/lib/gdb.exp | 3 ++- gdb/value.c | 4 ++- 22 files changed, 134 insertions(+), 26 deletions(-) -- 1.9.1