Added stack traces and better error reporting in C++

When an error is reported or an assertion fails in C++, a line is now
printed with information about where the error occured, and a stack trace
is printed.

The stacktrace isn't implemented in the HAL because it's not
hardware-dependent, so StackTrace.hpp and StackTrace.cpp are gone.

The Eclipse project template is modified to include "-export-dynamic" in
the linker options, which is necessary for stack traces.

Change-Id: Ie86c14185b13ed603d0fe6467e87ba4f731b1913
This commit is contained in:
Thomas Clark
2014-07-28 16:25:37 -04:00
parent 338120c3a5
commit 89fe909ae6
9 changed files with 162 additions and 156 deletions

View File

@@ -58,6 +58,7 @@
</option>
<option id="gnu.cpp.link.option.flags.1747959472" name="Linker flags" superClass="gnu.cpp.link.option.flags" value="-Wl,-rpath-link,$cpp-location/lib" valueType="string"/>
<option id="gnu.cpp.link.option.other.1891020896" name="Other options (-Xlinker [option])" superClass="gnu.cpp.link.option.other" valueType="stringList">
<listOptionValue builtIn="false" value="-export-dynamic"/>
</option>
<inputType id="cdt.managedbuild.tool.gnu.cpp.linker.input.1757265359" superClass="cdt.managedbuild.tool.gnu.cpp.linker.input">
<additionalInput kind="additionalinputdependency" paths="$(USER_OBJS)"/>