Repository navigation
Closed
Labels
A-debuginfoArea: Debugging information in compiled programs (DWARF, PDB, etc.)Area: Debugging information in compiled programs (DWARF, PDB, etc.)A-testsuiteArea: The testsuite used to check the correctness of rustcArea: The testsuite used to check the correctness of rustcC-bugCategory: This is a bug.Category: This is a bug.O-macosOperating system: macOSOperating system: macOST-bootstrapRelevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.
Description
Summary
The test in tests/debuginfo/path.rs is failing on the main branch on my computer.
Command used
./x test debuginfo -- path.rsExpected behaviour
Test passes
Actual behaviour
Test fails. See log below.
Notable output include:
warning: `po` was unsuccessful, running `p` instead
and
warning: This version of LLDB has no plugin for the language "rust". Inspection of frame variables will be limited.
Bootstrap configuration (bootstrap.toml)
# See bootstrap.example.toml for documentation of available options
#
profile = "library" # Includes one of the default files in src/bootstrap/defaults
change-id = 154587Operating system
MacOS Tahoe 26.4
HEAD
Additional context
Build Log
Building bootstrap
Finished `dev` profile [unoptimized] target(s) in 0.25s
/Users/timc/rust/build/aarch64-apple-darwin/ci-llvm/bin/llvm-strip does not exist; skipping copy
Building stage1 compiler artifacts (stage0 -> stage1, aarch64-apple-darwin)
Finished `release` profile [optimized] target(s) in 0.50s
Creating a sysroot for stage1 compiler (use `rustup toolchain link 'name' build/host/stage1`)
Building stage1 library artifacts (stage1 -> stage1, aarch64-apple-darwin)
Finished `dist` profile [optimized] target(s) in 0.03s
Building stage1 compiletest (stage0 -> stage1, aarch64-apple-darwin)
Finished `release` profile [optimized] target(s) in 0.20s
Testing stage1 with compiletest suite=debuginfo mode=debuginfo (aarch64-apple-darwin)
running 1 tests
[debuginfo-lldb] tests/debuginfo/path.rs ... F
failures:
---- [debuginfo-lldb] tests/debuginfo/path.rs stdout ----
NOTE: compiletest thinks it is using LLDB version 2100
error: check directive(s) from `/Users/timc/rust/tests/debuginfo/path.rs` not found in debugger output. errors:
(path.rs:12) `"/some/path"`
(path.rs:16) `"/some/path"`
the following subset of check directive(s) was found successfully:
(path.rs:10) `(std::path::PathBuf) "/some/path" { inner = "/some/path" { inner = { inner = size=10 { [0] = '/' [1] = 's' [2] = 'o' [3] = 'm' [4] = 'e' [5] = '/' [6] = 'p' [7] = 'a' [8] = 't' [9] = 'h' } } } } `
(path.rs:14) `(&std::path::Path) "/some/path" { data_ptr = 0x0000000100000b58 length = 10 } `
status: exit status: 0
command: LLDB_BATCHMODE_SCRIPT_PATH="/Users/timc/rust/build/aarch64-apple-darwin/test/debuginfo/path.lldb/path.debugger.script" LLDB_BATCHMODE_TARGET_PATH="/Users/timc/rust/build/aarch64-apple-darwin/test/debuginfo/path.lldb/a" PATH="/Users/timc/rust/build/aarch64-apple-darwin/stage1/lib/rustlib/aarch64-apple-darwin/lib:/opt/homebrew/opt/rustup/bin:/opt/homebrew/bin:/opt/homebrew/sbin:/usr/local/bin:/System/Cryptexes/App/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/local/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/appleinternal/bin:/opt/pkg/env/active/bin:/opt/pmk/env/global/bin:/Applications/iTerm.app/Contents/Resources/utilities" PYTHONPATH="/Users/timc/rust/src/etc" PYTHONUNBUFFERED="1" "lldb" "--one-line" "script --language python -- import lldb_batchmode; lldb_batchmode.main()"
--- stdout -------------------------------
(lldb) script --language python -- import lldb_batchmode; lldb_batchmode.main()
LLDB batch-mode script
----------------------
Debugger commands script is '/Users/timc/rust/build/aarch64-apple-darwin/test/debuginfo/path.lldb/path.debugger.script'.
Target executable is '/Users/timc/rust/build/aarch64-apple-darwin/test/debuginfo/path.lldb/a'.
Current working directory is '/Users/timc/rust'
Creating a target for '/Users/timc/rust/build/aarch64-apple-darwin/test/debuginfo/path.lldb/a'
settings set auto-confirm true
settings set target.inherit-tcc true
version
lldb-2100.0.17.108 Apple Swift version 6.3.2 (swiftlang-6.3.2.1.108 clang-2100.1.1.101)
command script import /Users/timc/rust/src/etc/lldb_lookup.py
# LLDB iterates through these in reverse order to discover summaries/synthetics that means the top
# of the list can be "overwritten" by items lower on the list. Be careful when reordering items.
# Forces test-compliant formatting to all other types
type synthetic add -l lldb_lookup.synthetic_lookup -x ".*" --category Rust
# Std String
type synthetic add -l lldb_lookup.StdStringSyntheticProvider -x "^(alloc::([a-z_]+::)+)String$" --category Rust
type summary add -F lldb_lookup.StdStringSummaryProvider -e -x -h "^(alloc::([a-z_]+::)+)String$" --category Rust
# Std str
type synthetic add -l lldb_lookup.StdSliceSyntheticProvider -x "^&(mut )?str$" --category Rust
type summary add -F lldb_lookup.StdStrSummaryProvider -e -x -h "^&(mut )?str$" --category Rust
## MSVC
type synthetic add -l lldb_lookup.MSVCStrSyntheticProvider -x "^ref(_mut)?\$<str\$>$" --category Rust
type summary add -F lldb_lookup.StdStrSummaryProvider -e -h -x "^ref(_mut)?\$<str\$>$" --category Rust
# Array/Slice
type synthetic add -l lldb_lookup.StdSliceSyntheticProvider -x "^&(mut )?\\[.+\\]$" --category Rust
type summary add -F lldb_lookup.SizeSummaryProvider -e -x -h "^&(mut )?\\[.+\\]$" --category Rust
## MSVC
type synthetic add -l lldb_lookup.MSVCStdSliceSyntheticProvider -x "^ref(_mut)?\$<slice2\$<.+> >" --category Rust
type summary add -F lldb_lookup.StdSliceSummaryProvider -e -x -h "^ref(_mut)?\$<slice2\$<.+> >" --category Rust
# OsString
type summary add -F lldb_lookup.StdOsStringSummaryProvider -e -x -h "^(std::ffi::([a-z_]+::)+)OsString$" --category Rust
# Vec
type synthetic add -l lldb_lookup.StdVecSyntheticProvider -x "^(alloc::([a-z_]+::)+)Vec<.+>$" --category Rust
type summary add -F lldb_lookup.SizeSummaryProvider -e -x -h "^(alloc::([a-z_]+::)+)Vec<.+>$" --category Rust
# VecDeque
type synthetic add -l lldb_lookup.StdVecDequeSyntheticProvider -x "^(alloc::([a-z_]+::)+)VecDeque<.+>$" --category Rust
type summary add -F lldb_lookup.SizeSummaryProvider -e -x -h "^(alloc::([a-z_]+::)+)VecDeque<.+>$" --category Rust
# HashMap
type synthetic add -l lldb_lookup.classify_hashmap -x "^(std::collections::([a-z_]+::)+)HashMap<.+>$" --category Rust
type summary add -F lldb_lookup.SizeSummaryProvider -e -x -h "^(std::collections::([a-z_]+::)+)HashMap<.+>$" --category Rust
# HashSet
type synthetic add -l lldb_lookup.classify_hashset -x "^(std::collections::([a-z_]+::)+)HashSet<.+>$" --category Rust
type summary add -F lldb_lookup.SizeSummaryProvider -e -x -h "^(std::collections::([a-z_]+::)+)HashSet<.+>$" --category Rust
# Rc
type synthetic add -l lldb_lookup.StdRcSyntheticProvider -x "^(alloc::([a-z_]+::)+)Rc<.+>$" --category Rust
type summary add -F lldb_lookup.StdRcSummaryProvider -e -x -h "^(alloc::([a-z_]+::)+)Rc<.+>$" --category Rust
# Arc
type synthetic add -l lldb_lookup.arc_synthetic -x "^(alloc::([a-z_]+::)+)Arc<.+>$" --category Rust
type summary add -F lldb_lookup.StdRcSummaryProvider -e -x -h "^(alloc::([a-z_]+::)+)Arc<.+>$" --category Rust
# Cell
type synthetic add -l lldb_lookup.StdCellSyntheticProvider -x "^(core::([a-z_]+::)+)Cell<.+>$" --category Rust
# RefCell
type synthetic add -l lldb_lookup.StdRefSyntheticProvider -x "^(core::([a-z_]+::)+)Ref(Cell|Mut)?<.+>$" --category Rust
type summary add -F lldb_lookup.StdRefSummaryProvider -e -x -h "^(core::([a-z_]+::)+)Ref(Cell|Mut)?<.+>$" --category Rust
# NonZero
type summary add -F lldb_lookup.StdNonZeroNumberSummaryProvider -e -x -h "^(core::([a-z_]+::)+)NonZero(<.+>|I\d{0,3}|U\d{0,3})$" --category Rust
# PathBuf
type summary add -F lldb_lookup.StdPathBufSummaryProvider -e -x -h "^(std::([a-z_]+::)+)PathBuf$" --category Rust
# Path
type summary add -F lldb_lookup.StdPathSummaryProvider -e -x -h "^&(mut )?(std::([a-z_]+::)+)Path$" --category Rust
# Enum
# type summary add -F lldb_lookup.ClangEncodedEnumSummaryProvider -e -h "lldb_lookup.is_sum_type_enum" --recognizer-function --category Rust
## MSVC
type synthetic add -l lldb_lookup.MSVCEnumSyntheticProvider -x "^enum2\$<.+>$" --category Rust
type summary add -F lldb_lookup.MSVCEnumSummaryProvider -e -x -h "^enum2\$<.+>$" --category Rust
## MSVC Variants
type synthetic add -l lldb_lookup.synthetic_lookup -x "^enum2\$<.+>::.*$" --category Rust
# Tuple
type synthetic add -l lldb_lookup.TupleSyntheticProvider -x "^\(.*\)$" --category Rust
type summary add -F lldb_lookup.TupleSummaryProvider -x "^\(.*\)$" --category Rust
## MSVC
type synthetic add -l lldb_lookup.MSVCTupleSyntheticProvider -x "^tuple\$<.+>$" --category Rust
type summary add -F lldb_lookup.TupleSummaryProvider -e -x -h "^tuple\$<.+>$" --category Rust
type category enable Rust
breakpoint set --file 'path.rs' --line 24
DEBUG: breakpoint added, id = 1
Breakpoint 1: where = a`path::main + 52 at path.rs:24:5, address = 0x000000010000096c
DEBUG: registering breakpoint callback, id = 1
Error while trying to register breakpoint callback, id = 1, message = error: could not get num args: can't find callable: breakpoint_callback
run
Process 25396 launched: '/Users/timc/rust/build/aarch64-apple-darwin/test/debuginfo/path.lldb/a' (arm64) Process 25396 stopped * thread #1, name = 'main', queue = 'com.apple.main-thread', stop reason = breakpoint 1.1 frame #0: 0x000000010000096c a`path::main at path.rs:24:5 21 let path = Path::new("/some/path"); 22 let pathbuf = path.to_path_buf(); 23 -> 24 zzz(); // #break ^ 25 } 26 27 fn zzz() { Target 0: (a) stopped.
print pathbuf
(std::path::PathBuf) "/some/path" { inner = "/some/path" { inner = { inner = size=10 { [0] = '/' [1] = 's' [2] = 'o' [3] = 'm' [4] = 'e' [5] = '/' [6] = 'p' [7] = 'a' [8] = 't' [9] = 'h' } } } }
po pathbuf
warning: `po` was unsuccessful, running `p` instead (std::path::PathBuf) "/some/path" { inner = "/some/path" { inner = { inner = size=10 { [0] = '/' [1] = 's' [2] = 'o' [3] = 'm' [4] = 'e' [5] = '/' [6] = 'p' [7] = 'a' [8] = 't' [9] = 'h' } } } }
print path
(&std::path::Path) "/some/path" { data_ptr = 0x0000000100000b58 length = 10 }
po path
warning: `po` was unsuccessful, running `p` instead (&std::path::Path) "/some/path" { data_ptr = 0x0000000100000b58 length = 10 }
quit
------------------------------------------
--- stderr -------------------------------
warning: This version of LLDB has no plugin for the language "rust". Inspection of frame variables will be limited.
------------------------------------------
---- [debuginfo-lldb] tests/debuginfo/path.rs stdout end ----
failures:
[debuginfo-lldb] tests/debuginfo/path.rs
test result: FAILED. 0 passed; 1 failed; 0 ignored; 0 measured; 172 filtered out; finished in 1.83s
Some tests failed in compiletest suite=debuginfo mode=debuginfo host=aarch64-apple-darwin target=aarch64-apple-darwin
Build completed unsuccessfully in 0:00:05Output of lldb --version:
lldb-2100.0.17.108
Apple Swift version 6.3.2 (swiftlang-6.3.2.1.108 clang-2100.1.1.101)
Metadata
Metadata
Assignees
Labels
A-debuginfoArea: Debugging information in compiled programs (DWARF, PDB, etc.)Area: Debugging information in compiled programs (DWARF, PDB, etc.)A-testsuiteArea: The testsuite used to check the correctness of rustcArea: The testsuite used to check the correctness of rustcC-bugCategory: This is a bug.Category: This is a bug.O-macosOperating system: macOSOperating system: macOST-bootstrapRelevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.
Activity
jieyouxu commentedon May 20, 2026
@theemathas do you happen to know if that worked for you previously? Or is it from a newer lldb version?
jieyouxu commentedon May 20, 2026
Yeah, I can repro locally too with
jieyouxu commentedon May 20, 2026
jieyouxu commentedon May 20, 2026
(I can't look into this during this week, but I'll try to take a look next week.)
theemathas commentedon May 21, 2026
This issue happened on a brand new laptop.
theemathas commentedon May 21, 2026
Also reproduces on a different laptop with
I've ran all tests on this laptop before, but it has been a while, so I don't know what might have changed since then. Maybe it's the MacOS upgrade from Sequoia to Tahoe?
jieyouxu commentedon May 22, 2026
Current investigation notes:
Error while trying to register breakpoint callback, id = 1, message = error: could not get num args: can't find callable: breakpoint_callbackis another point of interest. The callback registration fails AFAICT because at the point in lldb batchmode script, the execution context (or whatever) doesn't actually havelldb_batchmode.pyitself loaded? EDIT: but this does not fail with vanilla lldb I think?pois failing 🤔jieyouxu commentedon May 22, 2026
jieyouxu commentedon May 22, 2026
jieyouxu commentedon May 23, 2026
Did some more digging, see #156769 (comment). TL;DR: I believe the check relied on silent fallback behavior for something that never "properly" worked, and the fallback became no longer silent (produces a warning on newer lldb) which causes the "exact" check to of course fail.
Rollup merge of rust-lang#156769 - fallofpheonix:fix-path-lldb-macos,…
Auto merge of #156769 - fallofpheonix:fix-path-lldb-macos, r=jieyouxu