summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorNathan Conrad <[email protected]>2018-03-26 19:20:24 -0400
committerNathan Conrad <[email protected]>2018-03-26 19:20:24 -0400
commit6b7d14e294d8cb73e2281b7e18a4083e3271a85e (patch)
tree72650c683b2a64ddebeb141037b36faf5ac66dc3 /src
parent5373d10cd2b5dde7c94cccf6e07b8f59869223af (diff)
Provide portable (non-x86) breakpoint method which should work on all linuxes. Tested on PowerPC.
Diffstat (limited to 'src')
-rw-r--r--src/gpgpu-sim/gpu-sim.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/gpgpu-sim/gpu-sim.cc b/src/gpgpu-sim/gpu-sim.cc
index 58a5d16..3829861 100644
--- a/src/gpgpu-sim/gpu-sim.cc
+++ b/src/gpgpu-sim/gpu-sim.cc
@@ -32,6 +32,7 @@
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
+#include <signal.h>
#include "zlib.h"
@@ -1440,7 +1441,7 @@ void gpgpu_sim::cycle()
if( g_single_step && ((gpu_sim_cycle+gpu_tot_sim_cycle) >= g_single_step) ) {
- asm("int $03");
+ raise(SIGTRAP); // Debug breakpoint
}
gpu_sim_cycle++;
if( g_interactive_debugger_enabled )