diff options
| author | Terry J. Opie <opiet@us.ibm.com> | 2011-10-18 14:06:28 -0500 |
|---|---|---|
| committer | Terry J. Opie <opiet@us.ibm.com> | 2011-12-01 09:55:33 -0600 |
| commit | 1de45373ef02d33ae6a97c583db3b6d1db9bce1c (patch) | |
| tree | 180c24555b3a4dbc32206da2f1312ecd503624ba /src/include/usr/errl | |
| parent | ac378e7e2f4debe9e53dc0a68dbf6aaa225a6660 (diff) | |
| download | blackbird-hostboot-1de45373ef02d33ae6a97c583db3b6d1db9bce1c.tar.gz blackbird-hostboot-1de45373ef02d33ae6a97c583db3b6d1db9bce1c.zip | |
Error Log Backtrace Support
This code collects the addresses for each of the frames, but does not
parse the data. The support to do this isn't available in the errl
parser as of yet.
Change-Id: I4804ab100fc376e26ef908c472c94202b4642aac
Reviewed-on: http://gfw160.austin.ibm.com:8080/gerrit/515
Tested-by: Jenkins Server
Reviewed-by: Terry J. Opie <opiet@us.ibm.com>
Diffstat (limited to 'src/include/usr/errl')
| -rwxr-xr-x | src/include/usr/errl/backtrace.H | 60 | ||||
| -rw-r--r-- | src/include/usr/errl/errlentry.H | 4 |
2 files changed, 61 insertions, 3 deletions
diff --git a/src/include/usr/errl/backtrace.H b/src/include/usr/errl/backtrace.H new file mode 100755 index 000000000..5db0081d3 --- /dev/null +++ b/src/include/usr/errl/backtrace.H @@ -0,0 +1,60 @@ +// IBM_PROLOG_BEGIN_TAG +// This is an automatically generated prolog. +// +// $Source: src/include/usr/errl/backtrace.H $ +// +// IBM CONFIDENTIAL +// +// COPYRIGHT International Business Machines Corp. 2011 +// +// p1 +// +// Object Code Only (OCO) source materials +// Licensed Internal Code Source Materials +// IBM HostBoot Licensed Internal Code +// +// The source code for this program is not published or other- +// wise divested of its trade secrets, irrespective of what has +// been deposited with the U.S. Copyright Office. +// +// Origin: 30 +// +// IBM_PROLOG_END +#ifndef __BACKTRACE_H +#define __BACKTRACE_H +/** + * @file backtrace.H + * + * @brief Backtrace support for errorlog classes. + * This header provides the interfaces for errorlog, or any other user + * code to gather backtraces for the current location in the code. + * + */ + +/*****************************************************************************/ +// I n c l u d e s +/*****************************************************************************/ +#include <stdint.h> +#include <errl/errltypes.H> +#include <vector> + + +namespace ERRORLOG +{ + +/** +* @brief This function will be called during errorlog creation and will +* add an FFDC section that contains the addresses needed for +* decoding the backtrace at a later time. The later time would be +* when error log details are printed. +* +* @param[out] i_addrVector - Vector of addresses collected. +* +* @return None. +*/ +void collectBacktrace ( std::vector<uint64_t> & o_addrVector ); + + +} // End namespace + +#endif //__BACKTRACE_H diff --git a/src/include/usr/errl/errlentry.H b/src/include/usr/errl/errlentry.H index b3e856996..330a8a813 100644 --- a/src/include/usr/errl/errlentry.H +++ b/src/include/usr/errl/errlentry.H @@ -466,6 +466,7 @@ private: ErrlUH iv_User; // user header object ErrlSrc iv_Src; // primary SRC section std::vector<ErrlUD*> iv_SectionVector; // list of user defined sections + std::vector<uint64_t> iv_btAddrs; // list of addresses for the backtrace // TODO need to interpret term state and terminate accordingly. // TODO termstate is presently not being flattend into PEL @@ -555,9 +556,6 @@ inline void ErrlEntry::setSrcType(const srcType_t i_srcType) return; } - - - } // End namespace #endif //ERRLENTRY_H |

