LLDB
mainline
|
#include "CommandObjectTarget.h"
#include "lldb/Core/Debugger.h"
#include "lldb/Core/IOHandler.h"
#include "lldb/Core/Module.h"
#include "lldb/Core/ModuleSpec.h"
#include "lldb/Core/Section.h"
#include "lldb/Core/ValueObjectVariable.h"
#include "lldb/DataFormatters/ValueObjectPrinter.h"
#include "lldb/Host/OptionParser.h"
#include "lldb/Interpreter/CommandInterpreter.h"
#include "lldb/Interpreter/CommandReturnObject.h"
#include "lldb/Interpreter/OptionArgParser.h"
#include "lldb/Interpreter/OptionGroupArchitecture.h"
#include "lldb/Interpreter/OptionGroupBoolean.h"
#include "lldb/Interpreter/OptionGroupFile.h"
#include "lldb/Interpreter/OptionGroupFormat.h"
#include "lldb/Interpreter/OptionGroupPlatform.h"
#include "lldb/Interpreter/OptionGroupPythonClassWithDict.h"
#include "lldb/Interpreter/OptionGroupString.h"
#include "lldb/Interpreter/OptionGroupUInt64.h"
#include "lldb/Interpreter/OptionGroupUUID.h"
#include "lldb/Interpreter/OptionGroupValueObjectDisplay.h"
#include "lldb/Interpreter/OptionGroupVariable.h"
#include "lldb/Interpreter/Options.h"
#include "lldb/Symbol/CompileUnit.h"
#include "lldb/Symbol/FuncUnwinders.h"
#include "lldb/Symbol/LineTable.h"
#include "lldb/Symbol/LocateSymbolFile.h"
#include "lldb/Symbol/ObjectFile.h"
#include "lldb/Symbol/SymbolFile.h"
#include "lldb/Symbol/UnwindPlan.h"
#include "lldb/Symbol/VariableList.h"
#include "lldb/Target/ABI.h"
#include "lldb/Target/Process.h"
#include "lldb/Target/RegisterContext.h"
#include "lldb/Target/SectionLoadList.h"
#include "lldb/Target/StackFrame.h"
#include "lldb/Target/Thread.h"
#include "lldb/Target/ThreadSpec.h"
#include "lldb/Utility/Args.h"
#include "lldb/Utility/LLDBLog.h"
#include "lldb/Utility/State.h"
#include "lldb/Utility/Timer.h"
#include "lldb/lldb-enumerations.h"
#include "lldb/lldb-private-enumerations.h"
#include "llvm/ADT/ScopeExit.h"
#include "llvm/Support/FileSystem.h"
#include "llvm/Support/FormatAdapters.h"
#include "CommandOptions.inc"
Go to the source code of this file.
Macros | |
#define | LLDB_OPTIONS_target_dependents |
#define | LLDB_OPTIONS_target_modules_dump_symtab |
#define | LLDB_OPTIONS_target_modules_dump |
#define | LLDB_OPTIONS_target_modules_list |
#define | LLDB_OPTIONS_target_modules_show_unwind |
#define | LLDB_OPTIONS_target_modules_lookup |
#define | LLDB_OPTIONS_target_stop_hook_add |
Functions | |
static void | DumpTargetInfo (uint32_t target_idx, Target *target, const char *prefix_cstr, bool show_stopped_process_status, Stream &strm) |
static uint32_t | DumpTargetList (TargetList &target_list, bool show_stopped_process_status, Stream &strm) |
static void | DumpModuleArchitecture (Stream &strm, Module *module, bool full_triple, uint32_t width) |
static void | DumpModuleUUID (Stream &strm, Module *module) |
static uint32_t | DumpCompileUnitLineTable (CommandInterpreter &interpreter, Stream &strm, Module *module, const FileSpec &file_spec, lldb::DescriptionLevel desc_level) |
static void | DumpFullpath (Stream &strm, const FileSpec *file_spec_ptr, uint32_t width) |
static void | DumpDirectory (Stream &strm, const FileSpec *file_spec_ptr, uint32_t width) |
static void | DumpBasename (Stream &strm, const FileSpec *file_spec_ptr, uint32_t width) |
static size_t | DumpModuleObjfileHeaders (Stream &strm, ModuleList &module_list) |
static void | DumpModuleSymtab (CommandInterpreter &interpreter, Stream &strm, Module *module, SortOrder sort_order, Mangled::NamePreference name_preference) |
static void | DumpModuleSections (CommandInterpreter &interpreter, Stream &strm, Module *module) |
static bool | DumpModuleSymbolFile (Stream &strm, Module *module) |
static void | DumpAddress (ExecutionContextScope *exe_scope, const Address &so_addr, bool verbose, bool all_ranges, Stream &strm) |
static bool | LookupAddressInModule (CommandInterpreter &interpreter, Stream &strm, Module *module, uint32_t resolve_mask, lldb::addr_t raw_addr, lldb::addr_t offset, bool verbose, bool all_ranges) |
static uint32_t | LookupSymbolInModule (CommandInterpreter &interpreter, Stream &strm, Module *module, const char *name, bool name_is_regex, bool verbose, bool all_ranges) |
static void | DumpSymbolContextList (ExecutionContextScope *exe_scope, Stream &strm, SymbolContextList &sc_list, bool verbose, bool all_ranges) |
static size_t | LookupFunctionInModule (CommandInterpreter &interpreter, Stream &strm, Module *module, const char *name, bool name_is_regex, const ModuleFunctionSearchOptions &options, bool verbose, bool all_ranges) |
static size_t | LookupTypeInModule (Target *target, CommandInterpreter &interpreter, Stream &strm, Module *module, const char *name_cstr, bool name_is_regex) |
static size_t | LookupTypeHere (Target *target, CommandInterpreter &interpreter, Stream &strm, Module &module, const char *name_cstr, bool name_is_regex) |
static uint32_t | LookupFileAndLineInModule (CommandInterpreter &interpreter, Stream &strm, Module *module, const FileSpec &file_spec, uint32_t line, bool check_inlines, bool verbose, bool all_ranges) |
static size_t | FindModulesByName (Target *target, const char *module_name, ModuleList &module_list, bool check_global_list) |
Variables | |
static constexpr OptionEnumValueElement | g_dependents_enumeration [] |
static constexpr OptionEnumValueElement | g_sort_option_enumeration [] |
#define LLDB_OPTIONS_target_dependents |
Definition at line 159 of file CommandObjectTarget.cpp.
#define LLDB_OPTIONS_target_modules_dump |
Definition at line 2304 of file CommandObjectTarget.cpp.
#define LLDB_OPTIONS_target_modules_dump_symtab |
Definition at line 1940 of file CommandObjectTarget.cpp.
#define LLDB_OPTIONS_target_modules_list |
Definition at line 2860 of file CommandObjectTarget.cpp.
#define LLDB_OPTIONS_target_modules_lookup |
Definition at line 3539 of file CommandObjectTarget.cpp.
#define LLDB_OPTIONS_target_modules_show_unwind |
Definition at line 3195 of file CommandObjectTarget.cpp.
#define LLDB_OPTIONS_target_stop_hook_add |
Definition at line 4480 of file CommandObjectTarget.cpp.
|
static |
Definition at line 1451 of file CommandObjectTarget.cpp.
References lldb_private::Address::Dump(), lldb_private::Stream::EOL(), lldb_private::Stream::GetIndentLevel(), lldb_private::Stream::Indent(), lldb_private::Stream::IndentLess(), lldb_private::Stream::IndentMore(), lldb_private::Stream::PutCString(), lldb_private::Stream::SetIndentLevel(), and UINT32_MAX.
Referenced by DWARFDebugRanges::Dump(), DumpSymbolContextList(), LookupAddressInModule(), and LookupSymbolInModule().
Definition at line 1374 of file CommandObjectTarget.cpp.
References lldb_private::ConstString::AsCString(), lldb_private::ConstString::Dump(), lldb_private::FileSpec::GetFilename(), and lldb_private::Stream::Printf().
Referenced by CommandObjectTargetModulesList::PrintModule().
|
static |
Definition at line 1312 of file CommandObjectTarget.cpp.
References lldb_private::SymbolContext::comp_unit, lldb_private::SymbolContextList::GetContextAtIndex(), lldb_private::LineTable::GetDescription(), lldb_private::CommandInterpreter::GetExecutionContext(), lldb_private::FileSpec::GetFilename(), lldb_private::Module::GetFileSpec(), lldb_private::CompileUnit::GetLineTable(), lldb_private::CompileUnit::GetPrimaryFile(), lldb_private::ExecutionContext::GetTargetPtr(), and lldb_private::Module::ResolveSymbolContextsForFileSpec().
Referenced by CommandObjectTargetModulesDumpLineTable::DoExecute().
Definition at line 1360 of file CommandObjectTarget.cpp.
References lldb_private::ConstString::AsCString(), lldb_private::ConstString::Dump(), lldb_private::FileSpec::GetDirectory(), and lldb_private::Stream::Printf().
Referenced by CommandObjectProcessMinidumpDump::DoExecute(), and CommandObjectTargetModulesList::PrintModule().
Definition at line 1343 of file CommandObjectTarget.cpp.
References lldb_private::Stream::AsRawOstream(), lldb_private::FileSpec::Dump(), lldb_private::FileSpec::GetPath(), lldb_private::Stream::Printf(), and string().
Referenced by LookupFileAndLineInModule(), LookupFunctionInModule(), LookupSymbolInModule(), LookupTypeHere(), LookupTypeInModule(), and CommandObjectTargetModulesList::PrintModule().
|
static |
Definition at line 1287 of file CommandObjectTarget.cpp.
References lldb_private::Stream::AsRawOstream(), lldb_private::ArchSpec::DumpTriple(), lldb_private::Module::GetArchitecture(), lldb_private::ArchSpec::GetArchitectureName(), lldb_private::StreamString::GetString(), lldb_private::Stream::Printf(), lldb_private::Stream::PutCString(), and string().
Referenced by CommandObjectTargetModulesList::PrintModule().
|
static |
Definition at line 1388 of file CommandObjectTarget.cpp.
References lldb_private::ObjectFile::Dump(), lldb_private::Stream::EOL(), lldb_private::Stream::Format(), lldb_private::ModuleList::GetMutex(), lldb_private::ModuleList::GetSize(), lldb_private::Stream::IndentLess(), lldb_private::Stream::IndentMore(), and lldb_private::ModuleList::ModulesNoLocking().
Referenced by CommandObjectTargetModulesDumpObjfile::DoExecute().
|
static |
Definition at line 1426 of file CommandObjectTarget.cpp.
References lldb_private::Stream::AsRawOstream(), lldb_private::SectionList::Dump(), lldb_private::Module::GetArchitecture(), lldb_private::ArchSpec::GetArchitectureName(), lldb_private::CommandInterpreter::GetExecutionContext(), lldb_private::Stream::GetIndentLevel(), lldb_private::Module::GetSectionList(), lldb_private::Module::GetSpecificationDescription(), lldb_private::ExecutionContext::GetTargetPtr(), lldb_private::Stream::Printf(), and UINT32_MAX.
Referenced by CommandObjectTargetModulesDumpSections::DoExecute().
Definition at line 1441 of file CommandObjectTarget.cpp.
References lldb_private::Module::GetSymbolFile().
Referenced by CommandObjectTargetModulesDumpSymfile::DoExecute().
|
static |
Definition at line 1416 of file CommandObjectTarget.cpp.
References lldb_private::CommandInterpreter::GetExecutionContext(), lldb_private::Module::GetSymtab(), and lldb_private::ExecutionContext::GetTargetPtr().
Referenced by CommandObjectTargetModulesDumpSymtab::DoExecute().
Definition at line 1305 of file CommandObjectTarget.cpp.
References lldb_private::UUID::Dump(), lldb_private::Module::GetUUID(), lldb_private::UUID::IsValid(), and lldb_private::Stream::PutCString().
Referenced by CommandObjectTargetModulesList::PrintModule().
|
static |
Definition at line 1568 of file CommandObjectTarget.cpp.
References DumpAddress(), lldb_private::SymbolContext::GetAddressRange(), lldb_private::AddressRange::GetBaseAddress(), lldb_private::SymbolContextList::GetContextAtIndex(), lldb_private::SymbolContextList::GetSize(), lldb_private::Stream::IndentLess(), and lldb_private::Stream::IndentMore().
Referenced by LookupFileAndLineInModule(), and LookupFunctionInModule().
|
static |
Definition at line 64 of file CommandObjectTarget.cpp.
References lldb_private::Stream::AsRawOstream(), lldb_private::ArchSpec::DumpTriple(), lldb_private::Stream::EOL(), lldb_private::Stream::Format(), lldb_private::Target::GetArchitecture(), lldb_private::Target::GetExecutableModulePointer(), lldb_private::Module::GetFileSpec(), lldb_private::FileSpec::GetPath(), lldb_private::Target::GetPlatform(), lldb_private::Target::GetProcessSP(), lldb_private::ArchSpec::IsValid(), LLDB_INVALID_PROCESS_ID, PATH_MAX, lldb_private::Stream::Printf(), lldb_private::Stream::PutCString(), lldb_private::StateAsCString(), and lldb_private::StateIsStoppedState().
Referenced by DumpTargetList().
|
static |
Definition at line 121 of file CommandObjectTarget.cpp.
References DumpTargetInfo(), lldb_private::TargetList::GetNumTargets(), lldb_private::TargetList::GetSelectedTarget(), lldb_private::TargetList::GetTargetAtIndex(), and lldb_private::Stream::PutCString().
Referenced by CommandObjectTargetList::DoExecute(), and CommandObjectTargetSelect::DoExecute().
|
static |
Definition at line 1742 of file CommandObjectTarget.cpp.
References lldb_private::ModuleList::AppendIfNeeded(), lldb_private::ModuleList::FindModules(), lldb_private::ModuleSpec::GetArchitecture(), lldb_private::Target::GetArchitecture(), lldb_private::Target::GetImages(), lldb_private::ModuleList::GetSize(), and lldb_private::Module::MatchesModuleSpec().
Referenced by CommandObjectTargetModulesDumpObjfile::DoExecute(), CommandObjectTargetModulesDumpSymtab::DoExecute(), CommandObjectTargetModulesDumpSections::DoExecute(), CommandObjectTargetModulesDumpClangAST::DoExecute(), CommandObjectTargetModulesDumpSymfile::DoExecute(), CommandObjectTargetModulesLoad::DoExecute(), CommandObjectTargetModulesList::DoExecute(), and CommandObjectTargetModulesLookup::DoExecute().
|
static |
Definition at line 1474 of file CommandObjectTarget.cpp.
References DumpAddress(), lldb_private::ExecutionContext::GetBestExecutionContextScope(), lldb_private::CommandInterpreter::GetExecutionContext(), lldb_private::Address::GetModule(), lldb_private::Target::GetSectionLoadList(), lldb_private::ExecutionContext::GetTargetPtr(), lldb_private::SectionLoadList::IsEmpty(), lldb_private::Module::ResolveFileAddress(), and lldb_private::SectionLoadList::ResolveLoadAddress().
Referenced by CommandObjectTargetModulesLookup::LookupInModule().
|
static |
Definition at line 1714 of file CommandObjectTarget.cpp.
References DumpFullpath(), DumpSymbolContextList(), lldb_private::ExecutionContext::GetBestExecutionContextScope(), lldb_private::CommandInterpreter::GetExecutionContext(), lldb_private::Module::GetFileSpec(), lldb_private::Stream::Indent(), lldb_private::Stream::Printf(), lldb_private::Stream::PutCString(), and lldb_private::Module::ResolveSymbolContextsForFileSpec().
Referenced by CommandObjectTargetModulesLookup::LookupInModule().
|
static |
Definition at line 1588 of file CommandObjectTarget.cpp.
References DumpFullpath(), DumpSymbolContextList(), lldb_private::Module::FindFunctions(), lldb_private::ExecutionContext::GetBestExecutionContextScope(), lldb_private::CommandInterpreter::GetExecutionContext(), lldb_private::Module::GetFileSpec(), lldb_private::SymbolContextList::GetSize(), lldb_private::Stream::Indent(), lldb_private::Stream::Printf(), and lldb_private::Stream::PutCString().
Referenced by CommandObjectTargetModulesLookup::LookupInModule().
|
static |
Definition at line 1524 of file CommandObjectTarget.cpp.
References lldb_private::Symtab::AppendSymbolIndexesMatchingRegExAndType(), lldb_private::Symtab::AppendSymbolIndexesWithName(), DumpAddress(), DumpFullpath(), lldb::eSymbolTypeAny, lldb_private::Symbol::GetAddressRef(), lldb_private::ExecutionContext::GetBestExecutionContextScope(), lldb_private::CommandInterpreter::GetExecutionContext(), lldb_private::Module::GetFileSpec(), lldb_private::ConstString::GetStringRef(), lldb_private::Module::GetSymtab(), lldb_private::Stream::Indent(), lldb_private::Stream::IndentLess(), lldb_private::Stream::IndentMore(), lldb_private::Stream::Printf(), lldb_private::Stream::PutCString(), lldb_private::Symtab::SymbolAtIndex(), and lldb_private::Symbol::ValueIsAddress().
Referenced by CommandObjectTargetModulesLookup::LookupInModule().
|
static |
Definition at line 1670 of file CommandObjectTarget.cpp.
References DumpFullpath(), lldb::eDescriptionLevelFull, lldb_private::TypeList::Empty(), lldb_private::Stream::EOL(), lldb_private::Module::FindTypes(), lldb_private::Module::GetFileSpec(), lldb_private::TypeList::GetSize(), lldb_private::TypeList::GetTypeAtIndex(), lldb_private::Stream::Indent(), lldb_private::Stream::Printf(), lldb_private::Stream::PutCString(), and UINT32_MAX.
Referenced by CommandObjectTargetModulesLookup::LookupHere().
|
static |
Definition at line 1620 of file CommandObjectTarget.cpp.
References DumpFullpath(), lldb::eDescriptionLevelFull, lldb_private::TypeList::Empty(), lldb_private::Stream::EOL(), lldb_private::Module::FindTypes(), lldb_private::Module::GetFileSpec(), lldb_private::TypeList::GetSize(), lldb_private::Stream::Indent(), lldb_private::Stream::Printf(), lldb_private::Stream::PutCString(), lldb_private::TypeList::Types(), and UINT32_MAX.
Referenced by CommandObjectTargetModulesLookup::LookupInModule().
|
staticconstexpr |
Definition at line 141 of file CommandObjectTarget.cpp.
|
staticconstexpr |
Definition at line 1922 of file CommandObjectTarget.cpp.