@@ -1503,10 +1503,10 @@ PlatformDarwin::ParseVersionBuildDir(llvm::StringRef dir) {
15031503}
15041504
15051505llvm::Expected<StructuredData::DictionarySP>
1506- PlatformDarwin::FetchExtendedCrashInformation (lldb_private::Target &target ) {
1506+ PlatformDarwin::FetchExtendedCrashInformation (Process &process ) {
15071507 Log *log (lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_PROCESS));
15081508
1509- StructuredData::ArraySP annotations = ExtractCrashInfoAnnotations (target );
1509+ StructuredData::ArraySP annotations = ExtractCrashInfoAnnotations (process );
15101510
15111511 if (!annotations || !annotations->GetSize ()) {
15121512 LLDB_LOG (log, " Couldn't extract crash information annotations" );
@@ -1522,11 +1522,11 @@ PlatformDarwin::FetchExtendedCrashInformation(lldb_private::Target &target) {
15221522}
15231523
15241524StructuredData::ArraySP
1525- PlatformDarwin::ExtractCrashInfoAnnotations (Target &target ) {
1525+ PlatformDarwin::ExtractCrashInfoAnnotations (Process &process ) {
15261526 Log *log (lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_PROCESS));
15271527
15281528 ConstString section_name (" __crash_info" );
1529- ProcessSP process_sp = target. GetProcessSP ();
1529+ Target &target = process. GetTarget ();
15301530 StructuredData::ArraySP array_sp = std::make_shared<StructuredData::Array>();
15311531
15321532 for (ModuleSP module : target.GetImages ().Modules ()) {
@@ -1562,8 +1562,8 @@ PlatformDarwin::ExtractCrashInfoAnnotations(Target &target) {
15621562 Status error;
15631563 CrashInfoAnnotations annotations;
15641564 size_t expected_size = sizeof (CrashInfoAnnotations);
1565- size_t bytes_read = process_sp-> ReadMemoryFromInferior (
1566- load_addr, &annotations, expected_size, error);
1565+ size_t bytes_read = process. ReadMemoryFromInferior (load_addr, &annotations,
1566+ expected_size, error);
15671567
15681568 if (expected_size != bytes_read || error.Fail ()) {
15691569 LLDB_LOG (log, " Failed to read {0} section from memory in module {1}: {2}" ,
@@ -1587,7 +1587,7 @@ PlatformDarwin::ExtractCrashInfoAnnotations(Target &target) {
15871587
15881588 std::string message;
15891589 bytes_read =
1590- process_sp-> ReadCStringFromMemory (annotations.message , message, error);
1590+ process. ReadCStringFromMemory (annotations.message , message, error);
15911591
15921592 if (message.empty () || bytes_read != message.size () || error.Fail ()) {
15931593 LLDB_LOG (log, " Failed to read the message from memory in module {0}: {1}" ,
@@ -1603,8 +1603,8 @@ PlatformDarwin::ExtractCrashInfoAnnotations(Target &target) {
16031603 LLDB_LOG (log, " No message2 available for module {0}." , module_name);
16041604
16051605 std::string message2;
1606- bytes_read = process_sp-> ReadCStringFromMemory (annotations. message2 ,
1607- message2, error);
1606+ bytes_read =
1607+ process. ReadCStringFromMemory (annotations. message2 , message2, error);
16081608
16091609 if (!message2.empty () && bytes_read == message2.size () && error.Success ())
16101610 if (message2.back () == ' \n ' )
0 commit comments