From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 115217 invoked by alias); 12 Feb 2019 22:12:12 -0000 Mailing-List: contact gdb-testers-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-testers-owner@sourceware.org Received: (qmail 115207 invoked by uid 89); 12 Feb 2019 22:12:12 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=ham version=3.3.2 spammy= X-HELO: kwanyin.sergiodj.net Received: from kwanyin.sergiodj.net (HELO kwanyin.sergiodj.net) (158.69.185.54) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 12 Feb 2019 22:12:10 +0000 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [binutils-gdb] Look for separate debug files in debug directories under a sysroot. From: sergiodj+buildbot@sergiodj.net To: gdb-testers@sourceware.org Message-Id: <402d2bfec425f29c5b54089d5ff98ca9a1b8ec27@gdb-build> Date: Tue, 12 Feb 2019 22:12:00 -0000 X-SW-Source: 2019-q1/txt/msg02639.txt.bz2 *** TEST RESULTS FOR COMMIT 402d2bfec425f29c5b54089d5ff98ca9a1b8ec27 *** Author: John Baldwin Branch: master Commit: 402d2bfec425f29c5b54089d5ff98ca9a1b8ec27 Look for separate debug files in debug directories under a sysroot. When an object file is present in a system root, GDB currently looks for separate debug files under the global debugfile directories. For example, if the sysroot is set to "/myroot" and hte global debugfile directory is set to "/usr/lib/debug", GDB will look for a separate debug file for "/myroot/lib/libc.so.7" in the following paths: /myroot/lib/libc.so.7.debug /myroot/lib/.debug/libc.so.7.debug /usr/lib/debug//myroot/lib/libc.so.7.debug /usr/lib/debug/lib/libc.so.7.debug However, some system roots include a full system installation including a nested global debugfile directory under the sysroot. This patch adds an additional check to support such systems. In the example above the additional path searched is: /myroot/usr/lib/debug/lib/libc.so.7.debug To try to preserve existing behavior as much as possible, this new path is searched last for each global debugfile directory. gdb/ChangeLog: * symfile.c (find_separate_debug_file): Look for separate debug files in debug directories under the sysroot.