From patchwork Fri Oct 25 22:21:05 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ian Lance Taylor X-Patchwork-Id: 2002673 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=golang-org.20230601.gappssmtp.com header.i=@golang-org.20230601.gappssmtp.com header.a=rsa-sha256 header.s=20230601 header.b=plt9X9Tz; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org (client-ip=8.43.85.97; helo=server2.sourceware.org; envelope-from=gcc-patches-bounces~incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=patchwork.ozlabs.org) Received: from server2.sourceware.org (server2.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4XZy1m1lzVz1xwF for ; Sat, 26 Oct 2024 09:21:48 +1100 (AEDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 264003858C35 for ; Fri, 25 Oct 2024 22:21:46 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mail-yw1-x112c.google.com (mail-yw1-x112c.google.com [IPv6:2607:f8b0:4864:20::112c]) by sourceware.org (Postfix) with ESMTPS id F3B943858C56 for ; Fri, 25 Oct 2024 22:21:17 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org F3B943858C56 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=golang.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=golang.org ARC-Filter: OpenARC Filter v1.0.0 sourceware.org F3B943858C56 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2607:f8b0:4864:20::112c ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1729894879; cv=none; b=JAN0/Nzh3+0N8mPXCwrSxrDI3z/TEkAiARuoXj7MXWeYXmJAHOH8gx6GNUjTyYwiK0z2SqbQ7hW3MFbVjNqNsehAZHqIfokPJOvFuAdKmJX7EmYF9D5QccLReldQh5mFS+Ufe/rl1K6HtP+o6RkHYq2PSolRaqKvPUeQe3wyp+o= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1729894879; c=relaxed/simple; bh=c2GszLEHxhx+SIoStySpeauUyHQMKYWHEYczNs7uobo=; h=DKIM-Signature:MIME-Version:From:Date:Message-ID:Subject:To; b=oqH14y4n4dgr/VCMV6FOl9bqv0KojOPXwadl2zk/9j08wmWlpCvG/XCQdOELfi7VLjRm++2yHWJOFDWW2N1++HLWCJih1IWj1xRzaRja9Ars8T+YIKW+rgDnBDAu1lmGLPkXxUXYS8rK8VXC4EosererxxBrVYbfQXMyWAAXeWo= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-yw1-x112c.google.com with SMTP id 00721157ae682-6e5ef7527deso29071877b3.0 for ; Fri, 25 Oct 2024 15:21:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=golang-org.20230601.gappssmtp.com; s=20230601; t=1729894877; x=1730499677; darn=gcc.gnu.org; h=to:subject:message-id:date:from:mime-version:from:to:cc:subject :date:message-id:reply-to; bh=OHYXZ+DKrhPAJ+yLbODoimE6WdPhBwuaJK2Z/PiZbkE=; b=plt9X9TzKzwhBYMaC5LtGIVdLy5FH0tOWahZD9gNVfKpfElmXPuEnaaB6MqVAc+GuB 68ahcRa8ZnRICq3lQcsuSOIFAM8IMvFw1VHhnuS5WCDdIpOFlVVj4+Oc0lbH9y6rCBTz l/nDa0B/7/IZgrro7wtC9XTMiWrfEZnMQ0Twm7u+tDFrOJjCeww7Qe5KvV2Yjii+hx4E iuv5r0nsXWDMhrT49fTFB9KWK0gOtisTvaZ/+sywXXg09Vvg0zrdL+jZeM7+IYeqmE09 7IbzkhFo15w2BePzb4XvCktbyOGTeaw6eLYeNkanqFXt+2evkuY6ytTD1XVawTqtMD4F pXpw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1729894877; x=1730499677; h=to:subject:message-id:date:from:mime-version:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=OHYXZ+DKrhPAJ+yLbODoimE6WdPhBwuaJK2Z/PiZbkE=; b=BYfmI2hT9wjXYp7Rd6FTdVu2grhSbbPLVrUGqDVduiLAKRzIBVlCwlGSi5U8ASJFCB sWJKUjS8D25APmC/1qrM+xNv7JlxQW608e9tAAc8xSussA5JgumxZUv2QYHa/lrkiTPN pfG/DKKPo6VVjx3Ae7jpZB1UY6PU2DLlCk1/gKDNnu1MRYeJuKGWibGAuDqs0zHW6Eu6 mUy441TIdSJeqhz4xzsFkojigIOkylEvt6sJI30TGoUceey6KOSwhPodr1y1V3dfc+Ab 3Yei3IdJ6DdgfG/2m6KPTpSn0xfd/Znx/JVjg6QMGlX+ngRFJU+Kd4kh2huceOyAl2Km btPQ== X-Gm-Message-State: AOJu0YwfAoWb0pjO16QstHF9WK5XHAS0T3qYPESN5nlX03IufzDJcvj3 a95iJqB9+s4iND9BD/mn0+gjaCgZZ/+Kr63/5wu8raOWLI1YnRzXOFRS+xYIzLeuOCN6JzuAKUc kbFc+PDFcp3b/Uv7472vwWKnKuPhm/C8BnIa390C1aFUOHIpIqBuomg== X-Google-Smtp-Source: AGHT+IEBjbgKBwW4UWYXb3DvMOwMM3L75y51Ja1yODtVG2AFvkbndeagciwpO+Cm2TnBqD//wbxZKDdoS5fnr7ENK3c= X-Received: by 2002:a05:690c:3512:b0:6e3:d76c:9354 with SMTP id 00721157ae682-6e9d8ad6c49mr12613217b3.41.1729894877147; Fri, 25 Oct 2024 15:21:17 -0700 (PDT) MIME-Version: 1.0 From: Ian Lance Taylor Date: Fri, 25 Oct 2024 15:21:05 -0700 Message-ID: Subject: libbacktrace patch committed: Recognize new Mach-O DWARF sections To: gcc-patches X-Spam-Status: No, score=-9.3 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gcc-patches-bounces~incoming=patchwork.ozlabs.org@gcc.gnu.org This patch by Pavel Safonov recognizes the new DWARF section names used on macos Sequoia. Bootstrapped and ran libbacktrace tests on x86_64-pc-linux-gnu. Committed to mainline. Ian * macho.c (dwarf_section_names): Add __debug_addr and __debug_line_str. d97243588c8b5cbe8b657fd51f08038c42c81908 diff --git a/libbacktrace/macho.c b/libbacktrace/macho.c index fc4c9591dfa..9f8738dd784 100644 --- a/libbacktrace/macho.c +++ b/libbacktrace/macho.c @@ -306,9 +306,9 @@ static const char * const dwarf_section_names[DEBUG_MAX] = "__debug_abbrev", "__debug_ranges", "__debug_str", - "", /* DEBUG_ADDR */ + "__debug_addr", "__debug_str_offs", - "", /* DEBUG_LINE_STR */ + "__debug_line_str", "__debug_rnglists" };