+2016-09-23 Tom Tromey <tom@tromey.com>
+
+ * break-catch-sig.c: Include <string>.
+ (signal_catchpoint_print_one): Use std::string.
+
2016-09-23 Tom Tromey <tom@tromey.com>
* utils.c (struct restore_ui_out_closure): Remove.
#include "valprint.h"
#include "cli/cli-utils.h"
#include "completer.h"
-#include "gdb_obstack.h"
+
+#include <string>
#define INTERNAL_SIGNAL(x) ((x) == GDB_SIGNAL_TRAP || (x) == GDB_SIGNAL_INT)
{
int i;
gdb_signal_type iter;
- struct obstack text;
- struct cleanup *cleanup;
-
- obstack_init (&text);
- cleanup = make_cleanup_obstack_free (&text);
+ std::string text;
for (i = 0;
VEC_iterate (gdb_signal_type, c->signals_to_be_caught, i, iter);
const char *name = signal_to_name_or_int (iter);
if (i > 0)
- obstack_grow (&text, " ", 1);
- obstack_grow (&text, name, strlen (name));
+ text += " ";
+ text += name;
}
- obstack_grow (&text, "", 1);
- ui_out_field_string (uiout, "what", (const char *) obstack_base (&text));
- do_cleanups (cleanup);
+ ui_out_field_string (uiout, "what", text.c_str ());
}
else
ui_out_field_string (uiout, "what",