summaryrefslogtreecommitdiffstats
path: root/src/usr/hwpf/ifcompiler/initSymbols.C
diff options
context:
space:
mode:
authorCamVan Nguyen <ctnguyen@us.ibm.com>2012-07-03 12:03:05 -0500
committerA. Patrick Williams III <iawillia@us.ibm.com>2012-07-10 13:52:29 -0500
commit5151c0b22f5d470008e19307e3b11fb848a2d9a5 (patch)
treeab384c98770665f153bf983513016a9617156367 /src/usr/hwpf/ifcompiler/initSymbols.C
parenta480d37a977518ff1075fc50d67a97f54663873d (diff)
downloadtalos-hostboot-5151c0b22f5d470008e19307e3b11fb848a2d9a5.tar.gz
talos-hostboot-5151c0b22f5d470008e19307e3b11fb848a2d9a5.zip
SCOM Initfile: Improve error and debug tracing in the initfile compiler error/debug paths.
Fix miscellaneous bugs. Change-Id: I9ca5f870a756a6be2924f3d9e1c0750b2ce1e0ab RTC: 43488 Reviewed-on: http://gfw160.austin.ibm.com:8080/gerrit/1290 Tested-by: Jenkins Server Reviewed-by: MIKE J. JONES <mjjones@us.ibm.com> Reviewed-by: Douglas R. Gilbert <dgilbert@us.ibm.com> Reviewed-by: A. Patrick Williams III <iawillia@us.ibm.com>
Diffstat (limited to 'src/usr/hwpf/ifcompiler/initSymbols.C')
-rwxr-xr-xsrc/usr/hwpf/ifcompiler/initSymbols.C65
1 files changed, 50 insertions, 15 deletions
diff --git a/src/usr/hwpf/ifcompiler/initSymbols.C b/src/usr/hwpf/ifcompiler/initSymbols.C
index 3a14f0fe0..7967c06d3 100755
--- a/src/usr/hwpf/ifcompiler/initSymbols.C
+++ b/src/usr/hwpf/ifcompiler/initSymbols.C
@@ -1,17 +1,26 @@
-// IBM_PROLOG_BEGIN_TAG
-// This is an automatically generated prolog.
-//
-// $Source: /afs/awd/projects/eclipz/KnowledgeBase/.cvsroot/eclipz/ifcompiler/initSymbols.C,v $
-//
-// IBM CONFIDENTIAL
-//
-// COPYRIGHT International Business Machines Corp. 2010,2010
-//
-//UNDEFINED
-//
-// Origin: UNDEFINED
-//
-// IBM_PROLOG_END_TAG
+/* IBM_PROLOG_BEGIN_TAG
+ * This is an automatically generated prolog.
+ *
+ * $Source: src/usr/hwpf/ifcompiler/initSymbols.C $
+ *
+ * IBM CONFIDENTIAL
+ *
+ * COPYRIGHT International Business Machines Corp. 2010-2012
+ *
+ * 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_TAG
+ */
// Change Log *************************************************************************************
//
// Flag Track Userid Date Description
@@ -29,6 +38,8 @@
// Support defines for bits, scom_data and attribute columns
// Delete obsolete code for defines support
// camvanng 05/07/12 Support for associated target attributes
+// camvanng 06/27/12 Improve error and debug tracing
+// Add get_numeric_array_data()
// End Change Log *********************************************************************************
/**
@@ -67,7 +78,8 @@ Symbols::Symbols(FILELIST & i_filenames)
if(!infs)
{
errss.str("");
- errss << "ERROR - Could not open " << *fn;
+ errss << "ERROR! Symbols::Symbols: Could not open "
+ << *fn << endl;
throw invalid_argument(errss.str());
}
while(getline(infs,fileline))
@@ -575,6 +587,29 @@ uint64_t Symbols::get_numeric_data(uint32_t i_rpn_id, uint32_t & o_size)
}
// ------------------------------------------------------------------------------------------------
+
+uint64_t Symbols::get_numeric_array_data(uint32_t i_rpn_id, uint32_t & o_size)
+{
+ uint64_t data = 0;
+ o_size = 0;
+ uint32_t offset = i_rpn_id - Rpn::ARRAY_INDEX;
+ if(offset < iv_lits.size())
+ {
+ LIT_DATA d = iv_lits[offset];
+ data = d.first;
+ o_size = d.second;
+ }
+ else
+ {
+ ostringstream err;
+ err << hex;
+ err << "ERROR! - Symbols::get_numeric_array_data() invalid arg rpn_id = " << i_rpn_id << endl;
+ throw invalid_argument(err.str());
+ }
+ return data;
+}
+
+// ------------------------------------------------------------------------------------------------
uint64_t Symbols::get_attr_enum_val(string & i_attr_enum)
{
return iv_attr_enum[i_attr_enum];
OpenPOWER on IntegriCloud