From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id oqinOvMgFmefnRUAWB0awg (envelope-from ) for ; Mon, 21 Oct 2024 05:37: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=MeXbU6KD; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id CD7BE1E360; Mon, 21 Oct 2024 05:37:55 -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 21ECB1E35E for ; Mon, 21 Oct 2024 05:37:55 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id B9B783858C62 for ; Mon, 21 Oct 2024 09:37:54 +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 C84D63858D20 for ; Mon, 21 Oct 2024 09:37:35 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org C84D63858D20 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 C84D63858D20 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=1729503457; cv=none; b=Z4Lbih5+gogxhIlFtOX+x7lwp3Nl0I7sSfH8eyclokDR+//+vNdmmSOz64yhheAU+WLftjHnvOoS1PSgN7Ein9fsh24Jg3FON+RTrJZK2alA0putqulO78qadTy/RNfnOJ2iEwOtQuM76RlFpRSsQAdDlRw0/l0f9LXg7HjDI18= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1729503457; c=relaxed/simple; bh=Djw5g/G2pIP4EUChzvH8I8Ae/m7ryro/LdGX8hOHLjY=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=LKEuUzRZLTvvcSB05+x2n70coD4q+XDTBJZ4+v2cyyud1LCtrkYYYj0ZYWldviOuLWM8o2FiOzbh2buQR4YAulND0Hjf64aDJsTUT8fa6qyhgUhnn30KagUm7v3IUgU0PZ7n2D2+TjcGAej5zRJiJFsMiUEY2np3VB1kN+N0HOc= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1729503455; 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=xoIIVW3YyTZF165byaHZVwI1y7VqsoE5f642n8QnZYo=; b=MeXbU6KDzNboebx0SI+jfje0TVLlzQdymobRxL0Xw8Vm0/wAAUteWXm8okSeIJdtsareYC 0b8anlyydk3dpa+rHosfVBwpDqCCqGzY20q5K5yt3rAJaATFBro53F0dVG4edFHgTy1NEX 3Uw14W8qVBJfJygxD6gVdQQ/9bILIXA= Received: from mail-wr1-f72.google.com (mail-wr1-f72.google.com [209.85.221.72]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-625-LnKNPjfxNM-qdQW5LhWhLg-1; Mon, 21 Oct 2024 05:37:34 -0400 X-MC-Unique: LnKNPjfxNM-qdQW5LhWhLg-1 Received: by mail-wr1-f72.google.com with SMTP id ffacd0b85a97d-37d45f1e935so1972965f8f.0 for ; Mon, 21 Oct 2024 02:37:34 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1729503453; x=1730108253; h=mime-version:message-id:date:references:in-reply-to:subject:cc:to :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=xoIIVW3YyTZF165byaHZVwI1y7VqsoE5f642n8QnZYo=; b=nE2WBdc7YUZEopMXdQwxXjg4N5wUuSnxAaYq6bgJUholEP+sduuC4kkRcyGWrJf7t4 N/Io/UuBYe3hFAWdh4Hg+wynJ2cP74hxnwTnJZI4OSs4wXjtpWvgu5PpYumeFp4wtDiz 7ZCnHv/jaGnG7H5qf76qzTueQVT97ndnefNNHTlad+J7RbpI387aNM1PCx8z13EdyzG7 HONm08WtcEdqXhWT395fppRCS7KtkIE9k8GMpp0KSEBq6ZFWd9ibtquiEm9jnv/plhGT B/0c7+1qv93wGgwadfGeQbxt2QoYezeeWodC29opXrgB4Io764zye5tonQfbzxOs04Xa ub9g== X-Gm-Message-State: AOJu0Yy46hbWStFsksLL0caUSSZNVfZrs97L5m2CX2WI6rCGUev4UiPs 4rhErxWTXFK8k3xtuqdby8Cost1rhh9RnjHBTnLp4plovjnTrVLSSq29UkKoaqemJW9iTh124cb uZFxWawtVKUUT3bdCuDHdWfTZZerJussxxksgKfOE7TVcWk1YlBhRMMazCPlDdSUmf5M= X-Received: by 2002:a5d:6a86:0:b0:374:bd48:fae9 with SMTP id ffacd0b85a97d-37ea216e2d2mr6667656f8f.20.1729503452911; Mon, 21 Oct 2024 02:37:32 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHO07a8Xq3i2TkfJsiQn09lamAoFi/MuJug1tW+HA1eT8gtZVY3bBJnDn7urt633gReeLgaxg== X-Received: by 2002:a5d:6a86:0:b0:374:bd48:fae9 with SMTP id ffacd0b85a97d-37ea216e2d2mr6667650f8f.20.1729503452590; Mon, 21 Oct 2024 02:37:32 -0700 (PDT) Received: from localhost ([195.213.152.26]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-37ee0a58cd2sm3863504f8f.55.2024.10.21.02.37.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 21 Oct 2024 02:37:32 -0700 (PDT) From: Andrew Burgess To: Kevin Buettner Cc: gdb-patches@sourceware.org Subject: Re: [PATCH] gdb/guile: add get-basic-type In-Reply-To: <20241010185120.74c5052c@f40-zbm-amd> References: <20241010185120.74c5052c@f40-zbm-amd> Date: Mon, 21 Oct 2024 10:37:31 +0100 Message-ID: <87iktlyexw.fsf@redhat.com> MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 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 Kevin Buettner writes: > 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 I've gone ahead and pushed this patch. If there's any post-commit feedback then I'm happy to address it. Thanks, Andrew