X-Git-Url: https://git.libre-soc.org/?a=blobdiff_plain;f=gdb%2Fvalprint.c;h=ca0c4768c9eb78c456e00b6f44ffb84d0eca20be;hb=3b4b2f160d288b85a1379d24fd0f4de19062f3fd;hp=ead4131967445a1c817e0139c828268171e0de60;hpb=1841ee5d0300cf00022c8aadfe16725c5e86fe1d;p=binutils-gdb.git diff --git a/gdb/valprint.c b/gdb/valprint.c index ead41319674..ca0c4768c9e 100644 --- a/gdb/valprint.c +++ b/gdb/valprint.c @@ -1472,12 +1472,10 @@ print_decimal_floating (const gdb_byte *valaddr, struct type *type, struct ui_file *stream) { enum bfd_endian byte_order = gdbarch_byte_order (get_type_arch (type)); - char decstr[MAX_DECIMAL_STRING]; unsigned len = TYPE_LENGTH (type); - decimal_to_string (valaddr, len, byte_order, decstr); - fputs_filtered (decstr, stream); - return; + std::string str = decimal_to_string (valaddr, len, byte_order); + fputs_filtered (str.c_str (), stream); } void