core/carbide_releases/run.jstack.bat
author timkelly
Thu, 13 Aug 2009 17:12:47 -0500
changeset 439 a29cb5e793d3
child 696 3edbbd22908c
child 697 78f4678e3281
permissions -rw-r--r--
fixed GCCE error parser & tests to work with CDT 6.0 changes.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
439
a29cb5e793d3 fixed GCCE error parser & tests to work with CDT 6.0 changes.
timkelly
parents:
diff changeset
     1
echo off
a29cb5e793d3 fixed GCCE error parser & tests to work with CDT 6.0 changes.
timkelly
parents:
diff changeset
     2
a29cb5e793d3 fixed GCCE error parser & tests to work with CDT 6.0 changes.
timkelly
parents:
diff changeset
     3
rem This is a utility batch file to get stack information from the Carbide.c++.2.2.exe process.
a29cb5e793d3 fixed GCCE error parser & tests to work with CDT 6.0 changes.
timkelly
parents:
diff changeset
     4
rem In order to run it successfully, you will need to have a full JDK installed of version 1.6 or higher.
a29cb5e793d3 fixed GCCE error parser & tests to work with CDT 6.0 changes.
timkelly
parents:
diff changeset
     5
rem See http://java.sun.com/javase/downloads/index.jsp for download information.
a29cb5e793d3 fixed GCCE error parser & tests to work with CDT 6.0 changes.
timkelly
parents:
diff changeset
     6
rem If the Carbide process is found (and only one should be running) then stack information will be found in %OUTFILE%.
a29cb5e793d3 fixed GCCE error parser & tests to work with CDT 6.0 changes.
timkelly
parents:
diff changeset
     7
a29cb5e793d3 fixed GCCE error parser & tests to work with CDT 6.0 changes.
timkelly
parents:
diff changeset
     8
a29cb5e793d3 fixed GCCE error parser & tests to work with CDT 6.0 changes.
timkelly
parents:
diff changeset
     9
echo Executing jstack on Carbide.c++.exe...
a29cb5e793d3 fixed GCCE error parser & tests to work with CDT 6.0 changes.
timkelly
parents:
diff changeset
    10
a29cb5e793d3 fixed GCCE error parser & tests to work with CDT 6.0 changes.
timkelly
parents:
diff changeset
    11
set  JSTACK=c:\APPS\Java\jdk1.6.0_14\bin\jstack.exe
a29cb5e793d3 fixed GCCE error parser & tests to work with CDT 6.0 changes.
timkelly
parents:
diff changeset
    12
set  OUTFILE=.\stack.txt
a29cb5e793d3 fixed GCCE error parser & tests to work with CDT 6.0 changes.
timkelly
parents:
diff changeset
    13
a29cb5e793d3 fixed GCCE error parser & tests to work with CDT 6.0 changes.
timkelly
parents:
diff changeset
    14
if not exist %JSTACK% echo ERROR: jstack.exe cannot be found in %JSTACK%. jstack is provided under JDK 1.6 and higher, but is not distributed with Carbide. Please find the location of jstack and update the JSTACK variable in this batch file.  
a29cb5e793d3 fixed GCCE error parser & tests to work with CDT 6.0 changes.
timkelly
parents:
diff changeset
    15
a29cb5e793d3 fixed GCCE error parser & tests to work with CDT 6.0 changes.
timkelly
parents:
diff changeset
    16
if not exist %JSTACK% GOTO END
a29cb5e793d3 fixed GCCE error parser & tests to work with CDT 6.0 changes.
timkelly
parents:
diff changeset
    17
a29cb5e793d3 fixed GCCE error parser & tests to work with CDT 6.0 changes.
timkelly
parents:
diff changeset
    18
a29cb5e793d3 fixed GCCE error parser & tests to work with CDT 6.0 changes.
timkelly
parents:
diff changeset
    19
del %OUTFILE%
a29cb5e793d3 fixed GCCE error parser & tests to work with CDT 6.0 changes.
timkelly
parents:
diff changeset
    20
a29cb5e793d3 fixed GCCE error parser & tests to work with CDT 6.0 changes.
timkelly
parents:
diff changeset
    21
rem echo Carbide.c++.2.2.exe >  %outfile%
a29cb5e793d3 fixed GCCE error parser & tests to work with CDT 6.0 changes.
timkelly
parents:
diff changeset
    22
a29cb5e793d3 fixed GCCE error parser & tests to work with CDT 6.0 changes.
timkelly
parents:
diff changeset
    23
echo
a29cb5e793d3 fixed GCCE error parser & tests to work with CDT 6.0 changes.
timkelly
parents:
diff changeset
    24
echo Searching for Carbide.c++ process...
a29cb5e793d3 fixed GCCE error parser & tests to work with CDT 6.0 changes.
timkelly
parents:
diff changeset
    25
a29cb5e793d3 fixed GCCE error parser & tests to work with CDT 6.0 changes.
timkelly
parents:
diff changeset
    26
FOR /F "tokens=2" %%i IN ('tasklist /FI "IMAGENAME eq  Carbide.c++.2.2.exe"
a29cb5e793d3 fixed GCCE error parser & tests to work with CDT 6.0 changes.
timkelly
parents:
diff changeset
    27
/NH') DO @%JSTACK% %%i >  %OUTFILE%
a29cb5e793d3 fixed GCCE error parser & tests to work with CDT 6.0 changes.
timkelly
parents:
diff changeset
    28
a29cb5e793d3 fixed GCCE error parser & tests to work with CDT 6.0 changes.
timkelly
parents:
diff changeset
    29
a29cb5e793d3 fixed GCCE error parser & tests to work with CDT 6.0 changes.
timkelly
parents:
diff changeset
    30
echo
a29cb5e793d3 fixed GCCE error parser & tests to work with CDT 6.0 changes.
timkelly
parents:
diff changeset
    31
if exist %OUTFILE% echo Check for results in %OUTFILE%
a29cb5e793d3 fixed GCCE error parser & tests to work with CDT 6.0 changes.
timkelly
parents:
diff changeset
    32
if not exist %OUTFILE% echo ERROR: Results not written. Is Carbide.c++.2.2.exe running?
a29cb5e793d3 fixed GCCE error parser & tests to work with CDT 6.0 changes.
timkelly
parents:
diff changeset
    33
a29cb5e793d3 fixed GCCE error parser & tests to work with CDT 6.0 changes.
timkelly
parents:
diff changeset
    34
:END
a29cb5e793d3 fixed GCCE error parser & tests to work with CDT 6.0 changes.
timkelly
parents:
diff changeset
    35
a29cb5e793d3 fixed GCCE error parser & tests to work with CDT 6.0 changes.
timkelly
parents:
diff changeset
    36
pause
a29cb5e793d3 fixed GCCE error parser & tests to work with CDT 6.0 changes.
timkelly
parents:
diff changeset
    37