From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id YYY4MYOAqmovMxIAWB0awg (envelope-from ) for ; Wed, 16 Sep 2026 07:41:55 -0400 Authentication-Results: simark.ca; dkim=pass (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=WniL5IMX; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id C62AD1E01F; Wed, 16 Sep 2026 07:41:55 -0400 (EDT) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-25) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-6.4 required=5.0 tests=ARC_SIGNED,ARC_VALID,BAYES_00, DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED autolearn=ham autolearn_force=no version=4.0.1 Received: from vm01.sourceware.org (vm01.sourceware.org [IPv6:2620:52:6:3111::32]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id 4EE1E1E01F for ; Wed, 16 Sep 2026 07:41:55 -0400 (EDT) Received: from vm01.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 7E9514BA7992 for ; Wed, 16 Sep 2026 11:41:53 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 7E9514BA7992 Authentication-Results: sourceware.org; dkim=pass (1024-bit key, unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=WniL5IMX Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by sourceware.org (Postfix) with ESMTP id 225674BA79AE for ; Wed, 16 Sep 2026 11:40:50 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 225674BA79AE Authentication-Results: sourceware.org; dmarc=pass (p=quarantine 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 225674BA79AE Authentication-Results: sourceware.org; arc=none smtp.remote-ip=170.10.133.124 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1789558850; cv=none; b=X2suGQt32uY1KrOa2F6oGwHZVysqFN/a6d7WRpjak72KpfMlwhCoH/hRGGwFp/cow+olUIL46GRvuUJSxkWvFjGxneOdc5/ir57uhxUaUCrbfKpsCO4PrF//5kKG2FLE118NkJh4yl8UEz13dxXCq5MXZcO5pOm9OnBjRsm+318= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1789558850; c=relaxed/simple; bh=PxMKCP85W0p9d5lpBG75/j+5ZnKEP4R8dgC5P2WJWtA=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=Hvv3g1Xk4bS0rcsCyTGC3MxiTGYZblWx9rrxc7H7k0qfjnNOPToVxUzxnn1m1W+vpve9YO49xm6qsTtDKerbJ59IQje6VKnKEZkRVc4FybQxrx8Gd8p+NH4Z0vnN6+0mFbi7P3SU91UIaDtgifsuvs0Sz+jq1bosnphCxYFi/TA= ARC-Authentication-Results: i=1; sourceware.org; dkim=pass (1024-bit key, unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=WniL5IMX DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 225674BA79AE DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1789558849; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=H0GGPKM4iWWyH4Sdd9qTD13kAZLRln8yzt6CnEWxJ24=; b=WniL5IMXhNVChOdlZJKA21EuV7Jx/gS2zEHuSUtpGPASzzu9Kx+cYL6bmyMnlaOCBhc1Va ZsXmkyNTUKotBn9OO/PwVt8Wmwcj1HZ7Dzc5xL57XsW1jmdImkufCa+v6gMbr3kE1LlSib bSs1PqXketo2hdKP379do7WH9PO66Tw= Received: from mail-wm1-f72.google.com (mail-wm1-f72.google.com [209.85.128.72]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-34-tE5kFnYbPrKbx0uGYoWv6A-1; Wed, 16 Sep 2026 07:40:46 -0400 X-MC-Unique: tE5kFnYbPrKbx0uGYoWv6A-1 X-Mimecast-MFC-AGG-ID: tE5kFnYbPrKbx0uGYoWv6A_1789558845 Received: by mail-wm1-f72.google.com with SMTP id 5b1f17b1804b1-49e6ba4abdfso50711665e9.1 for ; Wed, 16 Sep 2026 04:40:46 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1789558845; x=1790163645; h=content-type:mime-version:message-id:date:references:in-reply-to :subject:cc:to:from:x-gm-gg:x-gm-message-state:from:to:cc:subject :date:message-id:reply-to:content-type; bh=H0GGPKM4iWWyH4Sdd9qTD13kAZLRln8yzt6CnEWxJ24=; b=XlDgTahTabDTKW600bpFPQiRqWmnFUdTRXlnkiyl+87r20riqgxX3MrHWOni3GSnNC d8YJxNroMSPE6GEisfSwjZaP9AZDF2xaLYKbogIKZzILoMw9U3vs+/3Ue7P/n7dfNuUn Wg8YTKZCvNr+kKy/vCuQLcYF7newcSqdornBh3WpTjvqdnZy3NKa0xwtA+qs/DfykMcS EEgE+nWNz6kfnRRlPanginDqFd1Y0xabE+cr1D7YAHLFezKGyQMQfv9fvb17xo5WOZPK lnsk6adXBBTi+n2jxs0APm+Fgu0F83Cu/otqSwFRX+JUrurWV1ncBZ/25yt2sulJ7W3q 9Cug== X-Gm-Message-State: AFuF++lS6ze/5/KOkNW8DXaPnqrKHyHoMzWvbUGv3BWOdyH0nDpftjiv xijO4ZFRs8xS4+X4vxTSolSUTeowObQ66aqOAD3j1Mc4o+pPgvoZKdkZJ7XMxJYsoo+7h0w+/5F w6AnS8h10dsePvbS4pkpX0tCJAAIYOBH0bEUySPjVCGAwS9z/ZxvHgE00gGnakD8= X-Gm-Gg: AYBFou1g07z5EcRCN4qKneIiAK4o1RZTcb7XZGzp4ML/wIptqv5ArtW3m6REYwLUkUv dp5GqJDL1oE3907Q8lfBRj8W6yZPm9wrAEIHsjKpkHYdU0d5eS7UBWE3s9dDeZSA5MH017+ZAaV uh9/Ow73m2VLg0870UR2OXCsKrrojBJ2GBlPsHelBf9kGA/Lii6dc3gQzEcCGBhtujOMIWsbxjD Ve/56MPualyuTRe5Hjl6pbGyJgjQV0mnAyfTes0wH/DBZu2993/w7OdJK/7bpV5cgst5/o6vXaO f4HzCH4pVW5A81emnAZpvb6wa8Ka9KvzQue6SNKyNr3EKZphppnwIDTk2YaPVUmeWUz9tsiYEiz 7Y3O65PCbtV7gwQg4 X-Received: by 2002:a5d:588a:0:b0:487:f31:8037 with SMTP id ffacd0b85a97d-4870f318162mr4079858f8f.14.1789558845464; Wed, 16 Sep 2026 04:40:45 -0700 (PDT) X-Received: by 2002:a5d:588a:0:b0:487:f31:8037 with SMTP id ffacd0b85a97d-4870f318162mr4079801f8f.14.1789558845065; Wed, 16 Sep 2026 04:40:45 -0700 (PDT) Received: from localhost (59.6.93.209.dyn.plus.net. [209.93.6.59]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-4870bf1fa7dsm6738801f8f.8.2026.09.16.04.40.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 16 Sep 2026 04:40:44 -0700 (PDT) From: Andrew Burgess To: Simon Marchi , Tom Tromey Cc: gdb-patches@sourceware.org Subject: Re: [PATCHv3] gdb: resolve class name via DW_AT_signature in cooked index In-Reply-To: <20947682-a728-4eaa-b914-5bcc3be11897@simark.ca> References: <295672ce0ea0bf20911fbbc997f38fe9f62b19be.1787952498.git.aburgess@redhat.com> <897f5eb957bdfd90cd3fd5efa662021ed5c2aef2.1788269262.git.aburgess@redhat.com> <1a67b29f-e2f1-480a-ae2b-e0d0d5acfdca@simark.ca> <874ifvy4u7.fsf@tromey.com> <87ecewc6gn.fsf@redhat.com> <875x06dd6f.fsf@redhat.com> <87y0d2v9rt.fsf@tromey.com> <8ff7fcd2-f79c-48fc-9730-fbaf4dc17ec3@simark.ca> <20947682-a728-4eaa-b914-5bcc3be11897@simark.ca> Date: Wed, 16 Sep 2026 12:40:44 +0100 Message-ID: <87zexhbf0j.fsf@redhat.com> MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: a5OojjM-bfHkeyh69Ez-b5fjc-bsYT_oNnW5Y2zOVJg_1789558845 X-Mimecast-Originator: redhat.com Content-Type: text/plain X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gdb-patches-bounces~public-inbox=simark.ca@sourceware.org Simon Marchi writes: > On 2026-09-15 11:55, Simon Marchi wrote: >> Having a bad parent is rare, that would only happen when some >> (nameless) type has a DW_AT_signature and the matching type unit can't >> be found. That would be a buggy producer that "forgets" to add the >> necessary type units. >> >> But the basic case where the name fixup is needed isn't an error case, >> it's just what happens when using clang with -fdebug-types-section, >> since structures/classes are nameless: >> >> 0x0000099e: DW_TAG_structure_type >> DW_AT_declaration [DW_FORM_flag_present] (true) >> DW_AT_signature [DW_FORM_ref_sig8] (0xdf1329ababfff8ca) >> >> So I suppose you'll get one fixup to do per structure/class type. >> >> Doing the fixups in parallel is easy, since it's just looking up the >> signature -> maps, and the "finalize" step already exists, so why not. > > I tested this patch on a big program (Blender). I moved the deferred > name computation to set_contents (done serially). It takes 0.014 > seconds to do it for 820602 names. So yeah, I'm fine if you want to > move it to set_contents (done serially) for simplicity. I'd already written v4 before I read this reply. In v4 I do have the cleanup performed in parallel, though this does add a little more complexity into cooked_index::set_contents. You'll have to let me know what you think, I can always go back to the approach you're proposing here if you don't like v4. Thanks, Andrew