diff options
author | Pedro Alves <pedro@palves.net> | 2023-02-10 11:55:00 +0000 |
---|---|---|
committer | Pedro Alves <pedro@palves.net> | 2023-02-15 20:56:57 +0000 |
commit | 751495be92b2b319fb66ce4e12b562a0e27c15fe (patch) | |
tree | 8843cf39c64185b58304136748ef7dee1c614f19 /gdb/testsuite | |
parent | a975d4e6bcf84d3676cbc47b1c9456cf4c3a32a6 (diff) | |
download | gdb-751495be92b2b319fb66ce4e12b562a0e27c15fe.zip gdb-751495be92b2b319fb66ce4e12b562a0e27c15fe.tar.gz gdb-751495be92b2b319fb66ce4e12b562a0e27c15fe.tar.bz2 |
Make "ptype INTERNAL_FUNCTION" in Ada print like other languages
Currently, printing the type of an internal function in Ada shows
double <>s, like:
(gdb) with language ada -- ptype $_isvoid
type = <<internal function>>
while all other languages print it with a single <>, like:
(gdb) with language c -- ptype $_isvoid
type = <internal function>
I don't think there's a reason that Ada needs to be different. We
currently print the double <>s because we take this path in
ada_print_type:
switch (type->code ())
{
default:
gdb_printf (stream, "<");
c_print_type (type, "", stream, show, level, language_ada, flags);
gdb_printf (stream, ">");
break;
... and the type's name already has the <>s.
Fix this by simply adding an early check for
TYPE_CODE_INTERNAL_FUNCTION.
Approved-By: Andrew Burgess <aburgess@redhat.com>
Approved-By: Tom Tromey <tom@tromey.com>
Change-Id: Ic2b6527b9240a367471431023f6e27e6daed5501
Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=30105
Diffstat (limited to 'gdb/testsuite')
-rw-r--r-- | gdb/testsuite/gdb.base/internal-functions-ptype.exp | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/gdb/testsuite/gdb.base/internal-functions-ptype.exp b/gdb/testsuite/gdb.base/internal-functions-ptype.exp index 42caae0..748f33a 100644 --- a/gdb/testsuite/gdb.base/internal-functions-ptype.exp +++ b/gdb/testsuite/gdb.base/internal-functions-ptype.exp @@ -29,8 +29,6 @@ proc test_ptype_internal_function {} { if {$lang == "unknown"} { gdb_test "ptype \$_isvoid" \ "expression parsing not implemented for language \"Unknown\"" - } elseif {$lang == "ada"} { - gdb_test "ptype \$_isvoid" "<<internal function>>" } else { gdb_test "ptype \$_isvoid" "<internal function>" } |