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
/// Inform the statusline that the terminal dimensions have changed.
36
void
TerminalSizeChanged
();
37
38
private
:
39
/// Draw the statusline with the given text.
40
void
Draw
(std::string msg);
41
42
enum
ScrollWindowMode
{
43
EnableStatusline
,
44
DisableStatusline
,
45
ResizeStatusline
,
46
};
47
48
/// Set the scroll window for the given mode.
49
void
UpdateScrollWindow
(
ScrollWindowMode
mode);
50
51
Debugger
&
m_debugger
;
52
53
/// Cached copy of the execution context that allows us to redraw the
54
/// statusline.
55
ExecutionContextRef
m_exe_ctx_ref
;
56
57
uint64_t
m_terminal_width
= 0;
58
uint64_t
m_terminal_height
= 0;
59
};
60
}
// namespace lldb_private
61
#endif
// LLDB_CORE_STATUSLINE_H
ExecutionContext.h
SymbolContext.h
lldb_private::Debugger
A class to manage flag bits.
Definition
Debugger.h:80
lldb_private::ExecutionContextRef
Execution context objects refer to objects in the execution of the program that is being debugged.
Definition
ExecutionContext.h:73
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:51
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::m_terminal_height
uint64_t m_terminal_height
Definition
Statusline.h:58
lldb_private::Statusline::m_terminal_width
uint64_t m_terminal_width
Definition
Statusline.h:57
lldb_private::Statusline::Redraw
void Redraw(std::optional< ExecutionContextRef > exe_ctx_ref)
Redraw the statusline.
Definition
Statusline.cpp:126
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:55
lldb_private::Statusline::ScrollWindowMode
ScrollWindowMode
Definition
Statusline.h:42
lldb_private::Statusline::DisableStatusline
@ DisableStatusline
Definition
Statusline.h:44
lldb_private::Statusline::ResizeStatusline
@ ResizeStatusline
Definition
Statusline.h:45
lldb_private::Statusline::EnableStatusline
@ EnableStatusline
Definition
Statusline.h:43
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