Enable guard support
Signed-off-by: Zane Shelley <zshelle@us.ibm.com>
Change-Id: I7bc6c0cdd3aa6d513f1a87d351b99069fc005339
diff --git a/analyzer/resolution.cpp b/analyzer/resolution.cpp
index ae4edd0..8bf8b95 100644
--- a/analyzer/resolution.cpp
+++ b/analyzer/resolution.cpp
@@ -130,7 +130,21 @@
callout["LocationCode"] = util::pdbg::getLocationCode(i_target);
callout["Priority"] = i_priority.getUserDataString();
callout["Deconfigured"] = false;
- callout["Guarded"] = i_guard;
+ callout["Guarded"] = false; // default
+
+ // Check if guard info should be added.
+ if (i_guard)
+ {
+ auto guardType = io_sd.queryGuardPolicy();
+
+ if (!(callout::GuardType::NONE == guardType))
+ {
+ callout["Guarded"] = true;
+ callout["EntityPath"] = util::pdbg::getPhysBinPath(i_target);
+ callout["GuardType"] = guardType.getString();
+ }
+ }
+
io_sd.addCallout(callout);
}