Skip to content

Commit 98e9f47

Browse files
committed
Skip setting event target PC if the event was a filtered mode change
1 parent 46d88cb commit 98e9f47

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

stf-inc/stf_inst_reader.hpp

+6-1
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,7 @@ namespace stf {
100100
#endif
101101

102102
bool event_valid = false;
103+
bool filtered_mode_change = false;
103104

104105
updateSkipping_();
105106

@@ -210,6 +211,7 @@ namespace stf {
210211
if(STF_EXPECT_FALSE((onlyUserMode_() || filter_mode_change_events_) &&
211212
is_mode_change)) {
212213
// Filter out mode change events when mode skipping or if it is explicitly required
214+
filtered_mode_change = true;
213215
break;
214216
}
215217

@@ -219,7 +221,10 @@ namespace stf {
219221

220222
case IntDescriptor::STF_EVENT_PC_TARGET:
221223
stf_assert(event_valid, "Saw EventPCTargetRecord without accompanying EventRecord");
222-
delegates::STFInstDelegate::setLastEventTarget_(inst, rec);
224+
if(!filtered_mode_change)
225+
{
226+
delegates::STFInstDelegate::setLastEventTarget_(inst, rec);
227+
}
223228
event_valid = false;
224229
break;
225230

0 commit comments

Comments
 (0)