aboutsummaryrefslogtreecommitdiffstats
path: root/decoder/source/ptm/trc_pkt_decode_ptm.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'decoder/source/ptm/trc_pkt_decode_ptm.cpp')
-rw-r--r--decoder/source/ptm/trc_pkt_decode_ptm.cpp12
1 files changed, 9 insertions, 3 deletions
diff --git a/decoder/source/ptm/trc_pkt_decode_ptm.cpp b/decoder/source/ptm/trc_pkt_decode_ptm.cpp
index 94ed5acc243a..7abee8499f46 100644
--- a/decoder/source/ptm/trc_pkt_decode_ptm.cpp
+++ b/decoder/source/ptm/trc_pkt_decode_ptm.cpp
@@ -67,6 +67,7 @@ ocsd_datapath_resp_t TrcPktDecodePtm::processPacket()
case NO_SYNC:
// no sync - output a no sync packet then transition to wait sync.
m_output_elem.elem_type = OCSD_GEN_TRC_ELEM_NO_SYNC;
+ m_output_elem.unsync_eot_info = m_unsync_info;
resp = outputTraceElement(m_output_elem);
m_curr_state = (m_curr_packet_in->getType() == PTM_PKT_A_SYNC) ? WAIT_ISYNC : WAIT_SYNC;
bPktDone = true;
@@ -108,6 +109,7 @@ ocsd_datapath_resp_t TrcPktDecodePtm::onEOT()
// shouldn't be any packets left to be processed - flush shoudl have done this.
// just output the end of trace marker
m_output_elem.setType(OCSD_GEN_TRC_ELEM_EO_TRACE);
+ m_output_elem.setUnSyncEOTReason(UNSYNC_EOT);
resp = outputTraceElement(m_output_elem);
return resp;
}
@@ -115,6 +117,7 @@ ocsd_datapath_resp_t TrcPktDecodePtm::onEOT()
ocsd_datapath_resp_t TrcPktDecodePtm::onReset()
{
ocsd_datapath_resp_t resp = OCSD_RESP_CONT;
+ m_unsync_info = UNSYNC_RESET_DECODER;
resetDecoder();
return resp;
}
@@ -191,6 +194,7 @@ void TrcPktDecodePtm::initDecoder()
m_instr_info.pe_type.profile = profile_Unknown;
m_instr_info.pe_type.arch = ARCH_UNKNOWN;
m_instr_info.dsb_dmb_waypoints = 0;
+ m_unsync_info = UNSYNC_INIT_DECODER;
resetDecoder();
}
@@ -504,11 +508,15 @@ ocsd_datapath_resp_t TrcPktDecodePtm::processAtomRange(const ocsd_atm_val A, con
ocsd_datapath_resp_t resp = OCSD_RESP_CONT;
bool bWPFound = false;
std::ostringstream oss;
+ ocsd_err_t err = OCSD_OK;
m_instr_info.instr_addr = m_curr_pe_state.instr_addr;
m_instr_info.isa = m_curr_pe_state.isa;
- ocsd_err_t err = traceInstrToWP(bWPFound,traceWPOp,nextAddrMatch);
+ // set type (which resets out-elem) before traceInstrToWP modifies out-elem values
+ m_output_elem.setType(OCSD_GEN_TRC_ELEM_INSTR_RANGE);
+
+ err = traceInstrToWP(bWPFound,traceWPOp,nextAddrMatch);
if(err != OCSD_OK)
{
if(err == OCSD_ERR_UNSUPPORTED_ISA)
@@ -576,7 +584,6 @@ ocsd_datapath_resp_t TrcPktDecodePtm::processAtomRange(const ocsd_atm_val A, con
break;
}
- m_output_elem.setType(OCSD_GEN_TRC_ELEM_INSTR_RANGE);
m_output_elem.setLastInstrInfo((A == ATOM_E),m_instr_info.type, m_instr_info.sub_type,m_instr_info.instr_size);
m_output_elem.setISA(m_curr_pe_state.isa);
if(m_curr_packet_in->hasCC())
@@ -595,7 +602,6 @@ ocsd_datapath_resp_t TrcPktDecodePtm::processAtomRange(const ocsd_atm_val A, con
if(m_output_elem.st_addr != m_output_elem.en_addr)
{
// some trace before we were out of memory access range
- m_output_elem.setType(OCSD_GEN_TRC_ELEM_INSTR_RANGE);
m_output_elem.setLastInstrInfo(true,m_instr_info.type, m_instr_info.sub_type,m_instr_info.instr_size);
m_output_elem.setISA(m_curr_pe_state.isa);
m_output_elem.setLastInstrCond(m_instr_info.is_conditional);