Are there any plans for standardized backtrace and other debugging utilities to be added to C++14 (or above), or will it continue to be a functionality added by OS or compiler?
No. There are no plans.
For one the standard does not specify how function calls are to be made. And in all actuality this is dependent upon the hardware. You probably dont know this but there is hardware out there that does not push return addresses onto a stack. Some of them use dynamic jmp instructions, and others use return queues to keep track of return addressees.
The stack trace which you're referring to is possible on a, albeit large, subset of processors, but since C and C++ was intended to run on as many processors as possible it will not, can not, define a standard way of performing a back trace which would dictate how hardware should be manufactured.
As Dan said, no backtrace and no plan to do it, up to my knowledge. About debugging utilities, besides asserts I only know standard macros inherited from C, like
For instance
1. #include <iostream>
2.
3. int main() {
4. std::cout << "File " << __FILE__ << ", line " << __LINE__ << std::endl;
5. }
will output
File /path/your_bin, line 4
More details here: http://gcc.gnu.org/onlinedocs/cpp/Standard-Predefined-Macros.html
You can get a pretty good overview of what is going into the next standard by looking at the documents published by the standards committee:
http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2014/
There you can find proposals written by various people, meeting minutes, draft standards, and issue lists.
Given the status of C++14, the draft standards is the most informative document for your particular question. Short answer: there's nothing new for debugging in there.
There was a paper about stack traces back in 2012:
http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2012/n3441.html
However, it doesn't seem to have left any traces in the actual standard. If you want to find out more, you could try reading the minutes of the meetings around there, or contact the paper's author - not everything is recorded in the meetings, just the sessions where everyone gets together and votes, but not the work of individual groups.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With