-
Notifications
You must be signed in to change notification settings - Fork 12.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Auto merge of #74105 - npmccallum:naked, r=matthewjasper
Suppress debuginfo on naked function arguments A function that has no prologue cannot be reasonably expected to support debuginfo. In fact, the existing code (before this patch) would generate invalid instructions that caused crashes. We can solve this easily by just not emitting the debuginfo in this case. Fixes #42779 cc #32408
- Loading branch information
Showing
3 changed files
with
53 additions
and
3 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
// min-lldb-version: 310 | ||
|
||
// We have to ignore android because of this issue: | ||
// https://github.com/rust-lang/rust/issues/74847 | ||
// ignore-android | ||
|
||
// compile-flags:-g | ||
|
||
// === GDB TESTS =================================================================================== | ||
|
||
// gdb-command:run | ||
|
||
// gdb-command:info args | ||
// gdb-check:No arguments. | ||
// gdb-command:continue | ||
|
||
// === LLDB TESTS ================================================================================== | ||
|
||
// lldb-command:run | ||
|
||
// lldb-command:frame variable | ||
// lldbg-check:(unsigned long) = 111 (unsigned long) = 222 | ||
// lldbr-check:(unsigned long) = 111 (unsigned long) = 222 | ||
// lldb-command:continue | ||
|
||
|
||
#![feature(naked_functions)] | ||
#![feature(omit_gdb_pretty_printer_section)] | ||
#![omit_gdb_pretty_printer_section] | ||
|
||
fn main() { | ||
naked(111, 222); | ||
} | ||
|
||
#[naked] | ||
fn naked(x: usize, y: usize) { | ||
zzz(); // #break | ||
} | ||
|
||
fn zzz() { () } |