core/carbide_releases/run.jstack.bat
author timkelly
Wed, 03 Feb 2010 10:56:46 -0600
branchRCL_2_4
changeset 888 3419376b791a
parent 697 78f4678e3281
child 1276 7f978d9fb8f6
permissions -rw-r--r--
update to Carbide 2.5 EXE name
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
888
3419376b791a update to Carbide 2.5 EXE name
timkelly
parents: 697
diff changeset
     3
rem This is a utility batch file to get stack information from the Carbide.c++.2.5.exe process.
439
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
888
3419376b791a update to Carbide 2.5 EXE name
timkelly
parents: 697
diff changeset
    21
rem echo Carbide.c++.2.5.exe >  %outfile%
439
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
888
3419376b791a update to Carbide 2.5 EXE name
timkelly
parents: 697
diff changeset
    26
FOR /F "tokens=2" %%i IN ('tasklist /FI "IMAGENAME eq  Carbide.c++.2.5.exe"
439
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%
888
3419376b791a update to Carbide 2.5 EXE name
timkelly
parents: 697
diff changeset
    32
if not exist %OUTFILE% echo ERROR: Results not written. Is Carbide.c++.2.5.exe running?
439
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