/* General utility routines for GDB/Scheme code.
- Copyright (C) 2014-2018 Free Software Foundation, Inc.
+ Copyright (C) 2014-2019 Free Software Foundation, Inc.
This file is part of GDB.
gdbscm_printf (SCM port, const char *format, ...)
{
va_list args;
- char *string;
va_start (args, format);
- string = xstrvprintf (format, args);
+ std::string string = string_vprintf (format, args);
va_end (args);
- scm_puts (string, port);
- xfree (string);
+ scm_puts (string.c_str (), port);
}
/* Utility for calling from gdb to "display" an SCM object. */