News for hackers. Stuff that matters.
Re:Very funny, gdb. Ve-ery funny by marcosdumay on Saturday January 11, 2014 @01:12PM (#7043205)
That's a "problem" with the compiler, not gdb. Also, the "problem" is that the compiler actually optimized the code, when ordered to do so, instead of just pretending it did (like MS tools do when debuging). It's also a very usefull "problem" to have around.

I really doubt LLDB can discover what code operators execute if the compiler does not include it at the binary.

Re:Very funny, gdb. Ve-ery funny by krakensden on Saturday January 11, 2014 @09:48PM (#7044932)
When debugging optimized C++ in Visual Studio you'll run into the same problem. The 'see ASM' feature is easy enough to use that it helps, but, there's no free lunch.
Re:Very funny, gdb. Ve-ery funny by comex on Saturday January 11, 2014 @06:03PM (#7044178)
Probably the compiler should both inline it and include a standalone version when debugging is enabled.
Re:Very funny, gdb. Ve-ery funny by hdevalence on Saturday January 11, 2014 @07:49PM (#7044595)
No, because you need to debug the code you're actually running, not some other code that's easier to debug.
Re:Very funny, gdb. Ve-ery funny by comex on Saturday January 11, 2014 @10:45PM (#7045072)
I believe we're talking about a function such as std::vector::operator[]. You wouldn't usually be debugging a particular attempt to access an element of a vector, you'd have a vector and want to easily see what's in it, using a debugger-constructed call to the function.