Skip to content

Commit b943781

Browse files
committed
Use the right convention for testing for the same CPU in sqGdbARMv8Plugin.c
1 parent d54162a commit b943781

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

platforms/Cross/plugins/GdbARMv8Plugin/sqGdbARMv8Plugin.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ performanceCounter64ofinto(void *cpup, uintptr_t *perfCounterp)
160160
{
161161
sim_cpu *cpu = cpup;
162162

163-
if (lastCPU != cpu)
163+
if (!lastCPU || lastCPU->cpu[0] != cpu)
164164
return BadCPUInstance;
165165

166166
*perfCounterp = cpu->cntvct;
@@ -177,7 +177,7 @@ incrementPerformanceCounter64ofby(void *cpup, uintptr_t increment)
177177
{
178178
sim_cpu *cpu = cpup;
179179

180-
if (lastCPU != cpu)
180+
if (!lastCPU || lastCPU->cpu[0] != cpu)
181181
return BadCPUInstance;
182182

183183
cpu->cntvct += increment;

0 commit comments

Comments
 (0)