|
1 /* |
|
2 * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials are made available |
|
5 * under the terms of "Eclipse Public License v1.0" |
|
6 * which accompanies this distribution, and is available |
|
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: Contains help texts for CLE. |
|
15 * |
|
16 */ |
|
17 #include "../inc/ATCommonDefines.h" |
|
18 |
|
19 //Function declarations |
|
20 void print_help( void ); |
|
21 void print_syntax_examples( void ); |
|
22 |
|
23 /** |
|
24 * Print help info. |
|
25 */ |
|
26 void print_help( void ) |
|
27 { |
|
28 cout<< "AnalyzeTool v"; |
|
29 cout<< ATOOL_VERSION; |
|
30 cout<< " - "; |
|
31 cout<< ATOOL_DATE; |
|
32 cout<< "\n"; |
|
33 cout<< "Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).\nAll rights reserved.\n\n"; |
|
34 cout<< "Usage:\n"; |
|
35 cout<< "atool -tr [optional parameters] abld [abld parameters]\n"; |
|
36 cout<< " -lf [optional parameters] abld [abld parameters]\n"; |
|
37 cout<< " -a data-file [output-file] [-s symbol-file] [-l#]\n"; |
|
38 cout<< " -p data-file output-file\n"; |
|
39 cout<< " -c\n"; |
|
40 cout<< " -v\n"; |
|
41 cout<< " -help\n"; |
|
42 cout<< "\n"; |
|
43 cout<< "Mandatory parameter to choose:\n"; |
|
44 cout<< " -tr Build project for analysis using output to trace.\n"; |
|
45 cout<< " -lf Build project for analysis using logging to file.\n"; |
|
46 cout<< " abld... Use SBS v.1 build system with defined build command,\n"; |
|
47 cout<< " which includes supported platform and build type.\n"; |
|
48 cout<< " sbs... Use SBS v.2 (Raptor) build system with defined sbs build\n"; |
|
49 cout<< " command, which includes supported platform and build type.\n"; |
|
50 cout<< " -a Analyze report file.\n"; |
|
51 cout<< " -c Clear AnalyzeTool changes, temporary files and releasable(s).\n"; |
|
52 cout<< " -p Parse trace file to data file.\n"; |
|
53 cout<< " -help Show full help including syntax examples.\n"; |
|
54 cout<< " -v Print version info.\n"; |
|
55 cout<< "\n"; |
|
56 |
|
57 cout<< "Optional parameters:\n"; |
|
58 cout<< " -acs size Specifies the call stack size gathered when memory\n"; |
|
59 cout<< " is allocated. Size can be between 0-256.\n"; |
|
60 cout<< " -fcs size Specifies the call stack size gathered when memory is freed.\n"; |
|
61 cout<< " Size can be between 0-256.\n"; |
|
62 cout<< " -f data file Specifies the filename for logging to file.\n"; |
|
63 cout<< " (50 chars max). Cannot contain path.\n"; |
|
64 cout<< " -fp file path Specifies the path of log file.\n"; |
|
65 cout<< " (in format <driveLetter>:\\<dir1>\\<dir2>\\...\\<dirN>\\)\n"; |
|
66 cout<< " output-file Specifies the results data file name.\n"; |
|
67 cout<< " -l Logging level of analyze report(0,1,2,3), default 3.\n"; |
|
68 cout<< " -s symbol-file Specifies rom/rofs symbol file(s) to be used in analyze.\n"; |
|
69 cout<< " Multiple -s options can be given.\n"; |
|
70 cout<< " -nobuild Instruments the project.\n"; |
|
71 //cout<< " -show_debug Print debug messages to console.\n"; |
|
72 //cout<< " -show_debug_all Print debug messages to console (all).\n"; |
|
73 //cout<< " -show_dbgview Print debug messages to windows debug api.\n"; |
|
74 //cout<< " -show_dbgview_all Print debug messages to windows debug api (all).\n"; |
|
75 |
|
76 /* |
|
77 * Old style parameters, just for notes. |
|
78 printf("Usage:\n"); |
|
79 printf("atool -m [mmp-file] [mode] [data-file] [-variant variant-name] [build] [-sbs2] [-e]\n"); |
|
80 printf(" -i [mmp-file] [mode] [data-file] [-variant variant-name] [build] [-sbs2] [-e]\n"); |
|
81 printf(" -a [mmp-file | target-name] data-file [-s symbol-file]\n"); |
|
82 printf(" [output-file] [-l#]\n"); |
|
83 printf(" -p data-file [output-file]\n"); |
|
84 printf(" -c\n"); |
|
85 //printf(" -u\n"); |
|
86 printf(" -v\n"); |
|
87 printf(" -help\n"); |
|
88 printf("\n"); |
|
89 printf("Mandatory option to choose:\n"); |
|
90 printf(" -m Build project for analysis.\n"); |
|
91 printf(" -i Instrument project.\n"); |
|
92 printf(" -a Analyze report file.\n"); |
|
93 //printf(" -u Create listing & map files.\n"); |
|
94 printf(" -c Clear AnalyzeTool changes and temporary files.\n"); |
|
95 printf(" -p Parse trace file.\n"); |
|
96 printf(" -help Show full help including syntax examples.\n"); |
|
97 printf("\n"); |
|
98 |
|
99 printf("Optional options:\n"); |
|
100 printf(" mmp-file Specifies one of the component from bld.inf which is used.\n"); |
|
101 printf(" target-name Specifies the target name of binary to which create\n"); |
|
102 printf(" analyze report.\n"); |
|
103 printf(" mode Logging mode (trace or S60), default trace.\n"); |
|
104 printf(" data-file Specifies the user defined data file name (50 chars max).\n"); |
|
105 printf(" build Build target (udeb or urel), default udeb.\n"); |
|
106 printf(" output-file Specifies the results data file name.\n"); |
|
107 printf(" -l Logging level of analyze report(0,1,2,3), default 3.\n"); |
|
108 printf(" -variant Specifies Symbian binary variant to be used.\n"); |
|
109 printf(" variant-name Specifies the variant name to be used.\n"); |
|
110 printf(" -s Specifies rom symbol file be used in analyze.\n"); |
|
111 printf(" symbol-file Full path to rom symbol file used in analyze.\n"); |
|
112 printf(" -sbs2 Use Symbian Build System v.2.\n"); |
|
113 printf(" -winscw Build project for emulator (winscw platform).\n"); |
|
114 printf(" -v Print version info.\n"); |
|
115 */ |
|
116 } |
|
117 |
|
118 void print_syntax_examples( void ) |
|
119 { |
|
120 //Helper line showing width of 80 chars. |
|
121 //80cout<< "12345678901234567890123456789012345678901234567890123456789012345678901234567890"; |
|
122 cout<< endl; |
|
123 cout<< "Building syntax examples:" << endl; |
|
124 cout<< "Cmd Description" << endl; |
|
125 |
|
126 cout<< "atool -tr abld build armv5 udeb" << endl; |
|
127 cout<< " Hooks every component from bld.inf. Using output to trace," << endl; |
|
128 cout<< " udeb build type and armv5 platform." << endl; |
|
129 |
|
130 cout<< "atool -lf -acs 5 sbs -c winscw_udeb" << endl; |
|
131 cout<< " Hooks every component from bld.inf. Using Symbian Build System v.2" << endl; |
|
132 cout<< " Using loging to data file, call stack size of 5" << endl; |
|
133 cout<< " in allocations, udeb build type and winscw platform." << endl; |
|
134 |
|
135 cout<< "atool -tr abld build armv5 udeb foobar" << endl; |
|
136 cout<< " Hooks only foobar.mmp component from bld.inf. Using " << endl; |
|
137 cout<< " output to trace, udeb build type and armv5 platform." << endl; |
|
138 |
|
139 cout<< "atool -lf -acs 0 -fcs 0 abld build armv5.default udeb" << endl; |
|
140 cout<< " Hooks every component from bld.inf. Using default binary variant," << endl; |
|
141 cout<< " output to trace, 0 sized callstacks in allocation(s)/free(s)," << endl; |
|
142 cout<< " udeb build type and armv5 platform." << endl; |
|
143 |
|
144 cout<< "atool -tr sbs -b bld.inf -c armv5_udeb" << endl; |
|
145 cout<< " Hooks every component from bld.inf. Using Symbian Build System v.2" << endl; |
|
146 cout<< " , output to trace, udeb build type and armv5 platform." << endl; |
|
147 |
|
148 cout<< "atool -tr sbs -s system.xml --config=winscw_udeb" << endl; |
|
149 cout<< " Hooks every layer defined in system.xml system model. Using Symbian Build" << endl; |
|
150 cout<< " System v.2, output to trace, udeb build type and winscw platform." << endl; |
|
151 |
|
152 cout<< endl; |
|
153 cout<< "Instrumenting syntax examples:" << endl; |
|
154 cout<< "Cmd Description" << endl; |
|
155 cout<< "atool -tr -nobuild abld build winscw udeb" << endl; |
|
156 cout<< " Instruments every component from bld.inf. Using output to trace,"<<endl; |
|
157 cout<< " udeb build target and winscw platform." << endl; |
|
158 cout<< " After project is instrumented, it needs to compiled using same platform and" << endl; |
|
159 cout<< " build type as given to instrumenting. Use -c parameter to remove changes." << endl; |
|
160 |
|
161 cout<< endl; |
|
162 cout<< "Analyzing syntax examples:" << endl; |
|
163 cout<< "Cmd Description" << endl; |
|
164 cout<< "atool -a foo.dat" << endl; |
|
165 cout<< " Create analyze report from foo.dat device data file." << endl; |
|
166 cout<< "atool -a foo.trace" << endl; |
|
167 cout<< " Create analyze report from foo.trace raw data file." << endl; |
|
168 cout<< "atool -a foo.dat -s my_rom.symbol -s my_rofs1.symbol" << endl; |
|
169 cout<< " Create analyze report from foo.dat using also rom and rofs symbol files." << endl; |
|
170 |
|
171 cout<< endl; |
|
172 cout<< "Parsing syntax examples:" << endl; |
|
173 cout<< "Cmd Description" << endl; |
|
174 cout<< "atool -p foo.trace foo.dat" << endl; |
|
175 cout<< " Parse foo.trace raw data file to foo.dat device data file." << endl; |
|
176 } |
|
177 |
|
178 //EOF |