blob: 3d69aa25a934287e527a7ec3d5fcc5a49921af36 [file] [log] [blame]
Andrew Walbran3d2c1972020-04-07 12:24:26 +01001//===-- SBSourceManager.h ---------------------------------------*- C++ -*-===//
2//
3// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4// See https://llvm.org/LICENSE.txt for license information.
5// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6//
7//===----------------------------------------------------------------------===//
8
9#ifndef LLDB_SBSourceManager_h_
10#define LLDB_SBSourceManager_h_
11
12#include "lldb/API/SBDefines.h"
13
14#include <stdio.h>
15
16namespace lldb {
17
18class LLDB_API SBSourceManager {
19public:
20 SBSourceManager(const SBDebugger &debugger);
21 SBSourceManager(const SBTarget &target);
22 SBSourceManager(const SBSourceManager &rhs);
23
24 ~SBSourceManager();
25
26 const lldb::SBSourceManager &operator=(const lldb::SBSourceManager &rhs);
27
28 size_t DisplaySourceLinesWithLineNumbers(
29 const lldb::SBFileSpec &file, uint32_t line, uint32_t context_before,
30 uint32_t context_after, const char *current_line_cstr, lldb::SBStream &s);
31
32 size_t DisplaySourceLinesWithLineNumbersAndColumn(
33 const lldb::SBFileSpec &file, uint32_t line, uint32_t column,
34 uint32_t context_before, uint32_t context_after,
35 const char *current_line_cstr, lldb::SBStream &s);
36
37protected:
38 friend class SBCommandInterpreter;
39 friend class SBDebugger;
40
41private:
42 std::unique_ptr<lldb_private::SourceManagerImpl> m_opaque_up;
43};
44
45} // namespace lldb
46
47#endif // LLDB_SBSourceManager_h_