Write .debug_frame information (#53)
* Write .debug_frame information * mv map_reg
This commit is contained in:
56
src/obj.rs
56
src/obj.rs
@@ -79,30 +79,37 @@ pub fn compile_to_obj(
|
||||
};
|
||||
|
||||
// TODO: use the traps information
|
||||
let (compilation, relocations, address_transform, value_ranges, stack_slots, _traps) =
|
||||
match strategy {
|
||||
Strategy::Auto | Strategy::Cranelift => Cranelift::compile_module(
|
||||
&module,
|
||||
&module_translation,
|
||||
lazy_function_body_inputs,
|
||||
&*isa,
|
||||
debug_info,
|
||||
cache_config,
|
||||
),
|
||||
#[cfg(feature = "lightbeam")]
|
||||
Strategy::Lightbeam => Lightbeam::compile_module(
|
||||
&module,
|
||||
&module_translation,
|
||||
lazy_function_body_inputs,
|
||||
&*isa,
|
||||
debug_info,
|
||||
cache_config,
|
||||
),
|
||||
#[cfg(not(feature = "lightbeam"))]
|
||||
Strategy::Lightbeam => bail!("lightbeam support not enabled"),
|
||||
other => bail!("unsupported compilation strategy {:?}", other),
|
||||
}
|
||||
.context("failed to compile module")?;
|
||||
let (
|
||||
compilation,
|
||||
relocations,
|
||||
address_transform,
|
||||
value_ranges,
|
||||
stack_slots,
|
||||
_traps,
|
||||
frame_layouts,
|
||||
) = match strategy {
|
||||
Strategy::Auto | Strategy::Cranelift => Cranelift::compile_module(
|
||||
&module,
|
||||
&module_translation,
|
||||
lazy_function_body_inputs,
|
||||
&*isa,
|
||||
debug_info,
|
||||
cache_config,
|
||||
),
|
||||
#[cfg(feature = "lightbeam")]
|
||||
Strategy::Lightbeam => Lightbeam::compile_module(
|
||||
&module,
|
||||
&module_translation,
|
||||
lazy_function_body_inputs,
|
||||
&*isa,
|
||||
debug_info,
|
||||
cache_config,
|
||||
),
|
||||
#[cfg(not(feature = "lightbeam"))]
|
||||
Strategy::Lightbeam => bail!("lightbeam support not enabled"),
|
||||
other => bail!("unsupported compilation strategy {:?}", other),
|
||||
}
|
||||
.context("failed to compile module")?;
|
||||
|
||||
if compilation.is_empty() {
|
||||
bail!("no functions were found/compiled");
|
||||
@@ -144,6 +151,7 @@ pub fn compile_to_obj(
|
||||
&debug_data,
|
||||
&address_transform,
|
||||
&value_ranges,
|
||||
&frame_layouts,
|
||||
)
|
||||
.context("failed to emit debug sections")?;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user