LLDB  mainline
Classes | Macros | Variables
CommandObjectMemory.cpp File Reference
#include "clang/AST/Decl.h"
#include "CommandObjectMemory.h"
#include "Plugins/ExpressionParser/Clang/ClangPersistentVariables.h"
#include "lldb/Core/Debugger.h"
#include "lldb/Core/DumpDataExtractor.h"
#include "lldb/Core/Module.h"
#include "lldb/Core/Section.h"
#include "lldb/Core/ValueObjectMemory.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/OptionGroupFormat.h"
#include "lldb/Interpreter/OptionGroupOutputFile.h"
#include "lldb/Interpreter/OptionGroupValueObjectDisplay.h"
#include "lldb/Interpreter/OptionValueString.h"
#include "lldb/Interpreter/Options.h"
#include "lldb/Symbol/ClangASTContext.h"
#include "lldb/Symbol/SymbolFile.h"
#include "lldb/Symbol/TypeList.h"
#include "lldb/Target/MemoryHistory.h"
#include "lldb/Target/MemoryRegionInfo.h"
#include "lldb/Target/Process.h"
#include "lldb/Target/StackFrame.h"
#include "lldb/Target/Thread.h"
#include "lldb/Utility/Args.h"
#include "lldb/Utility/DataBufferHeap.h"
#include "lldb/Utility/DataBufferLLVM.h"
#include "lldb/Utility/StreamString.h"
#include "lldb/lldb-private.h"
#include <cinttypes>
#include <memory>
Include dependency graph for CommandObjectMemory.cpp:

Go to the source code of this file.

Classes

class  OptionGroupReadMemory
 
class  CommandObjectMemoryRead
 
class  CommandObjectMemoryFind
 
class  CommandObjectMemoryFind::OptionGroupFindMemory
 
class  CommandObjectMemoryFind::ProcessMemoryIterator
 
class  CommandObjectMemoryWrite
 
class  CommandObjectMemoryWrite::OptionGroupWriteMemory
 
class  CommandObjectMemoryHistory
 
class  CommandObjectMemoryRegion
 

Macros

#define ALL_KEYWORDS
 
#define KEYWORD(s)   s,
 
#define KEYWORD(s)   (sizeof(s) - 1),
 

Variables

static constexpr OptionDefinition g_read_memory_options []
 
static constexpr OptionDefinition g_memory_find_option_table []
 
static constexpr OptionDefinition g_memory_write_option_table []
 

Macro Definition Documentation

◆ ALL_KEYWORDS

#define ALL_KEYWORDS
Value:
KEYWORD("const") \
KEYWORD("volatile") \
KEYWORD("restrict") \
KEYWORD("struct") \
KEYWORD("class") \
KEYWORD("union")
#define KEYWORD(s)

Referenced by CommandObjectMemoryRead::DoExecute().

◆ KEYWORD [1/2]

#define KEYWORD (   s)    s,

◆ KEYWORD [2/2]

#define KEYWORD (   s)    (sizeof(s) - 1),

Variable Documentation

◆ g_memory_find_option_table

constexpr OptionDefinition g_memory_find_option_table[]
static
Initial value:
= {
{LLDB_OPT_SET_1, true, "expression", 'e', OptionParser::eRequiredArgument, nullptr, {}, 0, eArgTypeExpression, "Evaluate an expression to obtain a byte pattern."},
{LLDB_OPT_SET_2, true, "string", 's', OptionParser::eRequiredArgument, nullptr, {}, 0, eArgTypeName, "Use text to find a byte pattern."},
{LLDB_OPT_SET_ALL, false, "count", 'c', OptionParser::eRequiredArgument, nullptr, {}, 0, eArgTypeCount, "How many times to perform the search."},
{LLDB_OPT_SET_ALL, false, "dump-offset", 'o', OptionParser::eRequiredArgument, nullptr, {}, 0, eArgTypeOffset, "When dumping memory for a match, an offset from the match location to start dumping from."},
}
#define LLDB_OPT_SET_2
Definition: lldb-defines.h:112
#define LLDB_OPT_SET_ALL
Definition: lldb-defines.h:110
#define LLDB_OPT_SET_1
Definition: lldb-defines.h:111

Definition at line 883 of file CommandObjectMemory.cpp.

Referenced by CommandObjectMemoryFind::OptionGroupFindMemory::GetDefinitions(), and CommandObjectMemoryFind::OptionGroupFindMemory::SetOptionValue().

◆ g_memory_write_option_table

constexpr OptionDefinition g_memory_write_option_table[]
static
Initial value:
= {
{LLDB_OPT_SET_1, true, "infile", 'i', OptionParser::eRequiredArgument, nullptr, {}, 0, eArgTypeFilename, "Write memory using the contents of a file."},
{LLDB_OPT_SET_1, false, "offset", 'o', OptionParser::eRequiredArgument, nullptr, {}, 0, eArgTypeOffset, "Start writing bytes from an offset within the input file."},
}
#define LLDB_OPT_SET_1
Definition: lldb-defines.h:111

Definition at line 1180 of file CommandObjectMemory.cpp.

Referenced by CommandObjectMemoryWrite::OptionGroupWriteMemory::GetDefinitions(), and CommandObjectMemoryWrite::OptionGroupWriteMemory::SetOptionValue().

◆ g_read_memory_options

constexpr OptionDefinition g_read_memory_options[]
static
Initial value:
= {
{LLDB_OPT_SET_1, false, "num-per-line", 'l', OptionParser::eRequiredArgument, nullptr, {}, 0, eArgTypeNumberPerLine, "The number of items per line to display." },
{LLDB_OPT_SET_2, false, "binary", 'b', OptionParser::eNoArgument, nullptr, {}, 0, eArgTypeNone, "If true, memory will be saved as binary. If false, the memory is saved save as an ASCII dump that "
"uses the format, size, count and number per line settings." },
{LLDB_OPT_SET_3, true , "type", 't', OptionParser::eRequiredArgument, nullptr, {}, 0, eArgTypeNone, "The name of a type to view memory as." },
{LLDB_OPT_SET_3, false, "offset", 'E', OptionParser::eRequiredArgument, nullptr, {}, 0, eArgTypeCount, "How many elements of the specified type to skip before starting to display data." },
LLDB_OPT_SET_3, false, "force", 'r', OptionParser::eNoArgument, nullptr, {}, 0, eArgTypeNone, "Necessary if reading over target.max-memory-read-size bytes." },
}
#define LLDB_OPT_SET_3
Definition: lldb-defines.h:113
#define LLDB_OPT_SET_2
Definition: lldb-defines.h:112
#define LLDB_OPT_SET_1
Definition: lldb-defines.h:111

Definition at line 49 of file CommandObjectMemory.cpp.

Referenced by OptionGroupReadMemory::GetDefinitions(), and OptionGroupReadMemory::SetOptionValue().