X-Git-Url: http://git.efficios.com/?a=blobdiff_plain;f=gdb%2Finfrun.c;h=07aebfa678f48ede1ba8a59dd75291762a46d44c;hb=6a831f06e1bdf3aff6acf7ae31e2a3a9795137a5;hp=be29cbe4f51ff97a4d10ee6ff0cf23fbdbe230d6;hpb=2a3c1174c3c0db1140180fb3fc56ac324d1c0a7c;p=deliverable%2Fbinutils-gdb.git diff --git a/gdb/infrun.c b/gdb/infrun.c index be29cbe4f5..07aebfa678 100644 --- a/gdb/infrun.c +++ b/gdb/infrun.c @@ -7656,24 +7656,19 @@ print_exited_reason (struct ui_out *uiout, int exitstatus) { if (uiout->is_mi_like_p ()) uiout->field_string ("reason", async_reason_lookup (EXEC_ASYNC_EXITED)); - uiout->text ("[Inferior "); - uiout->text (plongest (inf->num)); - uiout->text (" ("); - uiout->text (pidstr.c_str ()); - uiout->text (") exited with code "); - uiout->field_fmt ("exit-code", "0%o", (unsigned int) exitstatus); - uiout->text ("]\n"); + std::string exit_code_str + = string_printf ("0%o", (unsigned int) exitstatus); + uiout->message ("[Inferior %s (%s) exited with code %pF]\n", + plongest (inf->num), pidstr.c_str (), + string_field ("exit-code", exit_code_str.c_str ())); } else { if (uiout->is_mi_like_p ()) uiout->field_string ("reason", async_reason_lookup (EXEC_ASYNC_EXITED_NORMALLY)); - uiout->text ("[Inferior "); - uiout->text (plongest (inf->num)); - uiout->text (" ("); - uiout->text (pidstr.c_str ()); - uiout->text (") exited normally]\n"); + uiout->message ("[Inferior %s (%s) exited normally]\n", + plongest (inf->num), pidstr.c_str ()); } }