From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by sourceware.org (Postfix) with ESMTPS id 0088E3857C5A for ; Wed, 13 Mar 2024 12:08:36 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 0088E3857C5A Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 0088E3857C5A Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=170.10.133.124 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1710331718; cv=none; b=FllrHx7N43QL/FzISvNj3lgLqb7mLGjah4UTVbjpD3A8hBLBg1CGR1qyLwe+LjLl5BVqZHJpfSF92mAyxLExOStjxwIgSXfJxybYmSEnjy+7UZ2KIWMp8lSHT9mzh3AhVhCy0rje/rQIm7nhKpv/SjjsFSqo57yOzhpZWSnF+t8= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1710331718; c=relaxed/simple; bh=6EU+oPxDOePSSb+8DFFyUVZIdqEoeX3lAIn9jM1nHY8=; h=DKIM-Signature:Message-ID:Date:MIME-Version:Subject:To:From; b=NTpjcNzd6pi+vrcty6SOnoa+PX/5o5V0tduvRD8OznqoXc3QsF6aRaVfQf66o7hDZVcw4J2NuJx7pRi+gZhH9RM77il0VaytVLozINhkwCPe3S/bioNqxHQLO7i6Cc2FMmfpTUeeBYIbFiEWqxrWwYYXS1gAUCrFlQ7HI7eOAag= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1710331716; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=4/dDtY/yphzm8XczFJNlHs+c91RvGAcDnf/mvUNy10c=; b=XUW3zzOQHB6wB/kKPuDWE4RrGGHJV+OIO+RcS6A7BNnuUOmGz9HHOcLex6wR0Ymq2xLVpX Ti/rLkCX4jvpP7cX/q7nC7tvZZPnVif+jm8f1ChLMk5TmT9QSz2UPvkUKemVdJY1MQAp7B 5jEaCD6FWTC5EzXrSLokblLCM/zpIA8= Received: from mail-wr1-f70.google.com (mail-wr1-f70.google.com [209.85.221.70]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-58-aUbqe-1CPc6LZRjCYUfRRg-1; Wed, 13 Mar 2024 08:08:35 -0400 X-MC-Unique: aUbqe-1CPc6LZRjCYUfRRg-1 Received: by mail-wr1-f70.google.com with SMTP id ffacd0b85a97d-33e92573a93so2002461f8f.2 for ; Wed, 13 Mar 2024 05:08:35 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1710331714; x=1710936514; h=content-transfer-encoding:in-reply-to:from:references:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=4/dDtY/yphzm8XczFJNlHs+c91RvGAcDnf/mvUNy10c=; b=AaAAWT70KSfUKD6R3By6fCsGbjnUBUUnhX5FnC+FTagPWq1sotDlRoITPe1FDFrDKV myLagKQCUhyHNHGz9/eU5lEmrd27FUnGDw8zlKlhZ0YLV6WPq3Lv7WYwb1+T1i0bvRZE wpj1vtiJU+rZvFhOZITLWGkV6488Kwyk8GVXjsEpNsAyds8PbUBjziYEitkPicE7QdUb IQ+lnKZRp6X0RpbolFRX89bxbl9Xj5PCEqlviLtOP5FPyLRNp2JS4CgpSUlBNyV83/4r i3oe/dMsXa/vQS9zt8k3L9tg8PIEAZ/SsghwRyHVetlgXKk7ScvZiSz4Uh2aPiIe0VJd XSIw== X-Forwarded-Encrypted: i=1; AJvYcCURBcaBPPKUPC2fHsevmlmRyA2Zc8YM5gznEarZ1dg7sir2FOMqUqC7Gdw1U0yPf2KANoMWt8qz5NcciYtFj9eVPzCVbx8C4sdg1A== X-Gm-Message-State: AOJu0YwdQMoWPqmspb31tp09FwvmwDuww2zygfrOVJO+fuNAx9MJeXSB rrIDgjiV764aIoI69AVLefjAcLqCQjDrcUhtH5zFSvkJNQ9A6rnxnWGAUruLpVbkONJl6SAgMQ1 XkpqsD0L/+A0L5MxdWmaFNXmpR03yv82eLPZkI+Y7u9j7nX3myfzWwfH4Fhuj61KpLAU= X-Received: by 2002:adf:fe4e:0:b0:33e:8fb4:f3e9 with SMTP id m14-20020adffe4e000000b0033e8fb4f3e9mr1445022wrs.29.1710331713828; Wed, 13 Mar 2024 05:08:33 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFueGID+UWqFrjK4R2M0vjpqRyQwhuzFWNY7umpaPf/+boP/Facpe9JcMHvZRmOetJB7v7Nqg== X-Received: by 2002:adf:fe4e:0:b0:33e:8fb4:f3e9 with SMTP id m14-20020adffe4e000000b0033e8fb4f3e9mr1445008wrs.29.1710331713461; Wed, 13 Mar 2024 05:08:33 -0700 (PDT) Received: from [192.168.0.129] (ip-94-112-227-180.bb.vodafone.cz. [94.112.227.180]) by smtp.gmail.com with ESMTPSA id q27-20020a056000137b00b0033e72e104c5sm11500073wrz.34.2024.03.13.05.08.32 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 13 Mar 2024 05:08:33 -0700 (PDT) Message-ID: <6c98511a-80e4-4a96-ae03-716c96757bc3@redhat.com> Date: Wed, 13 Mar 2024 13:08:32 +0100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH 0/4] Modernize frame unwinders and add disable feature To: Luis Machado , gdb-patches@sourceware.org References: <20240306125135.766567-1-blarsen@redhat.com> <47e1bce0-1f4f-4ac4-b101-a2496a51cbe8@arm.com> <2702cb98-2bc0-40fb-a871-a10aa1aeb0f7@redhat.com> <49325cdf-f64c-404d-9b7a-54a820b00ca4@arm.com> From: Guinevere Larsen In-Reply-To: <49325cdf-f64c-404d-9b7a-54a820b00ca4@arm.com> X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Language: en-US Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-8.8 required=5.0 tests=BAYES_00,BODY_8BITS,DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,GIT_PATCH_0,RCVD_IN_BARRACUDACENTRAL,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H4,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_NONE,TXREP,T_SCC_BODY_TEXT_LINE,WEIRD_PORT autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: On 11/03/2024 16:10, Luis Machado wrote: > On 3/11/24 15:00, Guinevere Larsen wrote: >> On 11/03/2024 15:56, Luis Machado wrote: >>> Hi, >>> >>> On 3/6/24 12:51, Guinevere Larsen wrote: >>>> This patch series started with me trying to make it easier to test GDB's >>>> ability to unwind using CFI data, to improve a previous patch I sent to >>>> the list. However, once I finished these changes, I realized there was >>>> an unrelated bug I should fix before proposing the CFI test. Since these >>>> changes are significant enough already, and I think would be interesting >>>> on their own, I figured I shoudl submit this patch series as is right >>>> now while I figure out the other bug. >>>> >>>> The first patch is just a minor change, storing frame unwinders in a >>>> vector instead of through an unwinder table accessible using the >>>> registry system. This isn't required (like I originally thought it was), >>>> but it does make the whole system more readable in my opinion. >>>> >>>> Patch 3 has the real meat of the modernization, making GDB use >>>> polymorphism to handle frame unwinders. This is slightly slower than >>>> using function pointers, but much more readable in my opinion. >>>> >>>> As for the unwinder classes, they were chosen somewhat arbitrarily, >>>> mostly based on where I found an unwinder and its name. I almost expect >>>> some unwinders to be mis-categorized, but that should be easy to fix. >>>> >>>> The changes up to patch 3 have been tested with a try-branch, no >>>> regressions as far as I could see. >>>> >>>> Guinevere Larsen (4): >>>>    gdb: make gdbarch store a vector of frame unwinders >>>>    gdb: add "unwinder class" to frame unwinders >>>>    gdb: Migrate frame unwinders to use C++ classes >>>>    GDB: introduce ability to disable frame unwinders >>> I haven't gone through the series in detail, but I thought I'd give it a try on one of the >>> aarch64 machines I have access to. I didn't look particularly healthy: >>> >>> >>> # of unexpected core files      47 >>> # of expected passes            116521 >>> # of unexpected failures        581 >>> # of expected failures          77 >>> # of known failures             116 >>> # of untested testcases         128 >>> # of unresolved testcases       1102 >>> # of unsupported tests          458 >>> # of duplicate test names       10 >>> >>> I see a number of internal errors going on. Mostly like these: >>> >>>          ../../../repos/binutils-gdb/gdbsupport/errors.cc:58 >>> 0xaaaad27e7877 check_ptrace_stopped_lwp_gone >>>          ../../../repos/binutils-gdb/gdb/linux-nat.c:1634 >>> 0xaaaad27e7877 check_ptrace_stopped_lwp_gone >>>          ../../../repos/binutils-gdb/gdb/linux-nat.c:1630 >>> 0xaaaad2ae0fa3 linux_resume_one_lwp >>> >> Oh no! Linaro CI had showed something was wrong, but I wasn't able to grab an aarch64 machine to test yet. I'll check it out when I can, thanks for narrowing it down for me >> > You're welcome. Do let me know if you can't easily find an aarch64 machine to try things on, and I can provide more info > and take a deeper look. > I think I found the reason why aarch64 started failing so many cases. Can you try the following change and see if it works? I'm not 100% sure because the machine I'm using seems to have some rather unstable results, but I think it should have solved the problem. -- Cheers, Guinevere Larsen She/Her/Hers diff --git a/gdb/tramp-frame.c b/gdb/tramp-frame.c index 722d24ee129..a6f23e2b1b6 100644 --- a/gdb/tramp-frame.c +++ b/gdb/tramp-frame.c @@ -178,6 +178,9 @@ class frame_unwind_trampoline : public frame_unwind {    {      return prev_arch_p (this_frame, this_prologue_cache);    } + +  void dealloc_cache (frame_info *self, void *this_cache) const override +  { }  };  void