mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2024-12-03 19:32:35 +00:00
[lldb] Migrate runtime instrumentation plugins to ReportWarning
This commit is contained in:
parent
cc38a4a665
commit
cae735f72b
@ -136,9 +136,11 @@ StructuredData::ObjectSP InstrumentationRuntimeASan::RetrieveReportData() {
|
||||
exe_ctx, options, address_sanitizer_retrieve_report_data_command, "",
|
||||
return_value_sp, eval_error);
|
||||
if (result != eExpressionCompleted) {
|
||||
process_sp->GetTarget().GetDebugger().GetAsyncOutputStream()->Printf(
|
||||
"Warning: Cannot evaluate AddressSanitizer expression:\n%s\n",
|
||||
eval_error.AsCString());
|
||||
StreamString ss;
|
||||
ss << "cannot evaluate AddressSanitizer expression:\n";
|
||||
ss << eval_error.AsCString();
|
||||
Debugger::ReportWarning(ss.GetString().str(),
|
||||
process_sp->GetTarget().GetDebugger().GetID());
|
||||
return StructuredData::ObjectSP();
|
||||
}
|
||||
|
||||
|
@ -327,9 +327,11 @@ StructuredData::ObjectSP InstrumentationRuntimeTSan::RetrieveReportData(
|
||||
exe_ctx, options, thread_sanitizer_retrieve_report_data_command, "",
|
||||
main_value, eval_error);
|
||||
if (result != eExpressionCompleted) {
|
||||
process_sp->GetTarget().GetDebugger().GetAsyncOutputStream()->Printf(
|
||||
"Warning: Cannot evaluate ThreadSanitizer expression:\n%s\n",
|
||||
eval_error.AsCString());
|
||||
StreamString ss;
|
||||
ss << "cannot evaluate ThreadSanitizer expression:\n";
|
||||
ss << eval_error.AsCString();
|
||||
Debugger::ReportWarning(ss.GetString().str(),
|
||||
process_sp->GetTarget().GetDebugger().GetID());
|
||||
return StructuredData::ObjectSP();
|
||||
}
|
||||
|
||||
|
@ -136,9 +136,11 @@ StructuredData::ObjectSP InstrumentationRuntimeUBSan::RetrieveReportData(
|
||||
exe_ctx, options, ub_sanitizer_retrieve_report_data_command, "",
|
||||
main_value, eval_error);
|
||||
if (result != eExpressionCompleted) {
|
||||
target.GetDebugger().GetAsyncOutputStream()->Printf(
|
||||
"Warning: Cannot evaluate UndefinedBehaviorSanitizer expression:\n%s\n",
|
||||
eval_error.AsCString());
|
||||
StreamString ss;
|
||||
ss << "cannot evaluate UndefinedBehaviorSanitizer expression:\n";
|
||||
ss << eval_error.AsCString();
|
||||
Debugger::ReportWarning(ss.GetString().str(),
|
||||
process_sp->GetTarget().GetDebugger().GetID());
|
||||
return StructuredData::ObjectSP();
|
||||
}
|
||||
|
||||
|
@ -72,7 +72,7 @@ const char *memory_history_asan_command_prefix = R"(
|
||||
void *alloc_trace[256];
|
||||
size_t alloc_count;
|
||||
int alloc_tid;
|
||||
|
||||
|
||||
void *free_trace[256];
|
||||
size_t free_count;
|
||||
int free_tid;
|
||||
@ -179,9 +179,11 @@ HistoryThreads MemoryHistoryASan::GetHistoryThreads(lldb::addr_t address) {
|
||||
ExpressionResults expr_result = UserExpression::Evaluate(
|
||||
exe_ctx, options, expr.GetString(), "", return_value_sp, eval_error);
|
||||
if (expr_result != eExpressionCompleted) {
|
||||
process_sp->GetTarget().GetDebugger().GetAsyncOutputStream()->Printf(
|
||||
"Warning: Cannot evaluate AddressSanitizer expression:\n%s\n",
|
||||
eval_error.AsCString());
|
||||
StreamString ss;
|
||||
ss << "cannot evaluate AddressSanitizer expression:\n";
|
||||
ss << eval_error.AsCString();
|
||||
Debugger::ReportWarning(ss.GetString().str(),
|
||||
process_sp->GetTarget().GetDebugger().GetID());
|
||||
return result;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user