Generate debug info for LLDB/GDB (#50)
* Transform DWARF sections into native format for wasm2obj and wasmtime. Generate DWARF sections based on WASM DWARF. Ignore some of debug_info/debug_line for dead code. * Fix test
This commit is contained in:
committed by
Dan Gohman
parent
6eb09d9edd
commit
ddbc00752e
@@ -59,13 +59,14 @@ including calling the start function if one is present. Additional functions
|
||||
given with --invoke are then called.
|
||||
|
||||
Usage:
|
||||
wasmtime [-od] <file>...
|
||||
wasmtime [-od] <file>... --invoke=<fn>
|
||||
wasmtime [-odg] <file>...
|
||||
wasmtime [-odg] <file>... --invoke=<fn>
|
||||
wasmtime --help | --version
|
||||
|
||||
Options:
|
||||
--invoke=<fn> name of function to run
|
||||
-o, --optimize runs optimization passes on the translated functions
|
||||
-g generate debug information
|
||||
-d, --debug enable debug output on stderr/stdout
|
||||
-h, --help print this help message
|
||||
--version print the Cranelift version
|
||||
@@ -76,6 +77,7 @@ struct Args {
|
||||
arg_file: Vec<String>,
|
||||
flag_optimize: bool,
|
||||
flag_debug: bool,
|
||||
flag_g: bool,
|
||||
flag_invoke: Option<String>,
|
||||
}
|
||||
|
||||
@@ -137,6 +139,9 @@ fn main() {
|
||||
instantiate_spectest().expect("instantiating spectest"),
|
||||
);
|
||||
|
||||
// Enable/disable producing of debug info.
|
||||
context.set_debug_info(args.flag_g);
|
||||
|
||||
for filename in &args.arg_file {
|
||||
let path = Path::new(&filename);
|
||||
match handle_module(&mut context, &args, path) {
|
||||
|
||||
Reference in New Issue
Block a user