LLDB
mainline
llvm-project
lldb
include
lldb
Core
Statusline.h
Go to the documentation of this file.
1
//===-- Statusline.h -----------------------------------------------------===//
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_CORE_STATUSLINE_H
10
#define LLDB_CORE_STATUSLINE_H
11
12
#include "
lldb/Symbol/SymbolContext.h
"
13
#include "
lldb/Target/ExecutionContext.h
"
14
#include "
lldb/lldb-forward.h
"
15
#include <cstdint>
16
#include <string>
17
18
namespace
lldb_private
{
19
class
Statusline
{
20
public
:
21
Statusline
(
Debugger
&debugger);
22
~Statusline
();
23
24
using
Context
= std::pair<ExecutionContextRef, SymbolContext>;
25
26
/// Reduce the scroll window and draw the statusline.
27
void
Enable
(std::optional<ExecutionContextRef> exe_ctx_ref);
28
29
/// Hide the statusline and extend the scroll window.
30
void
Disable
();
31
32
/// Redraw the statusline.
33
void
Redraw
(std::optional<ExecutionContextRef> exe_ctx_ref);
34
35
/// Clear the cached execution context to discard stale pointers.
36
void
ClearExecutionContext
();
37
38
/// Inform the statusline that the terminal dimensions have changed.
39
void
TerminalSizeChanged
();
40
41
private
:
42
/// Draw the statusline with the given text.
43
void
Draw
(std::string msg);
44
45
enum
ScrollWindowMode
{
46
EnableStatusline
,
47
DisableStatusline
,
48
ResizeStatusline
,
49
};
50
51
/// Set the scroll window for the given mode.
52
void
UpdateScrollWindow
(
ScrollWindowMode
mode);
53
54
Debugger
&
m_debugger
;
55
56
/// Cached copy of the execution context that allows us to redraw the
57
/// statusline.
58
ExecutionContextRef
m_exe_ctx_ref
;
59
60
uint64_t
m_terminal_width
= 0;
61
uint64_t
m_terminal_height
= 0;
62
};
63
}
// namespace lldb_private
64
#endif
// LLDB_CORE_STATUSLINE_H
ExecutionContext.h
SymbolContext.h
lldb_private::Debugger
A class to manage flag bits.
Definition
Debugger.h:100
lldb_private::ExecutionContextRef
Execution context objects refer to objects in the execution of the program that is being debugged.
Definition
ExecutionContext.h:76
lldb_private::Statusline::UpdateScrollWindow
void UpdateScrollWindow(ScrollWindowMode mode)
Set the scroll window for the given mode.
Definition
Statusline.cpp:87
lldb_private::Statusline::TerminalSizeChanged
void TerminalSizeChanged()
Inform the statusline that the terminal dimensions have changed.
Definition
Statusline.cpp:42
lldb_private::Statusline::m_debugger
Debugger & m_debugger
Definition
Statusline.h:54
lldb_private::Statusline::Enable
void Enable(std::optional< ExecutionContextRef > exe_ctx_ref)
Reduce the scroll window and draw the statusline.
Definition
Statusline.cpp:52
lldb_private::Statusline::Context
std::pair< ExecutionContextRef, SymbolContext > Context
Definition
Statusline.h:24
lldb_private::Statusline::Statusline
Statusline(Debugger &debugger)
Definition
Statusline.cpp:36
lldb_private::Statusline::ClearExecutionContext
void ClearExecutionContext()
Clear the cached execution context to discard stale pointers.
Definition
Statusline.cpp:128
lldb_private::Statusline::m_terminal_height
uint64_t m_terminal_height
Definition
Statusline.h:61
lldb_private::Statusline::m_terminal_width
uint64_t m_terminal_width
Definition
Statusline.h:60
lldb_private::Statusline::Redraw
void Redraw(std::optional< ExecutionContextRef > exe_ctx_ref)
Redraw the statusline.
Definition
Statusline.cpp:130
lldb_private::Statusline::~Statusline
~Statusline()
Definition
Statusline.cpp:40
lldb_private::Statusline::Disable
void Disable()
Hide the statusline and extend the scroll window.
Definition
Statusline.cpp:60
lldb_private::Statusline::m_exe_ctx_ref
ExecutionContextRef m_exe_ctx_ref
Cached copy of the execution context that allows us to redraw the statusline.
Definition
Statusline.h:58
lldb_private::Statusline::ScrollWindowMode
ScrollWindowMode
Definition
Statusline.h:45
lldb_private::Statusline::DisableStatusline
@ DisableStatusline
Definition
Statusline.h:47
lldb_private::Statusline::ResizeStatusline
@ ResizeStatusline
Definition
Statusline.h:48
lldb_private::Statusline::EnableStatusline
@ EnableStatusline
Definition
Statusline.h:46
lldb_private::Statusline::Draw
void Draw(std::string msg)
Draw the statusline with the given text.
Definition
Statusline.cpp:65
lldb-forward.h
lldb_private
A class that represents a running process on the host machine.
Definition
SBAddressRange.h:14
Generated on
for LLDB by
1.14.0