util::pdbg functions for path, position, and target type
Signed-off-by: Zane Shelley <zshelle@us.ibm.com>
Change-Id: I4f4a5b1aa6ab13f60e61d77a866cfc24c7854677
diff --git a/analyzer/hei_user_interface.cpp b/analyzer/hei_user_interface.cpp
index ee87f79..0f4a441 100644
--- a/analyzer/hei_user_interface.cpp
+++ b/analyzer/hei_user_interface.cpp
@@ -10,6 +10,7 @@
#include <stdio.h>
#include <hei_user_interface.hpp>
+#include <util/pdbg.hpp>
#include <util/trace.hpp>
namespace libhei
@@ -58,7 +59,7 @@
default:
trace::err("Unsupported register type: trgt=%s regType=0x%02x "
"addr=0x%0" PRIx64,
- pdbg_target_path(i_procTrgt), i_regType, i_address);
+ util::pdbg::getPath(i_procTrgt), i_regType, i_address);
assert(0); // an unsupported register type
}
@@ -87,7 +88,7 @@
default:
trace::err("Unsupported register type: trgt=%s regType=0x%02x "
"addr=0x%0" PRIx64,
- pdbg_target_path(i_obmcTrgt), i_regType, i_address);
+ util::pdbg::getPath(i_obmcTrgt), i_regType, i_address);
assert(0);
}
*/
@@ -102,10 +103,9 @@
{
bool accessFailure = false;
- auto trgt = (pdbg_target*)(i_chip.getChip());
+ auto trgt = util::pdbg::getTrgt(i_chip);
- uint8_t trgtType = 0;
- pdbg_target_get_attribute(trgt, "ATTR_TYPE", 1, 1, &trgtType);
+ uint8_t trgtType = util::pdbg::getTrgtType(trgt);
switch (trgtType)
{
@@ -119,14 +119,14 @@
default:
trace::err("Unsupported target type: trgt=%s trgtType=0x%02x",
- pdbg_target_path(trgt), trgtType);
+ util::pdbg::getPath(trgt), trgtType);
assert(0);
}
if (accessFailure)
{
trace::err("%s failure: trgt=%s addr=0x%0" PRIx64, __regType(i_regType),
- pdbg_target_path(trgt), i_address);
+ util::pdbg::getPath(trgt), i_address);
o_value = 0; // just in case
}