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<< "S60 AnalyzeTool v"; |
|
29 cout<< ATOOL_VERSION; |
|
30 cout<< " - "; |
|
31 cout<< ATOOL_DATE; |
|
32 cout<< "\n"; |
|
33 cout<< "Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).\nAll rights reserved.\n\n"; |
|
34 cout<< "Usage:\n"; |
|
35 cout<< "atool -e [optional parameters] abld [abld parameters]\n"; |
|
36 cout<< " -me [optional parameters] abld [abld parameters]\n"; |
|
37 cout<< " -mi [optional parameters] [-f data-file] sbs [sbs parameters]\n"; |
|
38 #ifdef HTI_SUPPORT |
|
39 cout<< " -g [data-file]\n"; |
|
40 #endif |
|
41 cout<< " -a data-file [output-file] [-s symbol-file] [-l#]\n"; |
|
42 cout<< " -p data-file output-file\n"; |
|
43 #ifdef HTI_SUPPORT |
|
44 cout<< " -delete data-file\n"; |
|
45 #endif |
|
46 cout<< " -c\n"; |
|
47 cout<< " -v\n"; |
|
48 cout<< " -help\n"; |
|
49 cout<< "\n"; |
|
50 cout<< "Mandatory parameter to choose:\n"; |
|
51 cout<< " -e Build project for analysis using external data gathering.\n"; |
|
52 cout<< " -me Build project for analysis using monitored external\n"; |
|
53 cout<< " data gathering.\n"; |
|
54 cout<< " -mi Build project for analysis using monitored internal\n"; |
|
55 cout<< " data gathering.\n"; |
|
56 cout<< " abld... Use SBS v.1 build system with defined build command,\n"; |
|
57 cout<< " which includes supported platform and build type.\n"; |
|
58 cout<< " sbs... Use SBS v.2 (Raptor) build system with defined sbs build\n"; |
|
59 cout<< " command, which includes supported platform and build type.\n"; |
|
60 cout<< " -a Analyze report file.\n"; |
|
61 cout<< " -c Clear AnalyzeTool changes, temporary files and releasable(s).\n"; |
|
62 cout<< " -p Parse trace file to data file.\n"; |
|
63 #ifdef HTI_SUPPORT |
|
64 cout<< " -g Get analyze reports from device. Without the file name\n"; |
|
65 cout<< " gives a list of available files. If file name * all available\n"; |
|
66 cout<< " files on device are saved to current directory.\n"; |
|
67 cout<< " -delete Delete datafile from the phone.\n"; |
|
68 #endif |
|
69 cout<< " -help Show full help including syntax examples.\n"; |
|
70 cout<< " -v Print version info.\n"; |
|
71 cout<< "\n"; |
|
72 |
|
73 cout<< "Optional parameters:\n"; |
|
74 cout<< " -acs size Specifies the call stack size gathered when memory\n"; |
|
75 cout<< " is allocated. Size can be between 0-256.\n"; |
|
76 cout<< " -fcs size Specifies the call stack size gathered when memory is freed.\n"; |
|
77 cout<< " Size can be between 0-256.\n"; |
|
78 cout<< " -f data file Specifies the filename for monitored internal data gathering\n"; |
|
79 cout<< " (50 chars max). Cannot contain path.\n"; |
|
80 cout<< " output-file Specifies the results data file name.\n"; |
|
81 cout<< " -l Logging level of analyze report(0,1,2,3), default 3.\n"; |
|
82 cout<< " -s symbol-file Specifies rom/rofs symbol file(s) to be used in analyze.\n"; |
|
83 cout<< " Multiple -s options can be given.\n"; |
|
84 cout<< " -nobuild Instruments the project.\n"; |
|
85 //cout<< " -show_debug Print debug messages to console.\n"; |
|
86 //cout<< " -show_debug_all Print debug messages to console (all).\n"; |
|
87 //cout<< " -show_dbgview Print debug messages to windows debug api.\n"; |
|
88 //cout<< " -show_dbgview_all Print debug messages to windows debug api (all).\n"; |
|
89 |
|
90 /* |
|
91 * Old style parameters, just for notes. |
|
92 printf("Usage:\n"); |
|
93 printf("atool -m [mmp-file] [mode] [data-file] [-variant variant-name] [build] [-sbs2] [-e]\n"); |
|
94 printf(" -i [mmp-file] [mode] [data-file] [-variant variant-name] [build] [-sbs2] [-e]\n"); |
|
95 #ifdef HTI_SUPPORT |
|
96 printf(" -g [data-file]\n"); |
|
97 #endif |
|
98 printf(" -a [mmp-file | target-name] data-file [-s symbol-file]\n"); |
|
99 printf(" [output-file] [-l#]\n"); |
|
100 printf(" -p data-file [output-file]\n"); |
|
101 #ifdef HTI_SUPPORT |
|
102 printf(" -delete data-file\n"); |
|
103 #endif |
|
104 printf(" -c\n"); |
|
105 //printf(" -u\n"); |
|
106 printf(" -v\n"); |
|
107 printf(" -help\n"); |
|
108 printf("\n"); |
|
109 printf("Mandatory option to choose:\n"); |
|
110 printf(" -m Build project for analysis.\n"); |
|
111 printf(" -i Instrument project.\n"); |
|
112 printf(" -a Analyze report file.\n"); |
|
113 //printf(" -u Create listing & map files.\n"); |
|
114 printf(" -c Clear AnalyzeTool changes and temporary files.\n"); |
|
115 printf(" -p Parse trace file.\n"); |
|
116 #ifdef HTI_SUPPORT |
|
117 printf(" -g Get analyze reports from phone. Without the file name\n"); |
|
118 printf(" gives a list of available files.\n"); |
|
119 #endif |
|
120 #ifdef HTI_SUPPORT |
|
121 printf(" -delete Delete datafile from the phone.\n"); |
|
122 #endif |
|
123 printf(" -help Show full help including syntax examples.\n"); |
|
124 printf("\n"); |
|
125 |
|
126 printf("Optional options:\n"); |
|
127 printf(" mmp-file Specifies one of the component from bld.inf which is used.\n"); |
|
128 printf(" target-name Specifies the target name of binary to which create\n"); |
|
129 printf(" analyze report.\n"); |
|
130 printf(" mode Logging mode (XTI or S60), default XTI.\n"); |
|
131 printf(" data-file Specifies the user defined data file name (50 chars max).\n"); |
|
132 printf(" build Build target (udeb or urel), default udeb.\n"); |
|
133 printf(" output-file Specifies the results data file name.\n"); |
|
134 printf(" -l Logging level of analyze report(0,1,2,3), default 3.\n"); |
|
135 printf(" -variant Specifies Symbian binary variant to be used.\n"); |
|
136 printf(" variant-name Specifies the variant name to be used.\n"); |
|
137 printf(" -s Specifies rom symbol file be used in analyze.\n"); |
|
138 printf(" symbol-file Full path to rom symbol file used in analyze.\n"); |
|
139 printf(" -sbs2 Use Symbian Build System v.2.\n"); |
|
140 printf(" -winscw Build project for emulator (winscw platform).\n"); |
|
141 printf(" -v Print version info.\n"); |
|
142 */ |
|
143 } |
|
144 |
|
145 void print_syntax_examples( void ) |
|
146 { |
|
147 //Helper line showing width of 80 chars. |
|
148 //80cout<< "12345678901234567890123456789012345678901234567890123456789012345678901234567890"; |
|
149 cout<< endl; |
|
150 cout<< "Building syntax examples:" << endl; |
|
151 cout<< "Cmd Description" << endl; |
|
152 |
|
153 cout<< "atool -e abld build armv5 udeb" << endl; |
|
154 cout<< " Hooks every component from bld.inf. Using external data gathering," << endl; |
|
155 cout<< " udeb build type and armv5 platform." << endl; |
|
156 |
|
157 cout<< "atool -mi -acs 5 sbs -c winscw_udeb" << endl; |
|
158 cout<< " Hooks every component from bld.inf. Using Symbian Build System v.2" << endl; |
|
159 cout<< " Using monitored internal data gathering, call stack size of 5" << endl; |
|
160 cout<< " in allocations, udeb build type and winscw platform." << endl; |
|
161 |
|
162 cout<< "atool -me abld build armv5 udeb foobar" << endl; |
|
163 cout<< " Hooks only foobar.mmp component from bld.inf. Using monitored" << endl; |
|
164 cout<< " external data gathering, udeb build type and armv5 platform." << endl; |
|
165 |
|
166 cout<< "atool -e -acs 0 -fcs 0 abld build armv5.default udeb" << endl; |
|
167 cout<< " Hooks every component from bld.inf. Using default binary variant," << endl; |
|
168 cout<< " external data gathering, 0 sized callstacks in allocation(s)/free(s)," << endl; |
|
169 cout<< " udeb build type and armv5 platform." << endl; |
|
170 |
|
171 cout<< "atool -e sbs -b bld.inf -c armv5_udeb" << endl; |
|
172 cout<< " Hooks every component from bld.inf. Using Symbian Build System v.2" << endl; |
|
173 cout<< " , external data gathering, udeb build type and armv5 platform." << endl; |
|
174 |
|
175 cout<< "atool -me sbs -s system.xml --config=winscw_udeb" << endl; |
|
176 cout<< " Hooks every layer defined in system.xml system model. Using Symbian Build" << endl; |
|
177 cout<< " System v.2, external data gathering, udeb build type and winscw platform." << endl; |
|
178 |
|
179 cout<< endl; |
|
180 cout<< "Instrumenting syntax examples:" << endl; |
|
181 cout<< "Cmd Description" << endl; |
|
182 cout<< "atool -e -nobuild abld build winscw udeb" << endl; |
|
183 cout<< " Instruments every component from bld.inf. Using external data gathering,"<<endl; |
|
184 cout<< " udeb build target and winscw platform." << endl; |
|
185 cout<< " After project is instrumented, it needs to compiled using same platform and" << endl; |
|
186 cout<< " build type as given to instrumenting. Use -c parameter to remove changes." << endl; |
|
187 |
|
188 cout<< endl; |
|
189 cout<< "Analyzing syntax examples:" << endl; |
|
190 cout<< "Cmd Description" << endl; |
|
191 cout<< "atool -a foo.dat" << endl; |
|
192 cout<< " Create analyze report from foo.dat device data file." << endl; |
|
193 cout<< "atool -a foo.trace" << endl; |
|
194 cout<< " Create analyze report from foo.trace raw data file." << endl; |
|
195 cout<< "atool -a foo.dat -s my_rom.symbol -s my_rofs1.symbol" << endl; |
|
196 cout<< " Create analyze report from foo.dat using also rom and rofs symbol files." << endl; |
|
197 |
|
198 cout<< endl; |
|
199 cout<< "Parsing syntax examples:" << endl; |
|
200 cout<< "Cmd Description" << endl; |
|
201 cout<< "atool -p foo.trace foo.dat" << endl; |
|
202 cout<< " Parse foo.trace raw data file to foo.dat device data file." << endl; |
|
203 } |
|
204 |
|
205 //EOF |
|