summaryrefslogtreecommitdiff
path: root/src/gpgpu-sim
diff options
context:
space:
mode:
authorgpgpu-sim <[email protected]>2018-03-26 19:34:02 -0700
committerGitHub <[email protected]>2018-03-26 19:34:02 -0700
commit28bcee6cbe5060f96ee275b8007838ea4b6f2062 (patch)
tree6e3c598240b52337db468f154daa065ff45467ae /src/gpgpu-sim
parent68d44359182f026d04fac0f33efe574c4a821e2f (diff)
parent6b7d14e294d8cb73e2281b7e18a4083e3271a85e (diff)
Merge pull request #62 from pigrew/dev-multiArchBreakpoint
Provide portable (non-x86) breakpoint method which should work on all…
Diffstat (limited to 'src/gpgpu-sim')
-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 )