-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Closed
Labels
A-debuginfoArea: Debugging information in compiled programs (DWARF, PDB, etc.)Area: Debugging information in compiled programs (DWARF, PDB, etc.)A-mir-opt-inliningArea: MIR inliningArea: MIR inliningC-bugCategory: This is a bug.Category: This is a bug.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
For example:
fn main() {
println!("{}", f(std::env::args().count(), 1));
}
#[inline]
pub fn f(x: usize, y: usize) -> usize {
x + y
}
Running rustc -Zinline-mir a.rs -g && gdb ./a
currently results in:
(gdb) break a::f
(gdb) run
Breakpoint 1, a::f () at a.rs:7
7 x + y
(gdb) info args
No arguments.
(gdb) info locals
x = 1
y = 1
It should be more or less as follows:
(gdb) break a::f
(gdb) run
Breakpoint 1, a::f (x=1, y=1) at a.rs:7
7 x + y
(gdb) info args
x = 1
y = 1
(gdb) info locals
No locals.
@rustbot label +A-mir-opt-inlining +A-debuginfo
Metadata
Metadata
Assignees
Labels
A-debuginfoArea: Debugging information in compiled programs (DWARF, PDB, etc.)Area: Debugging information in compiled programs (DWARF, PDB, etc.)A-mir-opt-inliningArea: MIR inliningArea: MIR inliningC-bugCategory: This is a bug.Category: This is a bug.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.