Add null pointer check to FFDC gathering functions
Add null pointer check to FFDC gathering functions

Hardware procedure error classes are generated from XML
descriptions. For each error type, these descriptions contain a list
of member pointer variables (contained in instances of ffdc_t) which
need to be set by anyone who creates an error of that type, e.g. with
FAPI_ASSERT.

These member pointers default to NULL. If a programmer forgets to set
all the variables on the error, or if a variable is added to the error
class via the XML and the code that creates the error is not updated
to set the new variable, the code can crash dereferencing the NULL
pointer that the member defaulted to.

This commit adds a check when using those member pointers so that,
instead of crashing on a NULL pointer dereference, the code will log
an error message and indicating that there is a bug in the creation of
the error.

Change-Id: Ic7d57feee09dbc9f5025c6a6afa640bce48913d0
Reviewed-on: http://rchgit01.rchland.ibm.com/gerrit1/119175
Tested-by: Jenkins Server <8e3f934e4c44875bc48d33da3ea13d93ba9a233f@us.ibm.com>
Tested-by: FSP CI Jenkins <aa9e4d9ac7cd25905e9c0dd36d4150516e73dd86@us.ibm.com>
Reviewed-by: Daniel M Crowell <912029ca9254ac7b5854e56910561d682e1fa2d0@us.ibm.com>
Tested-by: Hostboot CI <52521565bd8ea18a2b112942dce4f4220a97c2c8@us.ibm.com>
Tested-by: HWSV CI <ae069ce3805842f4ed79e0ef7868baadb5df0a6b@us.ibm.com>
Reviewed-by: Kahn C Evans <88417bcf564329fca88ff3071c3628a57ed3e5c7@us.ibm.com>
Reviewed-by: DAVID A KING <241f1f4ee5f6dce3dee9d32f9bce7010bca210e5@us.ibm.com>
Reviewed-on: http://rchgit01.rchland.ibm.com/gerrit1/119204
Tested-by: Jenkins OP Build CI <e610bd72261d3c0a48f1e8ae36832ab00774d426@us.ibm.com>
Tested-by: Jenkins OP HW <0eb0fff262f74a65a832afbcc7b153e391c9a3fd@us.ibm.com>
Tested-by: Jenkins Combined Simics CI <8312af3886dfc9bb930f549023677220805b137e@us.ibm.com>

open-power/hostboot,open-power/hostboot,open-power/hostboot,open-power/hostboot,open-power/hostboot