author | timkelly |
Mon, 26 Apr 2010 08:38:43 -0500 | |
branch | RCL_2_4 |
changeset 1276 | 7f978d9fb8f6 |
parent 888 | 3419376b791a |
permissions | -rw-r--r-- |
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 |
|
1276 | 3 |
rem This is a utility batch file to get stack information from the Carbide.c++.2.6.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 |
|
1276 | 21 |
rem echo Carbide.c++.2.6.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 |
|
1276 | 26 |
FOR /F "tokens=2" %%i IN ('tasklist /FI "IMAGENAME eq Carbide.c++.2.6.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% |
1276 | 32 |
if not exist %OUTFILE% echo ERROR: Results not written. Is Carbide.c++.2.6.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 |