LLDB mainline
Disassembler.h
Go to the documentation of this file.
1//===-- Disassembler.h ------------------------------------------*- C++ -*-===//
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_DISASSEMBLER_H
10#define LLDB_CORE_DISASSEMBLER_H
11
12#include "lldb/Core/Address.h"
15#include "lldb/Core/Opcode.h"
23#include "lldb/lldb-defines.h"
24#include "lldb/lldb-forward.h"
26#include "lldb/lldb-types.h"
27
28#include "llvm/ADT/StringRef.h"
29
30#include <functional>
31#include <map>
32#include <memory>
33#include <set>
34#include <string>
35#include <vector>
36
37#include <cstddef>
38#include <cstdint>
39#include <cstdio>
40
41namespace llvm {
42template <typename T> class SmallVectorImpl;
43}
44
45namespace lldb_private {
46class AddressRange;
47class DataExtractor;
48class Debugger;
49class Disassembler;
50class Module;
51class StackFrame;
52class Stream;
53class SymbolContext;
54class SymbolContextList;
55class Target;
56struct RegisterInfo;
57
59public:
60 Instruction(const Address &address,
62
63 virtual ~Instruction();
64
65 const Address &GetAddress() const { return m_address; }
66
67 const char *GetMnemonic(const ExecutionContext *exe_ctx) {
69 return m_opcode_name.c_str();
70 }
71
72 const char *GetOperands(const ExecutionContext *exe_ctx) {
74 return m_mnemonics.c_str();
75 }
76
77 const char *GetComment(const ExecutionContext *exe_ctx) {
79 return m_comment.c_str();
80 }
81
82 /// \return
83 /// The control flow kind of this instruction, or
84 /// eInstructionControlFlowKindUnknown if the instruction
85 /// can't be classified.
89 }
90
91 virtual void
93
95
96 void SetAddress(const Address &addr) {
97 // Invalidate the address class to lazily discover it if we need to.
99 m_address = addr;
100 }
101
102 /// Dump the text representation of this Instruction to a Stream
103 ///
104 /// Print the (optional) address, (optional) bytes, opcode,
105 /// operands, and instruction comments to a stream.
106 ///
107 /// \param[in] s
108 /// The Stream to add the text to.
109 ///
110 /// \param[in] show_address
111 /// Whether the address (using disassembly_addr_format_spec formatting)
112 /// should be printed.
113 ///
114 /// \param[in] show_bytes
115 /// Whether the bytes of the assembly instruction should be printed.
116 ///
117 /// \param[in] show_control_flow_kind
118 /// Whether the control flow kind of the instruction should be printed.
119 ///
120 /// \param[in] max_opcode_byte_size
121 /// The size (in bytes) of the largest instruction in the list that
122 /// we are printing (for text justification/alignment purposes)
123 /// Only needed if show_bytes is true.
124 ///
125 /// \param[in] exe_ctx
126 /// The current execution context, if available. May be used in
127 /// the assembling of the operands+comments for this instruction.
128 /// Pass NULL if not applicable.
129 ///
130 /// \param[in] sym_ctx
131 /// The SymbolContext for this instruction.
132 /// Pass NULL if not available/computed.
133 /// Only needed if show_address is true.
134 ///
135 /// \param[in] prev_sym_ctx
136 /// The SymbolContext for the previous instruction. Depending on
137 /// the disassembly address format specification, a change in
138 /// Symbol / Function may mean that a line is printed with the new
139 /// symbol/function name.
140 /// Pass NULL if unavailable, or if this is the first instruction of
141 /// the InstructionList.
142 /// Only needed if show_address is true.
143 ///
144 /// \param[in] disassembly_addr_format
145 /// The format specification for how addresses are printed.
146 /// Only needed if show_address is true.
147 ///
148 /// \param[in] max_address_text_size
149 /// The length of the longest address string at the start of the
150 /// disassembly line that will be printed (the
151 /// Debugger::FormatDisassemblerAddress() string)
152 /// so this method can properly align the instruction opcodes.
153 /// May be 0 to indicate no indentation/alignment of the opcodes.
154 virtual void Dump(Stream *s, uint32_t max_opcode_byte_size, bool show_address,
155 bool show_bytes, bool show_control_flow_kind,
156 const ExecutionContext *exe_ctx,
157 const SymbolContext *sym_ctx,
158 const SymbolContext *prev_sym_ctx,
159 const FormatEntity::Entry *disassembly_addr_format,
160 size_t max_address_text_size);
161
162 virtual bool DoesBranch() = 0;
163
164 virtual bool HasDelaySlot();
165
166 virtual bool IsLoad() = 0;
167
168 virtual bool IsAuthenticated() = 0;
169
170 bool CanSetBreakpoint ();
171
172 virtual size_t Decode(const Disassembler &disassembler,
173 const DataExtractor &data,
174 lldb::offset_t data_offset) = 0;
175
176 virtual void SetDescription(llvm::StringRef) {
177 } // May be overridden in sub-classes that have descriptions.
178
179 lldb::OptionValueSP ReadArray(FILE *in_file, Stream *out_stream,
180 OptionValue::Type data_type);
181
182 lldb::OptionValueSP ReadDictionary(FILE *in_file, Stream *out_stream);
183
184 bool DumpEmulation(const ArchSpec &arch);
185
186 virtual bool TestEmulation(Stream *stream, const char *test_file_name);
187
188 bool Emulate(const ArchSpec &arch, uint32_t evaluate_options, void *baton,
193
194 const Opcode &GetOpcode() const { return m_opcode; }
195
197
198 struct Operand {
199 enum class Type {
200 Invalid = 0,
201 Register,
202 Immediate,
204 Sum,
205 Product
207 std::vector<Operand> m_children;
210 bool m_negative = false;
211 bool m_clobbered = false;
212
213 bool IsValid() { return m_type != Type::Invalid; }
214
216 static Operand BuildImmediate(lldb::addr_t imm, bool neg);
217 static Operand BuildImmediate(int64_t imm);
218 static Operand BuildDereference(const Operand &ref);
219 static Operand BuildSum(const Operand &lhs, const Operand &rhs);
220 static Operand BuildProduct(const Operand &lhs, const Operand &rhs);
221 };
222
224 return false;
225 }
226
227 virtual bool IsCall() { return false; }
228
229 static const char *GetNameForInstructionControlFlowKind(
230 lldb::InstructionControlFlowKind instruction_control_flow_kind);
231
232protected:
233 Address m_address; // The section offset address of this instruction
234 // We include an address class in the Instruction class to
235 // allow the instruction specify the
236 // AddressClass::eCodeAlternateISA (currently used for
237 // thumb), and also to specify data (AddressClass::eData).
238 // The usual value will be AddressClass::eCode, but often
239 // when disassembling memory, you might run into data.
240 // This can help us to disassemble appropriately.
241private:
242 AddressClass m_address_class; // Use GetAddressClass () accessor function!
243
244protected:
245 Opcode m_opcode; // The opcode for this instruction
246 std::string m_opcode_name;
247 std::string m_mnemonics;
248 std::string m_comment;
250
251 void
256 }
257 }
258};
259
260namespace OperandMatchers {
261std::function<bool(const Instruction::Operand &)>
262MatchBinaryOp(std::function<bool(const Instruction::Operand &)> base,
263 std::function<bool(const Instruction::Operand &)> left,
264 std::function<bool(const Instruction::Operand &)> right);
265
266std::function<bool(const Instruction::Operand &)>
267MatchUnaryOp(std::function<bool(const Instruction::Operand &)> base,
268 std::function<bool(const Instruction::Operand &)> child);
269
270std::function<bool(const Instruction::Operand &)>
271MatchRegOp(const RegisterInfo &info);
272
273std::function<bool(const Instruction::Operand &)> FetchRegOp(ConstString &reg);
274
275std::function<bool(const Instruction::Operand &)> MatchImmOp(int64_t imm);
276
277std::function<bool(const Instruction::Operand &)> FetchImmOp(int64_t &imm);
278
279std::function<bool(const Instruction::Operand &)>
281}
282
284public:
287
288 size_t GetSize() const;
289
291
292 lldb::InstructionSP GetInstructionAtIndex(size_t idx) const;
293
294 /// Get the instruction at the given address.
295 ///
296 /// \return
297 /// A valid \a InstructionSP if the address could be found, or null
298 /// otherwise.
299 lldb::InstructionSP GetInstructionAtAddress(const Address &addr);
300
301 //------------------------------------------------------------------
302 /// Get the index of the next branch instruction.
303 ///
304 /// Given a list of instructions, find the next branch instruction
305 /// in the list by returning an index.
306 ///
307 /// @param[in] start
308 /// The instruction index of the first instruction to check.
309 ///
310 /// @param[in] ignore_calls
311 /// It true, then fine the first branch instruction that isn't
312 /// a function call (a branch that calls and returns to the next
313 /// instruction). If false, find the instruction index of any
314 /// branch in the list.
315 ///
316 /// @param[out] found_calls
317 /// If non-null, this will be set to true if any calls were found in
318 /// extending the range.
319 ///
320 /// @return
321 /// The instruction index of the first branch that is at or past
322 /// \a start. Returns UINT32_MAX if no matching branches are
323 /// found.
324 //------------------------------------------------------------------
326 bool ignore_calls,
327 bool *found_calls) const;
328
330 Target &target);
331
333
334 void Clear();
335
336 void Append(lldb::InstructionSP &inst_sp);
337
338 void Dump(Stream *s, bool show_address, bool show_bytes,
339 bool show_control_flow_kind, const ExecutionContext *exe_ctx);
340
341private:
342 typedef std::vector<lldb::InstructionSP> collection;
343 typedef collection::iterator iterator;
344 typedef collection::const_iterator const_iterator;
345
347};
348
350public:
352
354
355 bool DoesBranch() override;
356
357 bool HasDelaySlot() override;
358
359 bool IsLoad() override;
360
361 bool IsAuthenticated() override;
362
364 const ExecutionContext *exe_ctx) override {
365 // TODO: fill this in and put opcode name into Instruction::m_opcode_name,
366 // mnemonic into Instruction::m_mnemonics, and any comment into
367 // Instruction::m_comment
368 }
369
370 size_t Decode(const Disassembler &disassembler, const DataExtractor &data,
371 lldb::offset_t data_offset) override;
372
373 void SetOpcode(size_t opcode_size, void *opcode_data);
374
375 void SetDescription(llvm::StringRef description) override;
376
377protected:
378 std::string m_description;
379
382};
383
384class Disassembler : public std::enable_shared_from_this<Disassembler>,
385 public PluginInterface {
386public:
387 enum {
389 eOptionShowBytes = (1u << 0),
390 eOptionRawOuput = (1u << 1),
391 eOptionMarkPCSourceLine = (1u << 2), // Mark the source line that contains
392 // the current PC (mixed mode only)
394 (1u << 3), // Mark the disassembly line the contains the PC
396 };
397
401 };
402
403 // FindPlugin should be lax about the flavor string (it is too annoying to
404 // have various internal uses of the disassembler fail because the global
405 // flavor string gets set wrong. Instead, if you get a flavor string you
406 // don't understand, use the default. Folks who care to check can use the
407 // FlavorValidForArchSpec method on the disassembler they got back.
408 static lldb::DisassemblerSP
409 FindPlugin(const ArchSpec &arch, const char *flavor, const char *plugin_name);
410
411 // This version will use the value in the Target settings if flavor is NULL;
412 static lldb::DisassemblerSP FindPluginForTarget(const Target &target,
413 const ArchSpec &arch,
414 const char *flavor,
415 const char *plugin_name);
416
417 struct Limit {
420 };
421
422 static lldb::DisassemblerSP DisassembleRange(const ArchSpec &arch,
423 const char *plugin_name,
424 const char *flavor,
425 Target &target,
426 const AddressRange &disasm_range,
427 bool force_live_memory = false);
428
429 static lldb::DisassemblerSP
430 DisassembleBytes(const ArchSpec &arch, const char *plugin_name,
431 const char *flavor, const Address &start, const void *bytes,
432 size_t length, uint32_t max_num_instructions,
433 bool data_from_file);
434
435 static bool Disassemble(Debugger &debugger, const ArchSpec &arch,
436 const char *plugin_name, const char *flavor,
437 const ExecutionContext &exe_ctx, const Address &start,
438 Limit limit, bool mixed_source_and_assembly,
439 uint32_t num_mixed_context_lines, uint32_t options,
440 Stream &strm);
441
442 static bool Disassemble(Debugger &debugger, const ArchSpec &arch,
443 StackFrame &frame, Stream &strm);
444
445 // Constructors and Destructors
446 Disassembler(const ArchSpec &arch, const char *flavor);
447 ~Disassembler() override;
448
449 void PrintInstructions(Debugger &debugger, const ArchSpec &arch,
450 const ExecutionContext &exe_ctx,
451 bool mixed_source_and_assembly,
452 uint32_t num_mixed_context_lines, uint32_t options,
453 Stream &strm);
454
455 size_t ParseInstructions(Target &target, Address address, Limit limit,
456 Stream *error_strm_ptr,
457 bool force_live_memory = false);
458
459 virtual size_t DecodeInstructions(const Address &base_addr,
460 const DataExtractor &data,
461 lldb::offset_t data_offset,
462 size_t num_instructions, bool append,
463 bool data_from_file) = 0;
464
466
467 const InstructionList &GetInstructionList() const;
468
469 const ArchSpec &GetArchitecture() const { return m_arch; }
470
471 const char *GetFlavor() const { return m_flavor.c_str(); }
472
474 const char *flavor) = 0;
475
476protected:
477 // SourceLine and SourceLinesToDisplay structures are only used in the mixed
478 // source and assembly display methods internal to this class.
479
480 struct SourceLine {
484
485 SourceLine() = default;
486
487 bool operator==(const SourceLine &rhs) const {
488 return file == rhs.file && line == rhs.line && rhs.column == column;
489 }
490
491 bool operator!=(const SourceLine &rhs) const {
492 return file != rhs.file || line != rhs.line || column != rhs.column;
493 }
494
495 bool IsValid() const { return line != LLDB_INVALID_LINE_NUMBER; }
496 };
497
499 std::vector<SourceLine> lines;
500
501 // index of the "current" source line, if we want to highlight that when
502 // displaying the source lines. (as opposed to the surrounding source
503 // lines provided to give context)
505
506 // Whether to print a blank line at the end of the source lines.
508
510 };
511
512 // Get the function's declaration line number, hopefully a line number
513 // earlier than the opening curly brace at the start of the function body.
515
516 // Add the provided SourceLine to the map of filenames-to-source-lines-seen.
517 static void AddLineToSourceLineTables(
518 SourceLine &line,
519 std::map<FileSpec, std::set<uint32_t>> &source_lines_seen);
520
521 // Given a source line, determine if we should print it when we're doing
522 // mixed source & assembly output. We're currently using the
523 // target.process.thread.step-avoid-regexp setting (which is used for
524 // stepping over inlined STL functions by default) to determine what source
525 // lines to avoid showing.
526 //
527 // Returns true if this source line should be elided (if the source line
528 // should not be displayed).
529 static bool
531 const SymbolContext &sc, SourceLine &line);
532
533 static bool
535 const SymbolContext &sc, LineEntry &line) {
536 SourceLine sl;
537 sl.file = line.file;
538 sl.line = line.line;
539 sl.column = line.column;
540 return ElideMixedSourceAndDisassemblyLine(exe_ctx, sc, sl);
541 };
542
543 // Classes that inherit from Disassembler can see and modify these
547 std::string m_flavor;
548
549private:
550 // For Disassembler only
551 Disassembler(const Disassembler &) = delete;
552 const Disassembler &operator=(const Disassembler &) = delete;
553};
554
555} // namespace lldb_private
556
557#endif // LLDB_CORE_DISASSEMBLER_H
A section + offset based address range class.
Definition: AddressRange.h:25
A section + offset based address class.
Definition: Address.h:59
An architecture specification class.
Definition: ArchSpec.h:32
A uniqued constant string class.
Definition: ConstString.h:39
An data extractor class.
Definition: DataExtractor.h:48
A class to manage flag bits.
Definition: Debugger.h:78
static lldb::DisassemblerSP DisassembleBytes(const ArchSpec &arch, const char *plugin_name, const char *flavor, const Address &start, const void *bytes, size_t length, uint32_t max_num_instructions, bool data_from_file)
size_t ParseInstructions(Target &target, Address address, Limit limit, Stream *error_strm_ptr, bool force_live_memory=false)
InstructionList m_instruction_list
Definition: Disassembler.h:545
void PrintInstructions(Debugger &debugger, const ArchSpec &arch, const ExecutionContext &exe_ctx, bool mixed_source_and_assembly, uint32_t num_mixed_context_lines, uint32_t options, Stream &strm)
const ArchSpec & GetArchitecture() const
Definition: Disassembler.h:469
static void AddLineToSourceLineTables(SourceLine &line, std::map< FileSpec, std::set< uint32_t > > &source_lines_seen)
static bool ElideMixedSourceAndDisassemblyLine(const ExecutionContext &exe_ctx, const SymbolContext &sc, LineEntry &line)
Definition: Disassembler.h:534
static bool ElideMixedSourceAndDisassemblyLine(const ExecutionContext &exe_ctx, const SymbolContext &sc, SourceLine &line)
Disassembler(const Disassembler &)=delete
static SourceLine GetFunctionDeclLineEntry(const SymbolContext &sc)
virtual size_t DecodeInstructions(const Address &base_addr, const DataExtractor &data, lldb::offset_t data_offset, size_t num_instructions, bool append, bool data_from_file)=0
const Disassembler & operator=(const Disassembler &)=delete
virtual bool FlavorValidForArchSpec(const lldb_private::ArchSpec &arch, const char *flavor)=0
const char * GetFlavor() const
Definition: Disassembler.h:471
InstructionList & GetInstructionList()
static lldb::DisassemblerSP FindPlugin(const ArchSpec &arch, const char *flavor, const char *plugin_name)
static lldb::DisassemblerSP DisassembleRange(const ArchSpec &arch, const char *plugin_name, const char *flavor, Target &target, const AddressRange &disasm_range, bool force_live_memory=false)
static bool Disassemble(Debugger &debugger, const ArchSpec &arch, const char *plugin_name, const char *flavor, const ExecutionContext &exe_ctx, const Address &start, Limit limit, bool mixed_source_and_assembly, uint32_t num_mixed_context_lines, uint32_t options, Stream &strm)
static lldb::DisassemblerSP FindPluginForTarget(const Target &target, const ArchSpec &arch, const char *flavor, const char *plugin_name)
bool(* WriteRegisterCallback)(EmulateInstruction *instruction, void *baton, const Context &context, const RegisterInfo *reg_info, const RegisterValue &reg_value)
size_t(* WriteMemoryCallback)(EmulateInstruction *instruction, void *baton, const Context &context, lldb::addr_t addr, const void *dst, size_t length)
size_t(* ReadMemoryCallback)(EmulateInstruction *instruction, void *baton, const Context &context, lldb::addr_t addr, void *dst, size_t length)
bool(* ReadRegisterCallback)(EmulateInstruction *instruction, void *baton, const RegisterInfo *reg_info, RegisterValue &reg_value)
"lldb/Target/ExecutionContext.h" A class that contains an execution context.
A file utility class.
Definition: FileSpec.h:56
void Append(lldb::InstructionSP &inst_sp)
uint32_t GetIndexOfInstructionAtAddress(const Address &addr)
collection::iterator iterator
Definition: Disassembler.h:343
collection::const_iterator const_iterator
Definition: Disassembler.h:344
lldb::InstructionSP GetInstructionAtIndex(size_t idx) const
uint32_t GetIndexOfInstructionAtLoadAddress(lldb::addr_t load_addr, Target &target)
std::vector< lldb::InstructionSP > collection
Definition: Disassembler.h:342
lldb::InstructionSP GetInstructionAtAddress(const Address &addr)
Get the instruction at the given address.
void Dump(Stream *s, bool show_address, bool show_bytes, bool show_control_flow_kind, const ExecutionContext *exe_ctx)
uint32_t GetIndexOfNextBranchInstruction(uint32_t start, bool ignore_calls, bool *found_calls) const
Get the index of the next branch instruction.
uint32_t GetMaxOpcocdeByteSize() const
uint32_t GetData(DataExtractor &data)
virtual bool ParseOperands(llvm::SmallVectorImpl< Operand > &operands)
Definition: Disassembler.h:223
AddressClass m_address_class
Definition: Disassembler.h:242
virtual void CalculateMnemonicOperandsAndComment(const ExecutionContext *exe_ctx)=0
static const char * GetNameForInstructionControlFlowKind(lldb::InstructionControlFlowKind instruction_control_flow_kind)
virtual size_t Decode(const Disassembler &disassembler, const DataExtractor &data, lldb::offset_t data_offset)=0
virtual lldb::InstructionControlFlowKind GetControlFlowKind(const ExecutionContext *exe_ctx)
Definition: Disassembler.h:87
void CalculateMnemonicOperandsAndCommentIfNeeded(const ExecutionContext *exe_ctx)
Definition: Disassembler.h:252
void SetAddress(const Address &addr)
Definition: Disassembler.h:96
const Address & GetAddress() const
Definition: Disassembler.h:65
lldb::OptionValueSP ReadDictionary(FILE *in_file, Stream *out_stream)
lldb::OptionValueSP ReadArray(FILE *in_file, Stream *out_stream, OptionValue::Type data_type)
bool DumpEmulation(const ArchSpec &arch)
const char * GetComment(const ExecutionContext *exe_ctx)
Definition: Disassembler.h:77
virtual bool TestEmulation(Stream *stream, const char *test_file_name)
virtual bool DoesBranch()=0
const char * GetMnemonic(const ExecutionContext *exe_ctx)
Definition: Disassembler.h:67
virtual void SetDescription(llvm::StringRef)
Definition: Disassembler.h:176
const Opcode & GetOpcode() const
Definition: Disassembler.h:194
const char * GetOperands(const ExecutionContext *exe_ctx)
Definition: Disassembler.h:72
AddressClass GetAddressClass()
virtual void Dump(Stream *s, uint32_t max_opcode_byte_size, bool show_address, bool show_bytes, bool show_control_flow_kind, const ExecutionContext *exe_ctx, const SymbolContext *sym_ctx, const SymbolContext *prev_sym_ctx, const FormatEntity::Entry *disassembly_addr_format, size_t max_address_text_size)
Dump the text representation of this Instruction to a Stream.
bool Emulate(const ArchSpec &arch, uint32_t evaluate_options, void *baton, EmulateInstruction::ReadMemoryCallback read_mem_callback, EmulateInstruction::WriteMemoryCallback write_mem_calback, EmulateInstruction::ReadRegisterCallback read_reg_callback, EmulateInstruction::WriteRegisterCallback write_reg_callback)
virtual bool IsLoad()=0
virtual bool IsAuthenticated()=0
const PseudoInstruction & operator=(const PseudoInstruction &)=delete
void SetOpcode(size_t opcode_size, void *opcode_data)
void SetDescription(llvm::StringRef description) override
void CalculateMnemonicOperandsAndComment(const ExecutionContext *exe_ctx) override
Definition: Disassembler.h:363
PseudoInstruction(const PseudoInstruction &)=delete
size_t Decode(const Disassembler &disassembler, const DataExtractor &data, lldb::offset_t data_offset) override
This base class provides an interface to stack frames.
Definition: StackFrame.h:41
A stream class that can stream formatted output to a file.
Definition: Stream.h:28
Defines a symbol context baton that can be handed other debug core functions.
Definition: SymbolContext.h:33
#define LLDB_INVALID_LINE_NUMBER
Definition: lldb-defines.h:86
std::function< bool(const Instruction::Operand &)> MatchRegOp(const RegisterInfo &info)
std::function< bool(const Instruction::Operand &)> FetchRegOp(ConstString &reg)
std::function< bool(const Instruction::Operand &)> MatchImmOp(int64_t imm)
std::function< bool(const Instruction::Operand &)> FetchImmOp(int64_t &imm)
std::function< bool(const Instruction::Operand &)> MatchOpType(Instruction::Operand::Type type)
std::function< bool(const Instruction::Operand &)> MatchBinaryOp(std::function< bool(const Instruction::Operand &)> base, std::function< bool(const Instruction::Operand &)> left, std::function< bool(const Instruction::Operand &)> right)
std::function< bool(const Instruction::Operand &)> MatchUnaryOp(std::function< bool(const Instruction::Operand &)> base, std::function< bool(const Instruction::Operand &)> child)
A class that represents a running process on the host machine.
Definition: SBAttachInfo.h:14
uint64_t offset_t
Definition: lldb-types.h:87
InstructionControlFlowKind
Architecture-agnostic categorization of instructions for traversing the control flow of a trace.
@ eInstructionControlFlowKindUnknown
The instruction could not be classified.
uint64_t addr_t
Definition: lldb-types.h:83
Definition: Debugger.h:52
enum lldb_private::Disassembler::Limit::@6 kind
bool operator==(const SourceLine &rhs) const
Definition: Disassembler.h:487
bool operator!=(const SourceLine &rhs) const
Definition: Disassembler.h:491
enum lldb_private::Instruction::Operand::Type m_type
static Operand BuildImmediate(lldb::addr_t imm, bool neg)
static Operand BuildDereference(const Operand &ref)
std::vector< Operand > m_children
Definition: Disassembler.h:207
static Operand BuildProduct(const Operand &lhs, const Operand &rhs)
static Operand BuildSum(const Operand &lhs, const Operand &rhs)
static Operand BuildRegister(ConstString &r)
A line table entry class.
Definition: LineEntry.h:20
uint16_t column
The column number of the source line, or zero if there is no column information.
Definition: LineEntry.h:146
FileSpec file
The source file, possibly mapped by the target.source-map setting.
Definition: LineEntry.h:140
uint32_t line
The source line number, or zero if there is no line number information.
Definition: LineEntry.h:143