@@ -558,16 +558,18 @@ may even involve JITing and running code in the target program.)");
558
558
}
559
559
}
560
560
} else if (num_matches == 0 ) {
561
- result.AppendErrorWithFormat (
562
- " no variables matched the regular expression '%s'." ,
563
- entry.c_str ());
561
+ result.GetErrorStream (). Printf ( " error: no variables matched "
562
+ " the regular expression '%s'.\n " ,
563
+ entry.c_str ());
564
564
}
565
565
} else {
566
566
if (llvm::Error err = regex.GetError ())
567
- result.AppendError (llvm::toString (std::move (err)));
567
+ result.GetErrorStream ().Printf (
568
+ " error: %s\n " , llvm::toString (std::move (err)).c_str ());
568
569
else
569
- result.AppendErrorWithFormat (
570
- " unknown regex error when compiling '%s'" , entry.c_str ());
570
+ result.GetErrorStream ().Printf (
571
+ " error: unknown regex error when compiling '%s'\n " ,
572
+ entry.c_str ());
571
573
}
572
574
} else // No regex, either exact variable names or variable
573
575
// expressions.
@@ -603,13 +605,14 @@ may even involve JITing and running code in the target program.)");
603
605
valobj_sp->GetParent () ? entry.c_str () : nullptr );
604
606
valobj_sp->Dump (output_stream, options);
605
607
} else {
606
- if (auto error_cstr = error.AsCString (nullptr ))
607
- result.AppendError (error_cstr);
608
+ const char *error_cstr = error.AsCString (nullptr );
609
+ if (error_cstr)
610
+ result.GetErrorStream ().Printf (" error: %s\n " , error_cstr);
608
611
else
609
- result.AppendErrorWithFormat (
610
- " unable to find any variable expression path that matches "
611
- " '%s'." ,
612
- entry.c_str ());
612
+ result.GetErrorStream (). Printf ( " error: unable to find any "
613
+ " variable expression path that "
614
+ " matches '%s'.\n " ,
615
+ entry.c_str ());
613
616
}
614
617
}
615
618
}
@@ -677,8 +680,7 @@ may even involve JITing and running code in the target program.)");
677
680
}
678
681
}
679
682
}
680
- if (result.GetStatus () != eReturnStatusFailed)
681
- result.SetStatus (eReturnStatusSuccessFinishResult);
683
+ result.SetStatus (eReturnStatusSuccessFinishResult);
682
684
}
683
685
684
686
if (m_option_variable.show_recognized_args ) {
0 commit comments