File tree 2 files changed +20
-0
lines changed
2 files changed +20
-0
lines changed Original file line number Diff line number Diff line change @@ -774,3 +774,21 @@ void goto_symex_statet::get_l1_name(exprt &expr) const
774
774
Forall_operands (it, expr)
775
775
get_l1_name (*it);
776
776
}
777
+
778
+ void goto_symex_statet::print_backtrace (std::ostream &out)
779
+ {
780
+ out << source.pc ->function << " " << source.pc ->location_number << " \n " ;
781
+
782
+ for (auto stackit = threads[source.thread_nr ].call_stack .rbegin (),
783
+ stackend = threads[source.thread_nr ].call_stack .rend ();
784
+ stackit != stackend;
785
+ ++stackit)
786
+ {
787
+ const auto &frame = *stackit;
788
+ if (frame.calling_location .is_set )
789
+ {
790
+ out << frame.calling_location .pc ->function << " "
791
+ << frame.calling_location .pc ->location_number << " \n " ;
792
+ }
793
+ }
794
+ }
Original file line number Diff line number Diff line change @@ -230,6 +230,8 @@ class goto_symex_statet final
230
230
void pop_frame () { call_stack ().pop_back (); }
231
231
const framet &previous_frame () { return *(--(--call_stack ().end ())); }
232
232
233
+ void print_backtrace (std::ostream &);
234
+
233
235
// threads
234
236
unsigned atomic_section_id;
235
237
typedef std::pair<unsigned , std::list<guardt> > a_s_r_entryt;
You can’t perform that action at this time.
0 commit comments