From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id h9mmAL2ECGe4PwkAWB0awg (envelope-from ) for ; Thu, 10 Oct 2024 21:51:57 -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=avoavEJd; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id DDE741E357; Thu, 10 Oct 2024 21:51:56 -0400 (EDT) X-Spam-Checker-Version: SpamAssassin 4.0.0 (2022-12-13) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-7.8 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_BLOCKED,RCVD_IN_VALIDITY_CERTIFIED,RCVD_IN_VALIDITY_RPBL, RCVD_IN_VALIDITY_SAFE,URIBL_BLOCKED,URIBL_DBL_BLOCKED_OPENDNS autolearn=ham autolearn_force=no version=4.0.0 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 (prime256v1) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id 164151E05C for ; Thu, 10 Oct 2024 21:51:56 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 407D03858283 for ; Fri, 11 Oct 2024 01:51:55 +0000 (GMT) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by sourceware.org (Postfix) with ESMTP id 2E4A1385840A for ; Fri, 11 Oct 2024 01:51:28 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 2E4A1385840A 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 2E4A1385840A Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=170.10.129.124 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1728611490; cv=none; b=uXrIUYBiaEQiiLeNHQwo2mscU2pt8fXWDoUL7hKOD5Hs1D/jY3jXpFZ2YTJuEhzcEzMbHpcx+dDsbfpwDJPNuSRukEUmieRPr5wgyf3B42xmbbg3sc88c2Ju8UvbTytrv6BklDtVGxZCDZ6ja9uj05ZmRh0/5wJXajAI3B1bNX4= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1728611490; c=relaxed/simple; bh=S7+eSsjCIKc0ej/mYBq1oTAgpfT3Xw3BTXHo6yiTUmg=; h=DKIM-Signature:Date:From:To:Subject:Message-ID:MIME-Version; b=mFHbpQGHSxtNeruWEh2YYMWt95CysjsOXilOKgAaCXgU3OHVgkK7DwUDzkmT+vmUukVAsLxT4B3WnhGmpFcS45vZd+x45KIAh8mRdJseFLLcU65HvspCt62IFyfCtyjFUglUiJyd/uAEHaQVJ3aaL1YP+qVP964r28e+UBgo/xo= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1728611487; 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=XSv5d7OICW6BDfE1mKy8hVI00wjmUqC6roX3GaMLlrI=; b=avoavEJdXs7xW+XogMcXl8vwGxv/Hu+UtXgX5PA7Y4c9VDqYwWtSEEH1CD+U8xwSTAcFsj wnbXuLZUBMoX189VRm10nD6KDR1AiBgOblBfgvcNJmGd0Y6jUQULop0I0uQ5w62q5rwGnB UaZBlSuLh2YIql57DUCi9aQkABQ5zHA= Received: from mx-prod-mc-04.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-503-SlDPQh5TPkOZmSsHJE7LUQ-1; Thu, 10 Oct 2024 21:51:26 -0400 X-MC-Unique: SlDPQh5TPkOZmSsHJE7LUQ-1 Received: from mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.12]) (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 mx-prod-mc-04.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 23B5F1955DC3 for ; Fri, 11 Oct 2024 01:51:26 +0000 (UTC) Received: from f40-zbm-amd (unknown [10.22.64.14]) by mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 49D9119560A2; Fri, 11 Oct 2024 01:51:25 +0000 (UTC) Date: Thu, 10 Oct 2024 18:51:20 -0700 From: Kevin Buettner To: Andrew Burgess Cc: gdb-patches@sourceware.org Subject: Re: [PATCH] gdb/guile: add get-basic-type Message-ID: <20241010185120.74c5052c@f40-zbm-amd> In-Reply-To: References: Organization: Red Hat MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.0 on 10.30.177.12 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit 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 On Sun, 6 Oct 2024 20:40:23 +0100 Andrew Burgess wrote: > A question was asked on stackoverflow.com about the guile function > get-basic-type[1] which is mentioned in the docs along with an example > of its use. > > The problem is, the function was apparently never actually added to > GDB. But it turns out that it's pretty easy to implement, so lets add > it now. Better late than never. > > The implementation mirrors the Python get_basic_type function. I've > added a test which is a copy of the documentation example. > > One issue is that the docs suggest that the type will be returned as > just "int", however, I'm not sure what this actually means. It makes > more sense that the function return a gdb:type object which would be > represented as "#", so I've updated the docs to show > this output. > > [1] https://stackoverflow.com/questions/79058691/unbound-variable-get-basic-type-in-gdb-guile-session > --- > gdb/doc/guile.texi | 2 +- > gdb/guile/lib/gdb/types.scm | 19 +++++++++++++++++++ > gdb/testsuite/gdb.guile/types-module.cc | 4 ++++ > gdb/testsuite/gdb.guile/types-module.exp | 5 +++++ > 4 files changed, 29 insertions(+), 1 deletion(-) LGTM. Reviewed-by: Kevin Buettner