pub trait DebugInfoBuilderMethods<'tcx>: BackendTypes {
Show 13 methods
// Required methods
fn dbg_scope_fn(
&mut self,
instance: Instance<'tcx>,
fn_abi: &FnAbi<'tcx, Ty<'tcx>>,
maybe_definition_llfn: Option<Self::Function>,
) -> Self::DIScope;
fn dbg_create_lexical_block(
&mut self,
pos: BytePos,
parent_scope: Self::DIScope,
) -> Self::DIScope;
fn dbg_location_clone_with_discriminator(
&mut self,
loc: Self::DILocation,
discriminator: u32,
) -> Option<Self::DILocation>;
fn dbg_loc(
&mut self,
scope: Self::DIScope,
inlined_at: Option<Self::DILocation>,
span: Span,
) -> Self::DILocation;
fn extend_scope_to_file(
&mut self,
scope_metadata: Self::DIScope,
file: &SourceFile,
) -> Self::DIScope;
fn create_dbg_var(
&mut self,
variable_name: Symbol,
variable_type: Ty<'tcx>,
scope_metadata: Self::DIScope,
variable_kind: VariableKind,
span: Span,
) -> Self::DIVariable;
fn dbg_var_addr(
&mut self,
dbg_var: Self::DIVariable,
dbg_loc: Self::DILocation,
variable_alloca: Self::Value,
direct_offset: Size,
indirect_offsets: &[Size],
fragment: &Option<Range<Size>>,
);
fn dbg_var_value(
&mut self,
dbg_var: Self::DIVariable,
dbg_loc: Self::DILocation,
value: Self::Value,
direct_offset: Size,
indirect_offsets: &[Size],
fragment: &Option<Range<Size>>,
);
fn set_dbg_loc(&mut self, dbg_loc: Self::DILocation);
fn clear_dbg_loc(&mut self);
fn insert_reference_to_gdb_debug_scripts_section_global(&mut self);
fn set_var_name(&mut self, value: Self::Value, name: &str);
// Provided method
fn with_move_annotation<R>(
&mut self,
_instance: Instance<'tcx>,
f: impl FnOnce(&mut Self) -> R,
) -> R { ... }
}Required Methods§
Sourcefn dbg_scope_fn(
&mut self,
instance: Instance<'tcx>,
fn_abi: &FnAbi<'tcx, Ty<'tcx>>,
maybe_definition_llfn: Option<Self::Function>,
) -> Self::DIScope
fn dbg_scope_fn( &mut self, instance: Instance<'tcx>, fn_abi: &FnAbi<'tcx, Ty<'tcx>>, maybe_definition_llfn: Option<Self::Function>, ) -> Self::DIScope
Creates a scope for a function. If maybe_definition_llfn is None, it’s an inlined
callee; in that case, the implementation may benefit from caching to avoid duplication
within debuginfo. See inlined_function_scopes for an example in rustc_codegen_llvm.
fn dbg_create_lexical_block( &mut self, pos: BytePos, parent_scope: Self::DIScope, ) -> Self::DIScope
fn dbg_location_clone_with_discriminator( &mut self, loc: Self::DILocation, discriminator: u32, ) -> Option<Self::DILocation>
fn dbg_loc( &mut self, scope: Self::DIScope, inlined_at: Option<Self::DILocation>, span: Span, ) -> Self::DILocation
fn extend_scope_to_file( &mut self, scope_metadata: Self::DIScope, file: &SourceFile, ) -> Self::DIScope
Sourcefn create_dbg_var(
&mut self,
variable_name: Symbol,
variable_type: Ty<'tcx>,
scope_metadata: Self::DIScope,
variable_kind: VariableKind,
span: Span,
) -> Self::DIVariable
fn create_dbg_var( &mut self, variable_name: Symbol, variable_type: Ty<'tcx>, scope_metadata: Self::DIScope, variable_kind: VariableKind, span: Span, ) -> Self::DIVariable
Creates a debug variable. Note: a particular parameter of a function can arrive here from
several different (inlined) calls, and those calls may differ in scope_metadata (e.g.
bare subprogram vs file-adjusted scope), type, or file/line. The backend must handle that.
See params_seen in the rustc_codegen_llvm backend for an example.
fn dbg_var_addr( &mut self, dbg_var: Self::DIVariable, dbg_loc: Self::DILocation, variable_alloca: Self::Value, direct_offset: Size, indirect_offsets: &[Size], fragment: &Option<Range<Size>>, )
fn dbg_var_value( &mut self, dbg_var: Self::DIVariable, dbg_loc: Self::DILocation, value: Self::Value, direct_offset: Size, indirect_offsets: &[Size], fragment: &Option<Range<Size>>, )
fn set_dbg_loc(&mut self, dbg_loc: Self::DILocation)
fn clear_dbg_loc(&mut self)
fn insert_reference_to_gdb_debug_scripts_section_global(&mut self)
fn set_var_name(&mut self, value: Self::Value, name: &str)
Provided Methods§
Sourcefn with_move_annotation<R>(
&mut self,
_instance: Instance<'tcx>,
f: impl FnOnce(&mut Self) -> R,
) -> R
fn with_move_annotation<R>( &mut self, _instance: Instance<'tcx>, f: impl FnOnce(&mut Self) -> R, ) -> R
Hook to allow move/copy operations to be annotated for profiling.
The instance parameter should be the monomorphized instance of the
compiler_move or compiler_copy function with the actual type and size.
Default implementation does no annotation (just executes the closure).
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".