@@ -210,19 +210,14 @@ InstrumentationRuntimeMainThreadChecker::RetrieveReportData(
210
210
StackFrameSP responsible_frame;
211
211
for (unsigned I = 0 ; I < thread_sp->GetStackFrameCount (); ++I) {
212
212
StackFrameSP frame = thread_sp->GetStackFrameAtIndex (I);
213
- Address addr = frame->GetFrameCodeAddress ();
213
+ Address addr = frame->GetFrameCodeAddressForSymbolication ();
214
214
if (addr.GetModule () == runtime_module_sp) // Skip PCs from the runtime.
215
215
continue ;
216
216
217
217
// The first non-runtime frame is responsible for the bug.
218
218
if (!responsible_frame)
219
219
responsible_frame = frame;
220
220
221
- // First frame in stacktrace should point to a real PC, not return address.
222
- if (I != 0 && trace->GetSize () == 0 ) {
223
- addr.Slide (-1 );
224
- }
225
-
226
221
lldb::addr_t PC = addr.GetLoadAddress (&target);
227
222
trace->AddItem (StructuredData::ObjectSP (new StructuredData::Integer (PC)));
228
223
}
@@ -365,8 +360,11 @@ InstrumentationRuntimeMainThreadChecker::GetBacktracesFromExtendedStopInfo(
365
360
info->GetObjectForDotSeparatedPath (" tid" );
366
361
tid_t tid = thread_id_obj ? thread_id_obj->GetIntegerValue () : 0 ;
367
362
368
- HistoryThread *history_thread = new HistoryThread (*process_sp, tid, PCs);
369
- ThreadSP new_thread_sp (history_thread);
363
+ // We gather symbolication addresses above, so no need for HistoryThread to
364
+ // try to infer the call addresses.
365
+ bool pcs_are_call_addresses = true ;
366
+ ThreadSP new_thread_sp = std::make_shared<HistoryThread>(
367
+ *process_sp, tid, PCs, pcs_are_call_addresses);
370
368
371
369
// Save this in the Process' ExtendedThreadList so a strong pointer retains
372
370
// the object
0 commit comments