News for hackers. Stuff that matters.
Re:Skipping Boring Functions in Debuggers by Conscat on Wednesday January 01, 2025 @07:57PM (#42570654)
You can also make your own functions skippable by default with either the `[[gnu::artificial]]` or (the newer and more generalized) `[[gnu::nodebug]]` in GCC and Clang.
Re:Skipping Boring Functions in Debuggers by kevingadd on Wednesday January 01, 2025 @08:51PM (#42570919)
In .NET the https://learn.microsoft.com/en-us/dotnet/api/system.diagnost... DebuggerStepThroughAttribute has a similar purpose (though it's ignored if you disable the relevant feature)
Re:Skipping Boring Functions in Debuggers by dataflow on Thursday January 02, 2025 @09:05AM (#42574493)
__declspec(non_user_code) for those wondering about MSVC
Re:Skipping Boring Functions in Debuggers by davelee on Thursday January 02, 2025 @12:40AM (#42571984)
For lldb, checkout the `sif` command. It lets you step into a specific function by name. If the current line is `doFunStuff(a(), b())`, and I want to step past the a and b functions, then I can step into doFunStuff by running `sif Fun`. You could type in the whole name but it works matches by substring.
Re:Skipping Boring Functions in Debuggers by scotty79 on Thursday January 02, 2025 @01:28PM (#42577177)
You could also ctrl+click the function name and put breakpoint on the first line of the function body and press F9 to continue execution.