From patchwork Wed Feb 17 16:02:33 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Florian Weimer X-Patchwork-Id: 1441267 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=sourceware.org (client-ip=8.43.85.97; helo=sourceware.org; envelope-from=libc-alpha-bounces@sourceware.org; receiver=) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; secure) header.d=sourceware.org header.i=@sourceware.org header.a=rsa-sha256 header.s=default header.b=BXf1glz7; dkim-atps=neutral Received: from sourceware.org (unknown [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4DgjK05znPz9sRf for ; Thu, 18 Feb 2021 03:02:12 +1100 (AEDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id A65BC3836C36; Wed, 17 Feb 2021 16:02:08 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org A65BC3836C36 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1613577728; bh=qoEI64ec3t04IIZYqtOyZhQNN89LnVc+bFTG928ZH9E=; h=To:Subject:Date:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=BXf1glz7W3L205m5Yv5hvmXFb3MVLzeLQ87NZJ5ixyiKo6NGk6BTCX3xU5LWz/pWQ E6UGBNbr1yUkhbxwiHDvuWwPzYuPmMlnYNlzTVStBUJj3HjvzschcapfNnFUGWmWNY pNmyG4lS3oPzcxYuwQGrBGXG4Cv92XiPmgJBRNOg= X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [63.128.21.124]) by sourceware.org (Postfix) with ESMTP id F366E3836C59 for ; Wed, 17 Feb 2021 16:02:05 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org F366E3836C59 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-120-hywpZ0ipOBu0ltMdKO2EUw-1; Wed, 17 Feb 2021 11:02:03 -0500 X-MC-Unique: hywpZ0ipOBu0ltMdKO2EUw-1 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 694F680402E for ; Wed, 17 Feb 2021 16:02:02 +0000 (UTC) Received: from oldenburg.str.redhat.com (ovpn-113-131.ams2.redhat.com [10.36.113.131]) by smtp.corp.redhat.com (Postfix) with ESMTPS id C38CF60C61 for ; Wed, 17 Feb 2021 16:02:01 +0000 (UTC) To: libc-alpha@sourceware.org Subject: [PATCH 00/10] Unwinder interface consolidation Message-Id: Date: Wed, 17 Feb 2021 17:02:33 +0100 User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com X-Spam-Status: No, score=-6.3 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H4, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Florian Weimer via Libc-alpha From: Florian Weimer Reply-To: Florian Weimer Errors-To: libc-alpha-bounces@sourceware.org Sender: "Libc-alpha" This series is basically a repost. I had to tweak it somewhat to pick up the customization for MIPS. I switched to reusing that header for all customization. This is a prequiste for consolidating and libc and nptl implementations of unwinding, and moving the cancellation implementation into libc. Thanks, Florian Florian Weimer (10): Implement for dynamically loading the libgcc_s unwinder backtrace: Implement on top of arm: Implement backtrace on top of i386: Implement backtrace on top of m68k: Implement backtrace on top of sparc: Implement backtrace on top __frame_state_for: Use for unwinder access Move sysdeps/gnu/unwind-resume.c to sysdeps/generic/unwind-resume.c Implement _Unwind_Resume in libc on top of nptl: Use for accessing the libgcc_s unwinder debug/backtrace.c | 86 +++-------- malloc/set-freeres.c | 5 + misc/Makefile | 2 +- misc/Versions | 1 + misc/unwind-link.c | 145 ++++++++++++++++++ nptl/nptlfreeres.c | 1 - nptl/pthreadP.h | 6 +- nptl/pthread_cancel.c | 3 +- sysdeps/alpha/unwind-arch.h | 28 ++++ sysdeps/arm/arm-unwind-resume.S | 26 ++-- sysdeps/arm/backtrace.c | 77 +++------- sysdeps/arm/nptl/unwind-forcedunwind.c | 25 +++ sysdeps/arm/pt-arm-unwind-resume.S | 22 ++- sysdeps/arm/unwind-arch.h | 39 +++++ sysdeps/arm/unwind-resume.c | 25 +++ sysdeps/generic/framestate.c | 21 +-- sysdeps/generic/unwind-arch.h | 27 ++-- sysdeps/generic/unwind-link.h | 106 +++++++++++++ sysdeps/generic/unwind-resume.c | 46 ++++++ sysdeps/gnu/unwind-resume.c | 83 ---------- sysdeps/i386/backtrace.c | 82 +++------- sysdeps/i386/unwind-arch.h | 39 +++++ sysdeps/ia64/unwind-arch.h | 32 ++++ sysdeps/m68k/backtrace.c | 82 +++------- sysdeps/m68k/m680x0/unwind-arch.h | 26 ++++ sysdeps/m68k/unwind-arch.h | 35 +++++ sysdeps/mach/hurd/fork.c | 3 + .../{unix/sysv/linux => }/mips/unwind-arch.h | 17 +- sysdeps/nptl/fork.c | 3 + sysdeps/nptl/unwind-forcedunwind.c | 115 ++------------ sysdeps/powerpc/powerpc32/unwind-arch.h | 28 ++++ sysdeps/s390/unwind-arch.h | 28 ++++ sysdeps/sh/unwind-arch.h | 28 ++++ sysdeps/sparc/backtrace.c | 66 ++------ sysdeps/sparc/unwind-arch.h | 28 ++++ .../sysv/linux/ia64/unwind-forcedunwind.c | 16 +- 36 files changed, 852 insertions(+), 550 deletions(-) create mode 100644 misc/unwind-link.c create mode 100644 sysdeps/alpha/unwind-arch.h create mode 100644 sysdeps/arm/nptl/unwind-forcedunwind.c create mode 100644 sysdeps/arm/unwind-arch.h create mode 100644 sysdeps/arm/unwind-resume.c create mode 100644 sysdeps/generic/unwind-link.h create mode 100644 sysdeps/generic/unwind-resume.c delete mode 100644 sysdeps/gnu/unwind-resume.c create mode 100644 sysdeps/i386/unwind-arch.h create mode 100644 sysdeps/ia64/unwind-arch.h create mode 100644 sysdeps/m68k/m680x0/unwind-arch.h create mode 100644 sysdeps/m68k/unwind-arch.h rename sysdeps/{unix/sysv/linux => }/mips/unwind-arch.h (85%) create mode 100644 sysdeps/powerpc/powerpc32/unwind-arch.h create mode 100644 sysdeps/s390/unwind-arch.h create mode 100644 sysdeps/sh/unwind-arch.h create mode 100644 sysdeps/sparc/unwind-arch.h Reviewed-by: Carlos