From: Andrew Burgess <aburgess@redhat.com>
To: Kevin Buettner <kevinb@redhat.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [PATCH] gdb/guile: add get-basic-type
Date: Mon, 21 Oct 2024 10:37:31 +0100 [thread overview]
Message-ID: <87iktlyexw.fsf@redhat.com> (raw)
In-Reply-To: <20241010185120.74c5052c@f40-zbm-amd>
Kevin Buettner <kevinb@redhat.com> writes:
> On Sun, 6 Oct 2024 20:40:23 +0100
> Andrew Burgess <aburgess@redhat.com> 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 "#<gdb:type int>", 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 <kevinb@redhat.com>
I've gone ahead and pushed this patch. If there's any post-commit
feedback then I'm happy to address it.
Thanks,
Andrew
prev parent reply other threads:[~2024-10-21 9:37 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-06 19:40 Andrew Burgess
2024-10-11 1:51 ` Kevin Buettner
2024-10-21 9:37 ` Andrew Burgess [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87iktlyexw.fsf@redhat.com \
--to=aburgess@redhat.com \
--cc=gdb-patches@sourceware.org \
--cc=kevinb@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox