Skip to content

Commit

Permalink
Skip setting event target PC if the event was a filtered mode change
Browse files Browse the repository at this point in the history
  • Loading branch information
bdutro-mips committed Oct 16, 2024
1 parent 46d88cb commit 98e9f47
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion stf-inc/stf_inst_reader.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@ namespace stf {
#endif

bool event_valid = false;
bool filtered_mode_change = false;

updateSkipping_();

Expand Down Expand Up @@ -210,6 +211,7 @@ namespace stf {
if(STF_EXPECT_FALSE((onlyUserMode_() || filter_mode_change_events_) &&
is_mode_change)) {
// Filter out mode change events when mode skipping or if it is explicitly required
filtered_mode_change = true;
break;
}

Expand All @@ -219,7 +221,10 @@ namespace stf {

case IntDescriptor::STF_EVENT_PC_TARGET:
stf_assert(event_valid, "Saw EventPCTargetRecord without accompanying EventRecord");
delegates::STFInstDelegate::setLastEventTarget_(inst, rec);
if(!filtered_mode_change)
{
delegates::STFInstDelegate::setLastEventTarget_(inst, rec);
}
event_valid = false;
break;

Expand Down

0 comments on commit 98e9f47

Please sign in to comment.