From owner-svn-src-head@freebsd.org Mon Feb 3 19:08:36 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 1050522B445; Mon, 3 Feb 2020 19:08:36 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48BHRR6jlNz3RL5; Mon, 3 Feb 2020 19:08:35 +0000 (UTC) (envelope-from markj@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 DFE5F5719; Mon, 3 Feb 2020 19:08:35 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 013J8ZlY049049; Mon, 3 Feb 2020 19:08:35 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 013J8ZvF049048; Mon, 3 Feb 2020 19:08:35 GMT (envelope-from markj@FreeBSD.org) Message-Id: <202002031908.013J8ZvF049048@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Mon, 3 Feb 2020 19:08:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r357462 - head/contrib/elftoolchain/addr2line X-SVN-Group: head X-SVN-Commit-Author: markj X-SVN-Commit-Paths: head/contrib/elftoolchain/addr2line X-SVN-Commit-Revision: 357462 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 03 Feb 2020 19:08:36 -0000 Author: markj Date: Mon Feb 3 19:08:35 2020 New Revision: 357462 URL: https://svnweb.freebsd.org/changeset/base/357462 Log: addr2line: Avoid a name collision. The RB_ macros define functions with a parameter named head, and gcc warns about this. MFC with: r357450 Modified: head/contrib/elftoolchain/addr2line/addr2line.c Modified: head/contrib/elftoolchain/addr2line/addr2line.c ============================================================================== --- head/contrib/elftoolchain/addr2line/addr2line.c Mon Feb 3 18:59:07 2020 (r357461) +++ head/contrib/elftoolchain/addr2line/addr2line.c Mon Feb 3 19:08:35 2020 (r357462) @@ -87,7 +87,7 @@ static char unknown[] = { '?', '?', '\0' }; static Dwarf_Addr section_base; /* Need a new curlopc that stores last lopc value. */ static Dwarf_Unsigned curlopc = ~0ULL; -static RB_HEAD(cutree, CU) head = RB_INITIALIZER(&head); +static RB_HEAD(cutree, CU) cuhead = RB_INITIALIZER(&cuhead); static int lopccmp(struct CU *e1, struct CU *e2) @@ -397,14 +397,14 @@ culookup(Dwarf_Unsigned addr) struct CU find, *res; find.lopc = addr; - res = RB_NFIND(cutree, &head, &find); + res = RB_NFIND(cutree, &cuhead, &find); if (res != NULL) { if (res->lopc != addr) - res = RB_PREV(cutree, &head, res); + res = RB_PREV(cutree, &cuhead, res); if (res != NULL && addr >= res->lopc && addr < res->hipc) return (res); } else { - res = RB_MAX(cutree, &head); + res = RB_MAX(cutree, &cuhead); if (res != NULL && addr >= res->lopc && addr < res->hipc) return (res); } @@ -509,7 +509,7 @@ translate(Dwarf_Debug dbg, Elf *e, const char* addrstr cu->hipc = hipc; cu->die = die; STAILQ_INIT(&cu->funclist); - RB_INSERT(cutree, &head, cu); + RB_INSERT(cutree, &cuhead, cu); curlopc = lopc; break;