summaryrefslogtreecommitdiff
path: root/src/cuda-sim/ptxinfo.l
diff options
context:
space:
mode:
authorMengchi Zhang <[email protected]>2019-07-03 14:54:16 -0400
committerMengchi Zhang <[email protected]>2019-07-03 14:54:16 -0400
commit60c38b0f77378eb111e88f632702d19dc3746cc7 (patch)
tree36ce48f9e23cd20797b765c04b4161b08edf8398 /src/cuda-sim/ptxinfo.l
parentcb60ae4893086175fee49dc6088d46665a7f088b (diff)
Remove g_filename
Signed-off-by: Mengchi Zhang <[email protected]>
Diffstat (limited to 'src/cuda-sim/ptxinfo.l')
-rw-r--r--src/cuda-sim/ptxinfo.l4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/cuda-sim/ptxinfo.l b/src/cuda-sim/ptxinfo.l
index b0ada09..3a152b0 100644
--- a/src/cuda-sim/ptxinfo.l
+++ b/src/cuda-sim/ptxinfo.l
@@ -39,6 +39,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "ptx_loader.h"
#include "ptxinfo.tab.h"
#include <string.h>
+#include "../../libcuda/gpgpu_context.h"
#define LINEBUF_SIZE 1024
#define TC if( (yylineno == 1) && (ptxinfo->col + strlen(yytext) < LINEBUF_SIZE) ) { \
@@ -88,7 +89,6 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
%%
extern int g_ptxinfo_error_detected;
-extern const char *g_filename;
int ptxinfo_error(yyscan_t yyscanner, ptxinfo_data* ptxinfo, const char* msg)
{
@@ -98,7 +98,7 @@ int ptxinfo_error(yyscan_t yyscanner, ptxinfo_data* ptxinfo, const char* msg)
fflush(stdout);
printf("GPGPU-Sim: ERROR while parsing output of ptxas (used to capture resource usage information)\n");
if( msg != NULL )
- printf("GPGPU-Sim: %s (%s:%u) Syntax error:\n\n", g_filename, ptxinfo->g_ptxinfo_filename, yylineno );
+ printf("GPGPU-Sim: %s (%s:%u) Syntax error:\n\n", ptxinfo->gpgpu_ctx->g_filename, ptxinfo->g_ptxinfo_filename, yylineno );
printf(" %s\n", ptxinfo->linebuf );
printf(" ");
for( i=0; i < ptxinfo->col-1; i++ ) {