LLDB  mainline
Namespaces | Macros | Typedefs | Enumerations | Functions | Variables
Debugger.cpp File Reference
#include "lldb/Core/Debugger.h"
#include "lldb/Breakpoint/Breakpoint.h"
#include "lldb/Core/FormatEntity.h"
#include "lldb/Core/Mangled.h"
#include "lldb/Core/ModuleList.h"
#include "lldb/Core/PluginManager.h"
#include "lldb/Core/StreamAsynchronousIO.h"
#include "lldb/Core/StreamFile.h"
#include "lldb/DataFormatters/DataVisualization.h"
#include "lldb/Expression/REPL.h"
#include "lldb/Host/File.h"
#include "lldb/Host/FileSystem.h"
#include "lldb/Host/HostInfo.h"
#include "lldb/Host/Terminal.h"
#include "lldb/Host/ThreadLauncher.h"
#include "lldb/Interpreter/CommandInterpreter.h"
#include "lldb/Interpreter/OptionValue.h"
#include "lldb/Interpreter/OptionValueProperties.h"
#include "lldb/Interpreter/OptionValueSInt64.h"
#include "lldb/Interpreter/OptionValueString.h"
#include "lldb/Interpreter/Property.h"
#include "lldb/Interpreter/ScriptInterpreter.h"
#include "lldb/Symbol/Function.h"
#include "lldb/Symbol/Symbol.h"
#include "lldb/Symbol/SymbolContext.h"
#include "lldb/Target/Language.h"
#include "lldb/Target/Process.h"
#include "lldb/Target/StructuredDataPlugin.h"
#include "lldb/Target/Target.h"
#include "lldb/Target/TargetList.h"
#include "lldb/Target/Thread.h"
#include "lldb/Target/ThreadList.h"
#include "lldb/Utility/AnsiTerminal.h"
#include "lldb/Utility/Event.h"
#include "lldb/Utility/Listener.h"
#include "lldb/Utility/Log.h"
#include "lldb/Utility/Reproducer.h"
#include "lldb/Utility/State.h"
#include "lldb/Utility/Stream.h"
#include "lldb/Utility/StreamCallback.h"
#include "lldb/Utility/StreamString.h"
#include "llvm/ADT/None.h"
#include "llvm/ADT/STLExtras.h"
#include "llvm/ADT/StringRef.h"
#include "llvm/ADT/iterator.h"
#include "llvm/Support/DynamicLibrary.h"
#include "llvm/Support/FileSystem.h"
#include "llvm/Support/Process.h"
#include "llvm/Support/Threading.h"
#include "llvm/Support/raw_ostream.h"
#include <list>
#include <memory>
#include <mutex>
#include <set>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <string>
#include <system_error>

Go to the source code of this file.

Namespaces

 lldb_private
 Enumerations for broadcasting.
 

Macros

#define MODULE_WITH_FUNC
 
#define MODULE_WITH_FUNC_NO_ARGS
 
#define FILE_AND_LINE   "{ at ${line.file.basename}:${line.number}{:${line.column}}}"
 
#define IS_OPTIMIZED   "{${function.is-optimized} [opt]}"
 
#define IS_ARTIFICIAL   "{${frame.is-artificial} [artificial]}"
 
#define DEFAULT_THREAD_FORMAT
 
#define DEFAULT_THREAD_STOP_FORMAT
 
#define DEFAULT_FRAME_FORMAT
 
#define DEFAULT_FRAME_FORMAT_NO_ARGS
 
#define DEFAULT_DISASSEMBLY_FORMAT
 

Typedefs

typedef std::vector< DebuggerSP > DebuggerList
 

Enumerations

enum  {
  ePropertyAutoConfirm = 0, ePropertyDisassemblyFormat, ePropertyFrameFormat, ePropertyNotiftVoid,
  ePropertyPrompt, ePropertyScriptLanguage, ePropertyStopDisassemblyCount, ePropertyStopDisassemblyDisplay,
  ePropertyStopLineCountAfter, ePropertyStopLineCountBefore, ePropertyHighlightSource, ePropertyStopShowColumn,
  ePropertyStopShowColumnAnsiPrefix, ePropertyStopShowColumnAnsiSuffix, ePropertyTerminalWidth, ePropertyThreadFormat,
  ePropertyThreadStopFormat, ePropertyUseExternalEditor, ePropertyUseColor, ePropertyAutoOneLineSummaries,
  ePropertyAutoIndent, ePropertyPrintDecls, ePropertyTabSize, ePropertyEscapeNonPrintables,
  ePropertyFrameFormatUnique
}
 

Functions

static FileSystem::EnumerateDirectoryResult LoadPluginCallback (void *baton, llvm::sys::fs::file_type ft, llvm::StringRef path)
 

Variables

static lldb::user_id_t g_unique_id = 1
 
static size_t g_debugger_event_thread_stack_bytes = 8 * 1024 * 1024
 
static std::recursive_mutex * g_debugger_list_mutex_ptr
 
static DebuggerListg_debugger_list_ptr
 
static constexpr OptionEnumValueElement g_show_disassembly_enum_values []
 
static constexpr OptionEnumValueElement g_language_enumerators []
 
static constexpr OptionEnumValueElement s_stop_show_column_values []
 
static constexpr PropertyDefinition g_properties []
 

Macro Definition Documentation

◆ DEFAULT_DISASSEMBLY_FORMAT

#define DEFAULT_DISASSEMBLY_FORMAT
Value:
"{${function.initial-function}{${module.file.basename}`}{${function.name-" \
"without-args}}:\\n}{${function.changed}\\n{${module.file.basename}`}{${" \
"function.name-without-args}}:\\n}{${current-pc-arrow} " \
"}${addr-file-or-load}{ " \
"<${function.concrete-only-addr-offset-no-padding}>}: "

Definition at line 167 of file Debugger.cpp.

◆ DEFAULT_FRAME_FORMAT

#define DEFAULT_FRAME_FORMAT
Value:
"frame #${frame.index}: ${frame.pc}" MODULE_WITH_FUNC FILE_AND_LINE \
IS_OPTIMIZED IS_ARTIFICIAL "\\n"
#define IS_ARTIFICIAL
Definition: Debugger.cpp:127
#define MODULE_WITH_FUNC
Definition: Debugger.cpp:113

Definition at line 151 of file Debugger.cpp.

◆ DEFAULT_FRAME_FORMAT_NO_ARGS

#define DEFAULT_FRAME_FORMAT_NO_ARGS
Value:
"frame #${frame.index}: ${frame.pc}" MODULE_WITH_FUNC_NO_ARGS FILE_AND_LINE \
IS_OPTIMIZED IS_ARTIFICIAL "\\n"
#define MODULE_WITH_FUNC_NO_ARGS
Definition: Debugger.cpp:118
#define IS_ARTIFICIAL
Definition: Debugger.cpp:127

Definition at line 155 of file Debugger.cpp.

◆ DEFAULT_THREAD_FORMAT

#define DEFAULT_THREAD_FORMAT
Value:
"thread #${thread.index}: tid = ${thread.id%tid}" \
"{, ${frame.pc}}" MODULE_WITH_FUNC FILE_AND_LINE \
"{, name = '${thread.name}'}" \
"{, queue = '${thread.queue}'}" \
"{, activity = '${thread.info.activity.name}'}" \
"{, ${thread.info.trace_messages} messages}" \
"{, stop reason = ${thread.stop-reason}}" \
"{\\nReturn value: ${thread.return-value}}" \
"{\\nCompleted expression: ${thread.completed-expression}}" \
"\\n"
#define FILE_AND_LINE
Definition: Debugger.cpp:123
#define MODULE_WITH_FUNC
Definition: Debugger.cpp:113

Definition at line 129 of file Debugger.cpp.

◆ DEFAULT_THREAD_STOP_FORMAT

#define DEFAULT_THREAD_STOP_FORMAT
Value:
"thread #${thread.index}{, name = '${thread.name}'}" \
"{, queue = '${thread.queue}'}" \
"{, activity = '${thread.info.activity.name}'}" \
"{, ${thread.info.trace_messages} messages}" \
"{, stop reason = ${thread.stop-reason}}" \
"{\\nReturn value: ${thread.return-value}}" \
"{\\nCompleted expression: ${thread.completed-expression}}" \
"\\n"

Definition at line 141 of file Debugger.cpp.

◆ FILE_AND_LINE

#define FILE_AND_LINE   "{ at ${line.file.basename}:${line.number}{:${line.column}}}"

Definition at line 123 of file Debugger.cpp.

◆ IS_ARTIFICIAL

#define IS_ARTIFICIAL   "{${frame.is-artificial} [artificial]}"

Definition at line 127 of file Debugger.cpp.

◆ IS_OPTIMIZED

#define IS_OPTIMIZED   "{${function.is-optimized} [opt]}"

Definition at line 125 of file Debugger.cpp.

◆ MODULE_WITH_FUNC

#define MODULE_WITH_FUNC
Value:
"{ " \
"${module.file.basename}{`${function.name-with-args}" \
"{${frame.no-debug}${function.pc-offset}}}}"

Definition at line 113 of file Debugger.cpp.

◆ MODULE_WITH_FUNC_NO_ARGS

#define MODULE_WITH_FUNC_NO_ARGS
Value:
"{ " \
"${module.file.basename}{`${function.name-without-args}" \
"{${frame.no-debug}${function.pc-offset}}}}"

Definition at line 118 of file Debugger.cpp.

Typedef Documentation

◆ DebuggerList

typedef std::vector<DebuggerSP> DebuggerList

Definition at line 89 of file Debugger.cpp.

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
ePropertyAutoConfirm 
ePropertyDisassemblyFormat 
ePropertyFrameFormat 
ePropertyNotiftVoid 
ePropertyPrompt 
ePropertyScriptLanguage 
ePropertyStopDisassemblyCount 
ePropertyStopDisassemblyDisplay 
ePropertyStopLineCountAfter 
ePropertyStopLineCountBefore 
ePropertyHighlightSource 
ePropertyStopShowColumn 
ePropertyStopShowColumnAnsiPrefix 
ePropertyStopShowColumnAnsiSuffix 
ePropertyTerminalWidth 
ePropertyThreadFormat 
ePropertyThreadStopFormat 
ePropertyUseExternalEditor 
ePropertyUseColor 
ePropertyAutoOneLineSummaries 
ePropertyAutoIndent 
ePropertyPrintDecls 
ePropertyTabSize 
ePropertyEscapeNonPrintables 
ePropertyFrameFormatUnique 

Definition at line 286 of file Debugger.cpp.

Function Documentation

◆ LoadPluginCallback()

static FileSystem::EnumerateDirectoryResult LoadPluginCallback ( void *  baton,
llvm::sys::fs::file_type  ft,
llvm::StringRef  path 
)
static

Variable Documentation

◆ g_debugger_event_thread_stack_bytes

size_t g_debugger_event_thread_stack_bytes = 8 * 1024 * 1024
static

Definition at line 85 of file Debugger.cpp.

Referenced by lldb_private::Debugger::StartEventHandlerThread().

◆ g_debugger_list_mutex_ptr

std::recursive_mutex* g_debugger_list_mutex_ptr
static

◆ g_debugger_list_ptr

DebuggerList* g_debugger_list_ptr
static

◆ g_language_enumerators

constexpr OptionEnumValueElement g_language_enumerators[]
static
Initial value:
= {
{eScriptLanguageNone, "none", "Disable scripting languages."},
"Select python as the default scripting language."},
"Select the lldb default as the default scripting language."} }

Definition at line 106 of file Debugger.cpp.

◆ g_properties

constexpr PropertyDefinition g_properties[]
static

◆ g_show_disassembly_enum_values

constexpr OptionEnumValueElement g_show_disassembly_enum_values[]
static
Initial value:
= {
{Debugger::eStopDisassemblyTypeNever, "never",
"Never show disassembly when displaying a stop context."},
{Debugger::eStopDisassemblyTypeNoDebugInfo, "no-debuginfo",
"Show disassembly when there is no debug information."},
{Debugger::eStopDisassemblyTypeNoSource, "no-source",
"Show disassembly when there is no source information, or the source file "
"is missing when displaying a stop context."},
{Debugger::eStopDisassemblyTypeAlways, "always",
"Always show disassembly when displaying a stop context."} }

Definition at line 95 of file Debugger.cpp.

◆ g_unique_id

lldb::user_id_t g_unique_id = 1
static

Definition at line 84 of file Debugger.cpp.

Referenced by lldb_private::Debugger::FindTargetWithProcess().

◆ s_stop_show_column_values

constexpr OptionEnumValueElement s_stop_show_column_values[]
static
Initial value:
= {
{eStopShowColumnAnsiOrCaret, "ansi-or-caret",
"Highlight the stop column with ANSI terminal codes when color/ANSI mode "
"is enabled; otherwise, fall back to using a text-only caret (^) as if "
"\"caret-only\" mode was selected."},
{eStopShowColumnAnsi, "ansi", "Highlight the stop column with ANSI "
"terminal codes when running LLDB with "
"color/ANSI enabled."},
"Highlight the stop column with a caret character (^) underneath the stop "
"column. This method introduces a new line in source listings that "
"display thread stop locations."},
{eStopShowColumnNone, "none", "Do not highlight the stop column."}}

Definition at line 184 of file Debugger.cpp.