From owner-svn-src-all@freebsd.org Wed Nov 21 21:46:07 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2C8D61147890; Wed, 21 Nov 2018 21:46:07 +0000 (UTC) (envelope-from sobomax@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id C3ADF784E0; Wed, 21 Nov 2018 21:46:06 +0000 (UTC) (envelope-from sobomax@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id A4D3C2629D; Wed, 21 Nov 2018 21:46:06 +0000 (UTC) (envelope-from sobomax@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wALLk6GQ097256; Wed, 21 Nov 2018 21:46:06 GMT (envelope-from sobomax@FreeBSD.org) Received: (from sobomax@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wALLk6WS097255; Wed, 21 Nov 2018 21:46:06 GMT (envelope-from sobomax@FreeBSD.org) Message-Id: <201811212146.wALLk6WS097255@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sobomax set sender to sobomax@FreeBSD.org using -f From: Maxim Sobolev Date: Wed, 21 Nov 2018 21:46:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r340745 - head/contrib/elftoolchain/readelf X-SVN-Group: head X-SVN-Commit-Author: sobomax X-SVN-Commit-Paths: head/contrib/elftoolchain/readelf X-SVN-Commit-Revision: 340745 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: C3ADF784E0 X-Spamd-Result: default: False [0.49 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_SPAM_SHORT(0.26)[0.264,0]; NEURAL_HAM_LONG(-0.00)[-0.003,0]; NEURAL_SPAM_MEDIUM(0.23)[0.231,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-Rspamd-Server: mx1.freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Nov 2018 21:46:07 -0000 Author: sobomax Date: Wed Nov 21 21:46:06 2018 New Revision: 340745 URL: https://svnweb.freebsd.org/changeset/base/340745 Log: Fix CU: output of the --debug-dump=decodedline, the problem there is that both file name and current directory is recorded, however file name sometimes already contains absolute path. In which case prefixing it with directory name results in an invalid pathname. Only append directory name if the file name does not start with '/'. This seems to DTRT. Approved by: emaste MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D18290 Modified: head/contrib/elftoolchain/readelf/readelf.c Modified: head/contrib/elftoolchain/readelf/readelf.c ============================================================================== --- head/contrib/elftoolchain/readelf/readelf.c Wed Nov 21 20:15:56 2018 (r340744) +++ head/contrib/elftoolchain/readelf/readelf.c Wed Nov 21 21:46:06 2018 (r340745) @@ -4720,7 +4720,7 @@ dump_dwarf_line_decoded(struct readelf *re) DW_DLV_OK) dir = NULL; printf("CU: "); - if (dir && file) + if (dir && file && file[0] != '/') printf("%s/", dir); if (file) printf("%s", file);