19#include "llvm/ADT/StringRef.h"
20#include "llvm/Support/Locale.h"
23#define ANSI_NORMAL ESCAPE "[0m"
24#define ANSI_SAVE_CURSOR ESCAPE "7"
25#define ANSI_RESTORE_CURSOR ESCAPE "8"
26#define ANSI_CLEAR_BELOW ESCAPE "[J"
27#define ANSI_CLEAR_SCREEN ESCAPE "[2J"
28#define ANSI_SET_SCROLL_ROWS ESCAPE "[1;%ur"
29#define ANSI_TO_START_OF_ROW ESCAPE "[%u;1f"
30#define ANSI_REVERSE_VIDEO ESCAPE "[7m"
31#define ANSI_UP_ROWS ESCAPE "[%dA"
100 locked_stream <<
'\n';
137 llvm::Expected<StoppedExecutionContext> stopped_exe_ctx =
139 if (stopped_exe_ctx) {
142 if (
auto frame_sp = stopped_exe_ctx->GetFrameSP())
143 sym_ctx = frame_sp->GetSymbolContext(eSymbolContextEverything);
146 llvm::consumeError(stopped_exe_ctx.takeError());
#define ANSI_SET_SCROLL_ROWS
#define ANSI_TO_START_OF_ROW
#define ANSI_CLEAR_SCREEN
#define ANSI_RESTORE_CURSOR
#define ANSI_REVERSE_VIDEO
A class to manage flag bits.
"lldb/Target/ExecutionContext.h" A class that contains an execution context.
void UpdateScrollWindow(ScrollWindowMode mode)
Set the scroll window for the given mode.
void TerminalSizeChanged()
Inform the statusline that the terminal dimensions have changed.
void Enable(std::optional< ExecutionContextRef > exe_ctx_ref)
Reduce the scroll window and draw the statusline.
Statusline(Debugger &debugger)
uint64_t m_terminal_height
uint64_t m_terminal_width
void Redraw(std::optional< ExecutionContextRef > exe_ctx_ref)
Redraw the statusline.
void Disable()
Hide the statusline and extend the scroll window.
ExecutionContextRef m_exe_ctx_ref
Cached copy of the execution context that allows us to redraw the statusline.
void Draw(std::string msg)
Draw the statusline with the given text.
llvm::StringRef GetString() const
size_t Printf(const char *format,...) __attribute__((format(printf
Output printf formatted output to the stream.
Defines a symbol context baton that can be handed other debug core functions.
std::string TrimAndPad(llvm::StringRef str, size_t visible_length, char padding=' ')
A class that represents a running process on the host machine.
llvm::Expected< StoppedExecutionContext > GetStoppedExecutionContext(const ExecutionContextRef *exe_ctx_ref_ptr)
std::shared_ptr< lldb_private::LockableStreamFile > LockableStreamFileSP