/* Language independent support for printing types for GDB, the GNU debugger.
- Copyright (C) 1986-2018 Free Software Foundation, Inc.
+ Copyright (C) 1986-2019 Free Software Foundation, Inc.
This file is part of GDB.
{
/* Since union fields don't have the concept of offsets, we just
print their sizes. */
- fprintf_filtered (stream, "/* %4u */", TYPE_LENGTH (ftype));
+ fprintf_filtered (stream, "/* %4s */",
+ pulongest (TYPE_LENGTH (ftype)));
return;
}
fputs_filtered ("\n", stream);
print_spaces_filtered (level + 4 + print_offset_data::indentation, stream);
- fprintf_filtered (stream, "/* total size (bytes): %4u */\n",
- TYPE_LENGTH (type));
+ fprintf_filtered (stream, "/* total size (bytes): %4s */\n",
+ pulongest (TYPE_LENGTH (type)));
}
\f
std::string
type_to_string (struct type *type)
{
- TRY
+ try
{
string_file stb;
type_print (type, "", &stb, -1);
return std::move (stb.string ());
}
- CATCH (except, RETURN_MASK_ALL)
+ catch (const gdb_exception &except)
{
}
- END_CATCH
return {};
}
default:
error (_("Invalid type code in symbol table."));
}
- gdb_flush (stream);
}
/* Dump details of a type specified either directly or indirectly.