pub enum DebugNode {
Show 22 variants
Location {
line: u32,
column: u32,
scope: MetadataId,
inlined_at: Option<MetadataId>,
},
Generic {
tag: u32,
header: Option<MetadataId>,
operands: Vec<Option<MetadataId>>,
},
Subrange {
count: i64,
lower_bound: i64,
},
Enumerator {
value: i64,
name: Option<MetadataId>,
},
BasicType {
tag: u32,
name: Option<MetadataId>,
size: u64,
align: u64,
encoding: u32,
},
DerivedType {
tag: u32,
name: Option<MetadataId>,
file: Option<MetadataId>,
line: u32,
scope: Option<MetadataId>,
base_type: Option<MetadataId>,
size: u64,
align: u64,
offset: u64,
flags: u32,
extra_data: Option<MetadataId>,
},
CompositeType {Show 15 fields
tag: u32,
name: Option<MetadataId>,
file: Option<MetadataId>,
line: u32,
scope: Option<MetadataId>,
base_type: Option<MetadataId>,
size: u64,
align: u64,
offset: u64,
flags: u32,
elements: Option<MetadataId>,
runtime_lang: u32,
vtable_holder: Option<MetadataId>,
template_params: Option<MetadataId>,
identifier: Option<MetadataId>,
},
SubroutineType {
flags: u32,
types: Option<MetadataId>,
},
File {
filename: Option<MetadataId>,
directory: Option<MetadataId>,
},
CompileUnit {Show 14 fields
language: u32,
file: Option<MetadataId>,
producer: Option<MetadataId>,
optimized: bool,
flags: Option<MetadataId>,
runtime_version: u32,
split_debug_filename: Option<MetadataId>,
emission_kind: u32,
enums: Option<MetadataId>,
retained_types: Option<MetadataId>,
subprograms: Option<MetadataId>,
globals: Option<MetadataId>,
imports: Option<MetadataId>,
dwo_id: u64,
},
Subprogram {Show 18 fields
scope: Option<MetadataId>,
name: Option<MetadataId>,
linkage_name: Option<MetadataId>,
file: Option<MetadataId>,
line: u32,
ty: Option<MetadataId>,
local: bool,
definition: bool,
scope_line: u32,
containing_type: Option<MetadataId>,
virtuality: u32,
virtual_index: u32,
flags: u32,
optimized: bool,
function: Option<MetadataId>,
template_params: Option<MetadataId>,
declaration: Option<MetadataId>,
variables: Option<MetadataId>,
},
LexicalBlock {
scope: Option<MetadataId>,
file: Option<MetadataId>,
line: u32,
column: u32,
},
LexicalBlockFile {
scope: Option<MetadataId>,
file: Option<MetadataId>,
discriminator: u32,
},
Namespace {
scope: Option<MetadataId>,
file: Option<MetadataId>,
name: Option<MetadataId>,
line: u32,
},
Module {
scope: Option<MetadataId>,
name: Option<MetadataId>,
config_macros: Option<MetadataId>,
include_path: Option<MetadataId>,
isysroot: Option<MetadataId>,
},
TemplateType {
name: Option<MetadataId>,
ty: Option<MetadataId>,
},
TemplateValue {
tag: u32,
name: Option<MetadataId>,
ty: Option<MetadataId>,
value: Option<MetadataId>,
},
GlobalVariable {
scope: Option<MetadataId>,
name: Option<MetadataId>,
linkage_name: Option<MetadataId>,
file: Option<MetadataId>,
line: u32,
ty: Option<MetadataId>,
local: bool,
definition: bool,
variable: Option<MetadataId>,
declaration: Option<MetadataId>,
},
LocalVariable {
tag: u32,
scope: Option<MetadataId>,
name: Option<MetadataId>,
file: Option<MetadataId>,
line: u32,
ty: Option<MetadataId>,
arg: u32,
flags: u32,
},
Expression(Vec<u64>),
ObjcProperty {
name: Option<MetadataId>,
file: Option<MetadataId>,
line: u32,
getter: Option<MetadataId>,
setter: Option<MetadataId>,
attributes: u32,
ty: Option<MetadataId>,
},
ImportedEntity {
tag: u32,
scope: Option<MetadataId>,
entity: Option<MetadataId>,
line: u32,
name: Option<MetadataId>,
},
}Expand description
A debug-information node: one of LLVM 3.7’s DI* metadata classes.
Variants§
Location
DILocation: a source position, in a scope, maybe inlined at another location.
Fields
scope: MetadataIdThe scope (a subprogram or lexical block).
inlined_at: Option<MetadataId>The location of the call this one was inlined into.
Generic
GenericDINode: a DWARF entry LLVM has no class for.
Fields
header: Option<MetadataId>Its header string.
operands: Vec<Option<MetadataId>>Its DWARF operands.
Subrange
DISubrange: an array dimension.
Enumerator
DIEnumerator: one value of an enumeration.
BasicType
DIBasicType: a scalar type.
Fields
name: Option<MetadataId>Its name.
DerivedType
DIDerivedType: a type made from another (a member, typedef, pointer, qualifier, …).
Fields
name: Option<MetadataId>Its name.
file: Option<MetadataId>Its file.
scope: Option<MetadataId>Its scope.
base_type: Option<MetadataId>The type it derives from.
extra_data: Option<MetadataId>Extra data (a static member’s value, a pointer to member’s class, …).
CompositeType
DICompositeType: a structure, class, union, array or enumeration.
Fields
name: Option<MetadataId>Its name.
file: Option<MetadataId>Its file.
scope: Option<MetadataId>Its scope.
base_type: Option<MetadataId>Its base type (an array’s elements, an enumeration’s underlying type).
elements: Option<MetadataId>Its members, enumerators or subranges (a node listing them).
vtable_holder: Option<MetadataId>The type holding its virtual table.
template_params: Option<MetadataId>Its template parameters (a node listing them).
identifier: Option<MetadataId>Its unique identifier.
SubroutineType
DISubroutineType: a function type.
Fields
types: Option<MetadataId>Its return type and parameter types (a node listing them).
File
DIFile: a source file.
CompileUnit
DICompileUnit: the compilation the program’s debug information describes.
Fields
file: Option<MetadataId>The main file.
producer: Option<MetadataId>The compiler that made it.
flags: Option<MetadataId>The compiler’s flags.
split_debug_filename: Option<MetadataId>The file split debug information goes to.
enums: Option<MetadataId>Its enumeration types (a node listing them).
retained_types: Option<MetadataId>The types it keeps whether used or not.
subprograms: Option<MetadataId>Its subprograms.
globals: Option<MetadataId>Its global variables.
imports: Option<MetadataId>Its imported entities.
Subprogram
DISubprogram: a function.
Fields
scope: Option<MetadataId>Its scope.
name: Option<MetadataId>Its name.
linkage_name: Option<MetadataId>Its linkage (decorated) name.
file: Option<MetadataId>Its file.
ty: Option<MetadataId>Its type.
containing_type: Option<MetadataId>The type holding its virtual table entry.
function: Option<MetadataId>The function it describes (a value as metadata).
template_params: Option<MetadataId>Its template parameters.
declaration: Option<MetadataId>Its declaration.
variables: Option<MetadataId>Its variables.
LexicalBlock
DILexicalBlock: a block scope.
LexicalBlockFile
DILexicalBlockFile: a part of a scope in another file.
Namespace
DINamespace: a namespace.
Fields
scope: Option<MetadataId>The enclosing scope.
file: Option<MetadataId>Its file.
name: Option<MetadataId>Its name.
Module
DIModule: a module of the source language.
Fields
scope: Option<MetadataId>The enclosing scope.
name: Option<MetadataId>Its name.
config_macros: Option<MetadataId>Its configuration macros.
include_path: Option<MetadataId>Its include path.
isysroot: Option<MetadataId>Its system root.
TemplateType
DITemplateTypeParameter: a template’s type parameter.
TemplateValue
DITemplateValueParameter: a template’s value parameter.
Fields
name: Option<MetadataId>Its name.
ty: Option<MetadataId>Its type.
value: Option<MetadataId>Its value.
GlobalVariable
DIGlobalVariable: a global variable.
Fields
scope: Option<MetadataId>Its scope.
name: Option<MetadataId>Its name.
linkage_name: Option<MetadataId>Its linkage (decorated) name.
file: Option<MetadataId>Its file.
ty: Option<MetadataId>Its type.
variable: Option<MetadataId>The global it describes (a value as metadata).
declaration: Option<MetadataId>A static data member’s declaration.
LocalVariable
DILocalVariable: a local variable or parameter.
Fields
scope: Option<MetadataId>Its scope.
name: Option<MetadataId>Its name.
file: Option<MetadataId>Its file.
ty: Option<MetadataId>Its type.
Expression(Vec<u64>)
DIExpression: how a variable’s value is reached from what the debug intrinsic names: DWARF operations and their
arguments, as stored.
ObjcProperty
DIObjCProperty: an Objective-C property.
Fields
name: Option<MetadataId>Its name.
file: Option<MetadataId>Its file.
getter: Option<MetadataId>Its getter’s name.
setter: Option<MetadataId>Its setter’s name.
ty: Option<MetadataId>Its type.
ImportedEntity
DIImportedEntity: a using declaration or directive.
Fields
scope: Option<MetadataId>Its scope.
entity: Option<MetadataId>What it imports.
name: Option<MetadataId>Its name.
Implementations§
Source§impl DebugNode
impl DebugNode
Sourcepub fn operands(&self) -> Vec<Option<MetadataId>>
pub fn operands(&self) -> Vec<Option<MetadataId>>
The node’s metadata operands in the order LLVM keeps them (MDNode::operands, which numbering the nodes of a
listing walks), strings and null references included.
Sourcepub fn scope(&self) -> Option<MetadataId>
pub fn scope(&self) -> Option<MetadataId>
The scope a local variable or location names (getScope), for finding the subprogram it belongs to.