From 0e138b0da002197cc86f601be5b307386a5fdfab Mon Sep 17 00:00:00 2001 From: Dan Crowell Date: Tue, 20 Mar 2018 09:20:17 -0500 Subject: Modify debug framework to be build-independent During boot, Hostboot will push key pointers into memory. This allows the debug tools to find the pointers (using a known static memory address) to base memory accesses on. This replaces the existing symbol lookup that we use now. That means we don't need to have the exact symbol file for the build we're debugging against. Change-Id: I4618e15a3dc90acc3a89520a502eb818c1b4258c Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/56097 Tested-by: Jenkins Server Tested-by: Jenkins OP Build CI Tested-by: Jenkins OP HW Tested-by: FSP CI Jenkins Reviewed-by: Daniel M. Crowell --- src/usr/errl/errlmanager.C | 5 +++++ src/usr/trace/daemon/daemon.C | 7 ++++++- src/usr/trace/service.C | 7 ++++++- 3 files changed, 17 insertions(+), 2 deletions(-) (limited to 'src/usr') diff --git a/src/usr/errl/errlmanager.C b/src/usr/errl/errlmanager.C index 4476640f7..d3dd871aa 100644 --- a/src/usr/errl/errlmanager.C +++ b/src/usr/errl/errlmanager.C @@ -54,6 +54,7 @@ #include #include #include +#include namespace ERRORLOG { @@ -153,6 +154,10 @@ ErrlManager::ErrlManager() : l_pMarker->length = 0; #endif + DEBUG::add_debug_pointer(DEBUG::ERRORLOGS, + &g_ErrlStorage, + 4); + // to determine the starting log ID, we need to do this in 2 steps // first, determine our node // BYTE 0 of the PLID is the ID: 0x9# where # is the node instance. diff --git a/src/usr/trace/daemon/daemon.C b/src/usr/trace/daemon/daemon.C index a7e895b0a..8ebb24e74 100644 --- a/src/usr/trace/daemon/daemon.C +++ b/src/usr/trace/daemon/daemon.C @@ -5,7 +5,7 @@ /* */ /* OpenPOWER HostBoot Project */ /* */ -/* Contributors Listed Below - COPYRIGHT 2012,2017 */ +/* Contributors Listed Below - COPYRIGHT 2012,2018 */ /* [+] Google Inc. */ /* [+] International Business Machines Corp. */ /* */ @@ -50,6 +50,7 @@ #include #include #include +#include namespace TRACE { @@ -75,6 +76,10 @@ namespace TRACEDAEMON Daemon::Daemon() : iv_service(NULL), iv_totalPruned(0) { iv_first = iv_last = BufferPage::allocate(true); + + DEBUG::add_debug_pointer(DEBUG::TRACEDAEMON, + this, + sizeof(TRACEDAEMON::Daemon)); } Daemon::~Daemon() diff --git a/src/usr/trace/service.C b/src/usr/trace/service.C index a3445c2ee..260f71e2b 100644 --- a/src/usr/trace/service.C +++ b/src/usr/trace/service.C @@ -5,7 +5,7 @@ /* */ /* OpenPOWER HostBoot Project */ /* */ -/* Contributors Listed Below - COPYRIGHT 2012,2016 */ +/* Contributors Listed Below - COPYRIGHT 2012,2018 */ /* [+] Google Inc. */ /* [+] International Business Machines Corp. */ /* */ @@ -42,6 +42,7 @@ #include #include #include +#include namespace TRACE @@ -55,6 +56,10 @@ namespace TRACE // initialize tracelite setting to off iv_traceLite = 0; + + DEBUG::add_debug_pointer(DEBUG::TRACESERVICE, + this, + sizeof(TRACE::Service)); } Service::~Service() -- cgit v1.2.3