core/carbide_releases/run.jstack.bat
author Steve Sobek <steve.sobek@nokia.com>
Tue, 19 Oct 2010 07:21:52 -0500
changeset 2161 5dce04793589
parent 696 3edbbd22908c
permissions -rw-r--r--
Update to 3.1 and Java 1.6.0_20
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
2161
5dce04793589 Update to 3.1 and Java 1.6.0_20
Steve Sobek <steve.sobek@nokia.com>
parents: 696
diff changeset
     3
rem This is a utility batch file to get stack information from the Carbide.c++.3.1.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
2161
5dce04793589 Update to 3.1 and Java 1.6.0_20
Steve Sobek <steve.sobek@nokia.com>
parents: 696
diff changeset
    11
set  JSTACK=C:\APPS\jdk_1.6.0_20\bin\jstack.exe
439
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
2161
5dce04793589 Update to 3.1 and Java 1.6.0_20
Steve Sobek <steve.sobek@nokia.com>
parents: 696
diff changeset
    14
if not exist %JSTACK% echo ERROR: jstack.exe cannot be found at %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.  
439
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
2161
5dce04793589 Update to 3.1 and Java 1.6.0_20
Steve Sobek <steve.sobek@nokia.com>
parents: 696
diff changeset
    21
rem echo Carbide.c++.3.1.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
2161
5dce04793589 Update to 3.1 and Java 1.6.0_20
Steve Sobek <steve.sobek@nokia.com>
parents: 696
diff changeset
    26
FOR /F "tokens=2" %%i IN ('tasklist /FI "IMAGENAME eq  Carbide.c++.3.1.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%
2161
5dce04793589 Update to 3.1 and Java 1.6.0_20
Steve Sobek <steve.sobek@nokia.com>
parents: 696
diff changeset
    32
if not exist %OUTFILE% echo ERROR: Results not written. Is Carbide.c++.3.1.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