Skip to main content

DebugNode

Enum DebugNode 

Source
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

§line: u32

The line (0 for none).

§column: u32

The column (0 for none, and where the record’s does not fit in 16 bits).

§scope: MetadataId

The 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

§tag: u32

Its DWARF tag.

§header: Option<MetadataId>

Its header string.

§operands: Vec<Option<MetadataId>>

Its DWARF operands.

§

Subrange

DISubrange: an array dimension.

Fields

§count: i64

The element count (-1 for an unknown count).

§lower_bound: i64

The first index.

§

Enumerator

DIEnumerator: one value of an enumeration.

Fields

§value: i64

Its value.

§name: Option<MetadataId>

Its name.

§

BasicType

DIBasicType: a scalar type.

Fields

§tag: u32

Its DWARF tag (DW_TAG_base_type and DW_TAG_unspecified_type).

§name: Option<MetadataId>

Its name.

§size: u64

Its size in bits.

§align: u64

Its alignment in bits.

§encoding: u32

Its encoding (DW_ATE_*).

§

DerivedType

DIDerivedType: a type made from another (a member, typedef, pointer, qualifier, …).

Fields

§tag: u32

Its DWARF tag.

§name: Option<MetadataId>

Its name.

§file: Option<MetadataId>

Its file.

§line: u32

Its line.

§scope: Option<MetadataId>

Its scope.

§base_type: Option<MetadataId>

The type it derives from.

§size: u64

Its size in bits.

§align: u64

Its alignment in bits.

§offset: u64

Its offset in bits (a member’s).

§flags: u32

Its DIFlag* bits.

§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

§tag: u32

Its DWARF tag.

§name: Option<MetadataId>

Its name.

§file: Option<MetadataId>

Its file.

§line: u32

Its line.

§scope: Option<MetadataId>

Its scope.

§base_type: Option<MetadataId>

Its base type (an array’s elements, an enumeration’s underlying type).

§size: u64

Its size in bits.

§align: u64

Its alignment in bits.

§offset: u64

Its offset in bits.

§flags: u32

Its DIFlag* bits.

§elements: Option<MetadataId>

Its members, enumerators or subranges (a node listing them).

§runtime_lang: u32

Its runtime language (DW_LANG_*, 0 for none).

§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

§flags: u32

Its DIFlag* bits.

§types: Option<MetadataId>

Its return type and parameter types (a node listing them).

§

File

DIFile: a source file.

Fields

§filename: Option<MetadataId>

The file’s name.

§directory: Option<MetadataId>

Its directory.

§

CompileUnit

DICompileUnit: the compilation the program’s debug information describes.

Fields

§language: u32

The source language (DW_LANG_*).

§file: Option<MetadataId>

The main file.

§producer: Option<MetadataId>

The compiler that made it.

§optimized: bool

Whether it was optimized.

§flags: Option<MetadataId>

The compiler’s flags.

§runtime_version: u32

The runtime version.

§split_debug_filename: Option<MetadataId>

The file split debug information goes to.

§emission_kind: u32

How much debug information it emits (1 full, 2 line tables only).

§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.

§dwo_id: u64

The split debug information’s id.

§

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.

§line: u32

Its line.

§ty: Option<MetadataId>

Its type.

§local: bool

It is local to the compilation unit.

§definition: bool

It is a definition.

§scope_line: u32

The line its body’s scope starts at.

§containing_type: Option<MetadataId>

The type holding its virtual table entry.

§virtuality: u32

Its virtuality (DW_VIRTUALITY_*).

§virtual_index: u32

Its index in the virtual table.

§flags: u32

Its DIFlag* bits.

§optimized: bool

It was optimized.

§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.

Fields

§scope: Option<MetadataId>

The enclosing scope.

§file: Option<MetadataId>

Its file.

§line: u32

Its line.

§column: u32

Its column.

§

LexicalBlockFile

DILexicalBlockFile: a part of a scope in another file.

Fields

§scope: Option<MetadataId>

The enclosing scope.

§file: Option<MetadataId>

Its file.

§discriminator: u32

Its discriminator.

§

Namespace

DINamespace: a namespace.

Fields

§scope: Option<MetadataId>

The enclosing scope.

§file: Option<MetadataId>

Its file.

§name: Option<MetadataId>

Its name.

§line: u32

Its line.

§

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.

Fields

§name: Option<MetadataId>

Its name.

§ty: Option<MetadataId>

Its type.

§

TemplateValue

DITemplateValueParameter: a template’s value parameter.

Fields

§tag: u32

Its DWARF tag.

§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.

§line: u32

Its line.

§ty: Option<MetadataId>

Its type.

§local: bool

It is local to the compilation unit.

§definition: bool

It is a definition.

§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

§tag: u32

Its DWARF tag (DW_TAG_auto_variable or DW_TAG_arg_variable).

§scope: Option<MetadataId>

Its scope.

§name: Option<MetadataId>

Its name.

§file: Option<MetadataId>

Its file.

§line: u32

Its line.

§ty: Option<MetadataId>

Its type.

§arg: u32

A parameter’s position (from 1; 0 for a variable).

§flags: u32

Its DIFlag* bits.

§

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.

§line: u32

Its line.

§getter: Option<MetadataId>

Its getter’s name.

§setter: Option<MetadataId>

Its setter’s name.

§attributes: u32

Its attributes.

§ty: Option<MetadataId>

Its type.

§

ImportedEntity

DIImportedEntity: a using declaration or directive.

Fields

§tag: u32

Its DWARF tag.

§scope: Option<MetadataId>

Its scope.

§entity: Option<MetadataId>

What it imports.

§line: u32

Its line.

§name: Option<MetadataId>

Its name.

Implementations§

Source§

impl DebugNode

Source

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.

Source

pub fn scope(&self) -> Option<MetadataId>

The scope a local variable or location names (getScope), for finding the subprogram it belongs to.

Trait Implementations§

Source§

impl Clone for DebugNode

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for DebugNode

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Eq for DebugNode

Source§

impl PartialEq for DebugNode

Source§

fn eq(&self, other: &Self) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for DebugNode

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.