From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 69526 invoked by alias); 11 Aug 2016 11:46:34 -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 69515 invoked by uid 89); 11 Aug 2016 11:46:32 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.6 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 spammy=dumped, vdso, vDSO, observation 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 (AES128-GCM-SHA256 encrypted) ESMTPS; Thu, 11 Aug 2016 11:46:22 +0000 Received: by mail-pf0-f193.google.com with SMTP id h186so79877pfg.2 for ; Thu, 11 Aug 2016 04:46:22 -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:user-agent:date:message-id :mime-version:content-transfer-encoding; bh=otqSUVWcmPuf4j6thDkakJVxzin86XcvENqu4Uq2Qv4=; b=cbBGCxAoI+kEiB0VOdcOsXcqFm/HRc4gadhAkGJkOiGFgxuEQllb8+QTzuTuIgHLfr DF2Mblh8hXYHV9iYKjV0JDaCCgkB4BuP7oFgQ5vxwGRS8dTbeVG9/R7ExWh8D7DPPjuK GJQKbi0t/dCvVDiYztXwrOzI4cy8B2s1z2dAXOMeyqZCbsQXbBlcVdszjTmJzhtyKQzX Iu3FJaw8TJ2PONnOP/fKSrFNXGo8s0GYgpk8pLvpDu5WikydKsLxe7HEA1wd18qL8fzA dA1h3Miij/MKLXIliC9AgWQ9h/Pf5huHUNwkQPeM/GlI7Vh601RcgknpaHWGYqRzQXhm U6CQ== X-Gm-Message-State: AEkoouvMuXRMdb0oCtydEAyodtXch1IKXlqTV1TdJ1CHrwLk7WgAiGHMlV5PhOopSgRcZA== X-Received: by 10.98.99.67 with SMTP id x64mr16421296pfb.26.1470915980726; Thu, 11 Aug 2016 04:46:20 -0700 (PDT) Received: from E107787-LIN (gcc115.osuosl.org. [140.211.9.73]) by smtp.gmail.com with ESMTPSA id a20sm4800006pfa.27.2016.08.11.04.46.19 for (version=TLS1_2 cipher=AES128-SHA bits=128/128); Thu, 11 Aug 2016 04:46:20 -0700 (PDT) From: Yao Qi To: gdb-patches@sourceware.org Subject: warning: Could not load shared library symbols for linux-vdso.so.1. User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) Date: Thu, 11 Aug 2016 11:46:00 -0000 Message-ID: <86twercyuv.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-IsSubscribed: yes X-SW-Source: 2016-08/txt/msg00130.txt.bz2 Hi, When I test gdb master/7.12 with glibc mainline on aarch64, I got the following fail, (gdb) core-file build-gdb/gdb/testsuite/outputs/gdb.base/corefile/corefile.= core^M [New LWP 2362]^M warning: Could not load shared library symbols for linux-vdso.so.1.^M Do you need "set solib-search-path" or "set sysroot"?^M Core was generated by `build-gdb/gdb/testsuite/outputs/gdb.base/corefile/'.= ^M Program terminated with signal SIGABRT, Aborted.^M #0 __GI_raise (sig=3Dsig@entry=3D6) at ../sysdeps/unix/sysv/linux/raise.c:= 58^M 58 ../sysdeps/unix/sysv/linux/raise.c: No such file or directory.^M (gdb) FAIL: gdb.base/corefile.exp: core-file warning-free Looks the warning "Could not load shared library symbols for linux-vdso.so.1." makes the trouble. It was discussed and fixed in this thread https://sourceware.org/ml/gdb-patches/2014-09/msg00361.html In the fix, we filter out the vDSO module if l_ld is in the range of vDSO module. However, it only works for native live debugging. We can know the starting address of vDSO by AT_SYSINFO_EHDR, but we don't know size of vDSO when target is corefile. In my observation, vDSO is _not_ dumped in corefile at all. One version of Pedro's patch uses "(so->lm_info->l_addr_inferior =3D=3D vsyscall_addr)" to check whether "so" is vDSO (it works for me in my fail here), but we changed it to range checking in order to handle "prelinked" vDSO. I go through the mail thread above, but I don't know how vDSO is "prelinked". Alternatively, we can filter vDSO by name matching, like "", "linux-vdso.so.1" and "linux-gate.so.1", which was proposed by Doug too. Is it a good approach to fix this problem? --=20 Yao (=E9=BD=90=E5=B0=A7)