@@ -148,13 +148,30 @@ int sec_driver_parse_optionst::doit()
148
148
status () << " Generating GOTO Program" << messaget::eom;
149
149
lazy_goto_model.load_all_functions ();
150
150
151
+ // Show the symbol table before process_goto_functions mangles return
152
+ // values, etc
153
+ if (cmdline.isset (" show-symbol-table" ))
154
+ {
155
+ ::show_symbol_table (lazy_goto_model.symbol_table, get_ui());
156
+ return 6 ;
157
+ }
158
+
151
159
std::unique_ptr<goto_modelt> maybe_goto_model =
152
160
lazy_goto_modelt::process_whole_model_and_freeze (
153
161
std::move (lazy_goto_model));
154
162
if (maybe_goto_model == nullptr )
155
163
return 6 ;
156
164
goto_modelt &goto_model = *maybe_goto_model;
157
165
166
+ // show it?
167
+ if (cmdline.isset (" show-goto-functions" ))
168
+ {
169
+ namespacet ns (goto_model.symbol_table );
170
+
171
+ goto_model.goto_functions .output (ns, std::cout);
172
+ return 6 ;
173
+ }
174
+
158
175
if (cmdline.isset (" security-scanner" ))
159
176
{
160
177
return taint_do_security_scan (
@@ -378,22 +395,6 @@ bool sec_driver_parse_optionst::process_goto_functions(
378
395
379
396
// recalculate numbers, etc.
380
397
goto_model.goto_functions .update ();
381
-
382
- // show it?
383
- if (cmdline.isset (" show-goto-functions" ))
384
- {
385
- namespacet ns (goto_model.symbol_table );
386
-
387
- goto_model.goto_functions .output (ns, std::cout);
388
- return true ;
389
- }
390
-
391
- // show it?
392
- if (cmdline.isset (" show-symbol-table" ))
393
- {
394
- ::show_symbol_table (goto_model, get_ui());
395
- return true ;
396
- }
397
398
}
398
399
399
400
catch (const char *e)
0 commit comments