text += name;
}
- uiout->field_string ("what", text.c_str ());
+ uiout->field_string ("what", text);
}
else
uiout->field_string ("what",
if (!cp->exception_rx.empty ())
{
uiout->text (_("\tmatching: "));
- uiout->field_string ("regexp", cp->exception_rx.c_str ());
+ uiout->field_string ("regexp", cp->exception_rx);
uiout->text ("\n");
}
}
versions of code to print the value out. */
if (uiout->is_mi_like_p ())
- uiout->field_string ("value", val.c_str ());
+ uiout->field_string ("value", val);
else
{
if (c->show_value_func != NULL)
the future. */
m_uiout->text (" <");
if (!omit_fname)
- m_uiout->field_string ("func-name", name.c_str (),
+ m_uiout->field_string ("func-name", name,
function_name_style.style ());
/* For negative offsets, avoid displaying them as +-N; the sign of
the offset takes the place of the "+" here. */
{
std::string type_name = type_to_string (rv->type);
uiout->text ("Value returned has type: ");
- uiout->field_string ("return-type", type_name.c_str ());
+ uiout->field_string ("return-type", type_name);
uiout->text (".");
uiout->text (" Cannot determine contents\n");
}
uiout->field_string ("target-id", inferior_pid_to_str (inf->pid));
std::string conn = uiout_field_connection (inf->process_target ());
- uiout->field_string ("connection-id", conn.c_str ());
+ uiout->field_string ("connection-id", conn);
if (inf->pspace->exec_filename != nullptr)
uiout->field_string ("exec", inf->pspace->exec_filename.get ());
i++;
}
- uiout->field_string ("pids", pids.c_str ());
+ uiout->field_string ("pids", pids);
uiout->text ("\n");
}
{
std::string exp = varobj_get_expression (var);
- uiout->field_string ("exp", exp.c_str ());
+ uiout->field_string ("exp", exp);
}
uiout->field_signed ("numchild", varobj_get_num_children (var));
{
std::string val = varobj_get_value (var);
- uiout->field_string ("value", val.c_str ());
+ uiout->field_string ("value", val);
}
std::string type = varobj_get_type (var);
if (!type.empty ())
- uiout->field_string ("type", type.c_str ());
+ uiout->field_string ("type", type);
thread_id = varobj_get_thread_id (var);
if (thread_id > 0)
/* Report the value in the new format. */
std::string val = varobj_get_value (var);
- uiout->field_string ("value", val.c_str ());
+ uiout->field_string ("value", val);
}
void
var = varobj_get_handle (argv[0]);
std::string type_name = varobj_get_type (var);
- uiout->field_string ("type", type_name.c_str ());
+ uiout->field_string ("type", type_name);
}
void
uiout->field_string ("lang", lang->natural_name ());
std::string exp = varobj_get_expression (var);
- uiout->field_string ("exp", exp.c_str ());
+ uiout->field_string ("exp", exp);
}
void
{
std::string val = varobj_get_formatted_value (var, format);
- uiout->field_string ("value", val.c_str ());
+ uiout->field_string ("value", val);
}
else
{
std::string val = varobj_get_value (var);
- uiout->field_string ("value", val.c_str ());
+ uiout->field_string ("value", val);
}
}
"expression to variable object"));
std::string val = varobj_get_value (var);
- uiout->field_string ("value", val.c_str ());
+ uiout->field_string ("value", val);
}
/* Helper for mi_cmd_var_update - update each VAR. */
{
std::string val = varobj_get_value (r.varobj);
- uiout->field_string ("value", val.c_str ());
+ uiout->field_string ("value", val);
}
uiout->field_string ("in_scope", "true");
break;
{
std::string type_name = varobj_get_type (r.varobj);
- uiout->field_string ("new_type", type_name.c_str ());
+ uiout->field_string ("new_type", type_name);
}
if (r.type_changed || r.children_changed)
ui_out_emit_tuple tuple_emitter (uiout, NULL);
- uiout->field_string ("id", pid->c_str ());
+ uiout->field_string ("id", *pid);
uiout->field_string ("type", "process");
if (cmd)
- uiout->field_string ("description", cmd->c_str ());
+ uiout->field_string ("description", *cmd);
if (user)
- uiout->field_string ("user", user->c_str ());
+ uiout->field_string ("user", *user);
if (cores)
output_cores (uiout, "cores", cores->c_str ());
const std::string *tid = get_osdata_column (child, "tid");
const std::string *tcore = get_osdata_column (child, "core");
- uiout->field_string ("id", tid->c_str ());
+ uiout->field_string ("id", *tid);
if (tcore)
- uiout->field_string ("core", tcore->c_str ());
+ uiout->field_string ("core", *tcore);
}
}
}
std::string data = bin2hex (read_result.data.get (),
(read_result.end - read_result.begin)
* unit_size);
- uiout->field_string ("contents", data.c_str ());
+ uiout->field_string ("contents", data);
}
}
if (target_read_memory (r.start, data.data (), r.length) == 0)
{
std::string data_str = bin2hex (data.data (), r.length);
- uiout->field_string ("contents", data_str.c_str ());
+ uiout->field_string ("contents", data_str);
}
else
uiout->field_skip ("contents");
continue;
snprintf (col_name, 32, "col%d", ix_cols);
- uiout->field_string (col_name,
- item.columns[ix_cols].value.c_str ());
+ uiout->field_string (col_name, item.columns[ix_cols].value);
}
}
ui_out_emit_tuple tuple_emitter (current_uiout, "probe");
current_uiout->field_string ("type", probe_type);
- current_uiout->field_string ("provider",
- probe.prob->get_provider ().c_str ());
- current_uiout->field_string ("name", probe.prob->get_name ().c_str ());
+ current_uiout->field_string ("provider", probe.prob->get_provider ());
+ current_uiout->field_string ("name", probe.prob->get_name ());
current_uiout->field_core_addr ("addr", probe.prob->get_gdbarch (),
probe.prob->get_relocated_address
(probe.objfile));
uiout->field_signed ("number", t->connection_number);
- uiout->field_string ("what", make_target_connection_string (t).c_str ());
+ uiout->field_string ("what", make_target_connection_string (t));
uiout->field_string ("description", t->longname ());
}
else
{
- uiout->field_string ("target-id",
- thread_target_id_str (tp).c_str ());
+ uiout->field_string ("target-id", thread_target_id_str (tp));
}
if (tp->state == THREAD_RUNNING)
identifier! */
uiout->field_signed ("count", count);
- uiout->field_string ("marker-id", marker.str_id.c_str ());
+ uiout->field_string ("marker-id", marker.str_id);
uiout->field_fmt ("enabled", "%c",
!tracepoints.empty () ? 'y' : 'n');
uiout->text ("\n");
uiout->text (extra_field_indent);
uiout->text (_("Data: \""));
- uiout->field_string ("extra-data", marker.extra.c_str ());
+ uiout->field_string ("extra-data", marker.extra);
uiout->text ("\"\n");
if (!tracepoints.empty ())
}
void
-ui_out::field_string (const char *fldname, const std::string &string)
+ui_out::field_string (const char *fldname, const std::string &string,
+ const ui_file_style &style)
{
- field_string (fldname, string.c_str ());
+ field_string (fldname, string.c_str (), style);
}
/* VARARGS */
CORE_ADDR address);
void field_string (const char *fldname, const char *string,
const ui_file_style &style = ui_file_style ());
- void field_string (const char *fldname, const std::string &string);
+ void field_string (const char *fldname, const std::string &string,
+ const ui_file_style &style = ui_file_style ());
void field_stream (const char *fldname, string_file &stream,
const ui_file_style &style = ui_file_style ());
void field_skip (const char *fldname);