@@ -777,14 +777,16 @@ class CommandObjectSourceList : public CommandObjectParsed {
777777 if (sc.function ) {
778778 Target &target = GetTarget ();
779779
780- FileSpec start_file;
780+ SupportFileSP start_file = std::make_shared<SupportFile>() ;
781781 uint32_t start_line;
782782 uint32_t end_line;
783783 FileSpec end_file;
784784
785785 if (sc.block == nullptr ) {
786786 // Not an inlined function
787- sc.function ->GetStartLineSourceInfo (start_file, start_line);
787+ FileSpec function_file_spec;
788+ sc.function ->GetStartLineSourceInfo (function_file_spec, start_line);
789+ start_file = std::make_shared<SupportFile>(function_file_spec);
788790 if (start_line == 0 ) {
789791 result.AppendErrorWithFormat (" Could not find line information for "
790792 " start of function: \" %s\" .\n " ,
@@ -794,7 +796,7 @@ class CommandObjectSourceList : public CommandObjectParsed {
794796 sc.function ->GetEndLineSourceInfo (end_file, end_line);
795797 } else {
796798 // We have an inlined function
797- start_file = source_info.line_entry .GetFile () ;
799+ start_file = source_info.line_entry .file_sp ;
798800 start_line = source_info.line_entry .line ;
799801 end_line = start_line + m_options.num_lines ;
800802 }
@@ -825,14 +827,15 @@ class CommandObjectSourceList : public CommandObjectParsed {
825827
826828 if (m_options.show_bp_locs ) {
827829 const bool show_inlines = true ;
828- m_breakpoint_locations.Reset (start_file, 0 , show_inlines);
830+ m_breakpoint_locations.Reset (start_file->GetSpecOnly (), 0 ,
831+ show_inlines);
829832 SearchFilterForUnconstrainedSearches target_search_filter (
830833 m_exe_ctx.GetTargetSP ());
831834 target_search_filter.Search (m_breakpoint_locations);
832835 }
833836
834- result.AppendMessageWithFormat (" File: %s \n " ,
835- start_file.GetPath ().c_str ());
837+ result.AppendMessageWithFormat (
838+ " File: %s \n " , start_file-> GetSpecOnly () .GetPath ().c_str ());
836839 // We don't care about the column here.
837840 const uint32_t column = 0 ;
838841 return target.GetSourceManager ().DisplaySourceLinesWithLineNumbers (
@@ -1050,8 +1053,9 @@ class CommandObjectSourceList : public CommandObjectParsed {
10501053 ? sc.line_entry .column
10511054 : 0 ;
10521055 target.GetSourceManager ().DisplaySourceLinesWithLineNumbers (
1053- sc.comp_unit ->GetPrimaryFile (), sc.line_entry .line , column,
1054- lines_to_back_up, m_options.num_lines - lines_to_back_up, " ->" ,
1056+ std::make_shared<SupportFile>(sc.comp_unit ->GetPrimaryFile ()),
1057+ sc.line_entry .line , column, lines_to_back_up,
1058+ m_options.num_lines - lines_to_back_up, " ->" ,
10551059 &result.GetOutputStream (), GetBreakpointLocations ());
10561060 result.SetStatus (eReturnStatusSuccessFinishResult);
10571061 }
@@ -1170,9 +1174,9 @@ class CommandObjectSourceList : public CommandObjectParsed {
11701174 m_options.num_lines = 10 ;
11711175 const uint32_t column = 0 ;
11721176 target.GetSourceManager ().DisplaySourceLinesWithLineNumbers (
1173- sc.comp_unit ->GetPrimaryFile (), m_options. start_line , column, 0 ,
1174- m_options.num_lines , " " , &result. GetOutputStream () ,
1175- GetBreakpointLocations ());
1177+ std::make_shared<SupportFile>( sc.comp_unit ->GetPrimaryFile ()) ,
1178+ m_options.start_line , column, 0 , m_options. num_lines , " " ,
1179+ &result. GetOutputStream (), GetBreakpointLocations ());
11761180
11771181 result.SetStatus (eReturnStatusSuccessFinishResult);
11781182 } else {
0 commit comments