@@ -132,7 +132,7 @@ Two parts of performing stack analysis
132
132
133
133
:command: `gprbuild --RTS=light main_unit.adb -cargs -fcallgraph-info=su `
134
134
135
- *We use the light runtime to avoid issues with things like the secondary stack *
135
+ *We use the light runtime to avoid including things like the secondary stack *
136
136
137
137
2. Analysis and report generation
138
138
@@ -153,21 +153,44 @@ Which generates the following report:
153
153
+-> main_unit
154
154
+-> main_unit.inverse
155
155
156
+ *Note that the actual stack usage can depend on things like runtime, operating system, and compiler version. *
157
+
156
158
================================
157
159
:toolname: `GNATstack ` Switches
158
160
================================
159
161
160
- ----------------------------------
161
- Controlling Behavior When Called
162
- ----------------------------------
162
+ ----------------------------
163
+ Execution-Related Switches
164
+ ----------------------------
163
165
164
- * TBD
166
+ :command: ` -e main1[,main2[,...] ` | rightarrow | Use list of subprograms as entry points
165
167
166
- ---------------------------
167
- TBD
168
- ---------------------------
168
+ :command: `-a ` |rightarrow | Use all subprograms as entry points
169
169
170
- * TBD
170
+ :command: `-f filename ` |rightarrow | Store callgraph in :filename: `filename `
171
+
172
+ * If not specified, stored in :filename: `graph.vcg `
173
+
174
+ :command: `-P project ` |rightarrow | Use GPR file :filename: `project ` to find :filename: `*.ci ` files
175
+
176
+ ------------------------
177
+ Commonly Used Switches
178
+ ------------------------
179
+
180
+ :command: `-v ` |rightarrow | verbose
181
+
182
+ * Show source location for subprogam
183
+
184
+ :command: `-o=\{ a,s\} ` |rightarrow | order for displaying call graphs
185
+
186
+ * **a ** sort alphabetically
187
+ * **s ** sort by stack usage (default)
188
+
189
+ :command: `-t=\{ i,d,a\} ` - print target for indirect/dispatching calls
190
+
191
+ * **i ** for indirect calls only
192
+ * **d ** for dispatching calls only
193
+ * **a ** for both indirect and dispatching calls
171
194
172
195
=====
173
196
Lab
0 commit comments