improve the current debugger autodetection functionality.#153288
Open
Unique-Usman wants to merge 1 commit intorust-lang:mainfrom
Open
improve the current debugger autodetection functionality.#153288Unique-Usman wants to merge 1 commit intorust-lang:mainfrom
Unique-Usman wants to merge 1 commit intorust-lang:mainfrom
Conversation
Collaborator
|
r? @jieyouxu rustbot has assigned @jieyouxu. Use Why was this reviewer chosen?The reviewer was selected based on:
|
Contributor
Author
|
@Kobzol tagging you here. |
hkBst
suggested changes
Mar 2, 2026
| // as a way to explicitly disable ambient gdb discovery. | ||
| let gdb = Cow::Borrowed(gdb); | ||
| return Some(Gdb { gdb }); | ||
| if gdb.as_os_str().is_empty() { |
Member
There was a problem hiding this comment.
There is an unstable is_empty impl on Path that you could use here. Maybe just:
Suggested change
| if gdb.as_os_str().is_empty() { | |
| if gdb.is_empty() { |
Contributor
Author
There was a problem hiding this comment.
bootstrap does not all this feature.
Compiling bootstrap v0.0.0 (/home/uniqueusman/rust/src/bootstrap)
error[E0725]: the feature `path_is_empty` is not in the list of allowed features
--> src/bootstrap/src/lib.rs:19:12
|
19 | #![feature(path_is_empty)]
| ^^^^^^^^^^^^^
| return None; | ||
| } | ||
|
|
||
| let gdb = Cow::Borrowed(Path::new(gdb)); |
Member
There was a problem hiding this comment.
I don't understand what this line is doing. Can you explain why this is necessary?
Contributor
Author
There was a problem hiding this comment.
My bad, the gdb is already &Path, that is redundant, will change.
CDB: - Add support for overriding via `RUSTC_CDB`. - Derive architecture from the target triple instead of `cfg!(target_arch)`. - Search multiple Windows SDK versions (11, 10, 8.1). - Probe both `ProgramFiles(x86)` and `ProgramFiles`. GDB: - Treat empty `config.gdb` as an explicit opt-out. - Extract validation logic into a `verify_gdb` helper. Signed-off-by: Usman Akinyemi <usmanakinyemi202@gmail.com>
ccd7ce3 to
f88c548
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
CDB:
RUSTC_CDB.cfg!(target_arch).ProgramFiles(x86)andProgramFiles.GDB:
config.gdbas an explicit opt-out.verify_gdbhelper.