Skip to content

Commit

Permalink
Rollup merge of rust-lang#76015 - ortem:fix-lldb-script, r=Mark-Simul…
Browse files Browse the repository at this point in the history
…acrum

Fix loading pretty-printers in rust-lldb script

Pretty-printers loading in `rust-lldb` script was broken in rust-lang#72357

This fixes rust-lang#76006
  • Loading branch information
Dylan-DPC authored Aug 29, 2020
2 parents 214a80b + 9cdcfe2 commit 3de529d
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
1 change: 1 addition & 0 deletions src/bootstrap/dist.rs
Original file line number Diff line number Diff line change
Expand Up @@ -647,6 +647,7 @@ impl Step for DebuggerScripts {

cp_debugger_script("lldb_lookup.py");
cp_debugger_script("lldb_providers.py");
cp_debugger_script("lldb_commands")
}
}
}
Expand Down
1 change: 0 additions & 1 deletion src/etc/lldb_commands
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
command script import \"$RUSTC_SYSROOT/lib/rustlib/etc/lldb_lookup.py\"
type synthetic add -l lldb_lookup.synthetic_lookup -x \".*\" --category Rust
type summary add -F lldb_lookup.summary_lookup -e -x -h \"^(alloc::([a-z_]+::)+)String$\" --category Rust
type summary add -F lldb_lookup.summary_lookup -e -x -h \"^&str$\" --category Rust
Expand Down
5 changes: 4 additions & 1 deletion src/etc/rust-lldb
Original file line number Diff line number Diff line change
Expand Up @@ -30,5 +30,8 @@ EOF
fi
fi

script_import="command script import \"$RUSTC_SYSROOT/lib/rustlib/etc/lldb_lookup.py\""
commands_file="$RUSTC_SYSROOT/lib/rustlib/etc/lldb_commands"

# Call LLDB with the commands added to the argument list
exec "$lldb" --source-before-file ./lldb_commands "$@"
exec "$lldb" --one-line-before-file "$script_import" --source-before-file "$commands_file" "$@"

0 comments on commit 3de529d

Please sign in to comment.