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 AB718385B509 for ; Sun, 18 Feb 2024 04:09:51 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org AB718385B509 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 AB718385B509 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=1708229393; cv=none; b=JAWqI+dz3sxqhiTur5w+tHWqhZk9GsQyaM+1zCm1/RQxaR+Hzi7nfSR4PEM11ZNYGFrYywklMYoCo176Ma0tVnbKs1XrpxUUIclmpNoVtJrgWu3nFTTtUORDmTGgCIN/UJ2nY4eMmDIE+JS7wDdJ4X4Z4W5Jw5FSpKi4LziFpUI= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1708229393; c=relaxed/simple; bh=Zp3p+0Lp5B5Pu8gfBY503s8PIc3hpNNwwcoH/7K+8KE=; h=DKIM-Signature:Date:From:To:Subject:Message-ID:MIME-Version; b=wU2S8JPHONvIBbi79nfFsSzkbWOKiqJCDWkWdhItiH7NxteX3NZ/a18NLJXFEUbFHe6ScTEUrOZbqFPh7GWwPbiLpJRVyQt7X8+HdPMxx20QaVhymU8eO4XL5xFBaHruNgpT6dNhXrs9G0bWrUFpE7Qfz3qsTPBvnl+/2XOnbU4= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1708229391; 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: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Z5n59D8rO1yIuddDMS/Lqmm7M35/t/uGmkm/6XW2vMQ=; b=BB0j8zq6I+bocyS/jTX6vzh7SMBd3V0ekCFyRtto9lfcvjja/JXoVioPrfbDYRpeEzCEBl IHU1WvAbS+r8mZoGLquyKosUcohBrw5P9As5EkRQ9yXrD1iY+ju0LMxLkXbnt/vcIlkABL 0AuEEl3BwkFUvqDgIgoY5Gbz9bxt9wY= Received: from mimecast-mx02.redhat.com (mx-ext.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-472-Mexs9FvWN4mKj_jGWSZEyw-1; Sat, 17 Feb 2024 23:09:49 -0500 X-MC-Unique: Mexs9FvWN4mKj_jGWSZEyw-1 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 3C26E3806703; Sun, 18 Feb 2024 04:09:49 +0000 (UTC) Received: from f39-zbm-amd (unknown [10.22.16.106]) by smtp.corp.redhat.com (Postfix) with ESMTPS id E3DF41121306; Sun, 18 Feb 2024 04:09:48 +0000 (UTC) Date: Sat, 17 Feb 2024 21:09:47 -0700 From: Kevin Buettner To: Tom de Vries Cc: gdb-patches@sourceware.org Subject: Re: [PATCH v2] [gdb] Fix "value is not available" with debug frame Message-ID: <20240217210947.20211db0@f39-zbm-amd> In-Reply-To: <20240213171718.8934-1-tdevries@suse.de> References: <20240213171718.8934-1-tdevries@suse.de> Organization: Red Hat MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.3 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-4.9 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H4,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_NONE,TXREP,T_SCC_BODY_TEXT_LINE 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: Hi Tom, On Tue, 13 Feb 2024 18:17:18 +0100 Tom de Vries wrote: > On arm-linux, with a started hello world, running "info frame" works fine, but > when I set debug frame to on, I run into: > ... > (gdb) info frame > ... > [frame] frame_unwind_register_value: exit > value is not available > (gdb) > ... > > The problem is here in frame_unwind_register_value: > ... > if (value->lazy ()) > gdb_printf (&debug_file, " lazy"); > else > { > int i; > gdb::array_view buf = value->contents (); > ... > where we call value->contents () while !value->entirely_available (). > > Fix this by checking value->entirely_available () and printing: > ... > [frame] frame_unwind_register_value: -> register=91 unavailable > ... > > Tested on arm-linux. The fix looks good to me. I'm wondering about the test case though. Is it the case that the failure depends on debug info from a particular compiler (or compiler version)? If so, would it be possible to devise a test using the DWARF assembler which would not be dependent on compiler output that may change over time? Kevin