binutils-gdb/gdb/testsuite/gdb.guile
Andrew Burgess 9ee8849814 gdb/guile: add get-basic-type
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

Reviewed-By: Kevin Buettner <kevinb@redhat.com>
2024-10-21 10:36:32 +01:00
..
guile.exp
scm-arch.c
scm-arch.exp
scm-block.c
scm-block.exp
scm-breakpoint.c
scm-breakpoint.exp
scm-cmd.c
scm-cmd.exp
scm-disasm.c
scm-disasm.exp
scm-equal.c
scm-equal.exp
scm-error-1.scm
scm-error-2.scm
scm-error.exp
scm-frame-args.c
scm-frame-args.exp
scm-frame-args.scm
scm-frame-inline.c
scm-frame-inline.exp
scm-frame.c
scm-frame.exp
scm-gsmob.exp
scm-iterator.c
scm-iterator.exp
scm-lazy-string.c
scm-lazy-string.exp
scm-math.c
scm-math.exp
scm-objfile-script-gdb.in
scm-objfile-script.c
scm-objfile-script.exp
scm-objfile.c
scm-objfile.exp
scm-parameter.exp
scm-ports.c
scm-ports.exp
scm-pretty-print.c
scm-pretty-print.exp
scm-pretty-print.scm
scm-progspace.c
scm-progspace.exp
scm-section-script.c
scm-section-script.exp
scm-section-script.scm
scm-symbol.c
scm-symbol.exp
scm-symtab-2.c
scm-symtab.c
scm-symtab.exp
scm-type.c
scm-type.exp
scm-value-cc.cc
scm-value-cc.exp
scm-value.c
scm-value.exp
source2.scm
types-module.cc
types-module.exp