File tree 2 files changed +21
-0
lines changed
2 files changed +21
-0
lines changed Original file line number Diff line number Diff line change @@ -856,3 +856,22 @@ void goto_symex_statet::switch_to_thread(unsigned t)
856
856
857
857
guard=threads[t].guard ;
858
858
}
859
+
860
+ void goto_symex_statet::print_backtrace (std::ostream &out)
861
+ {
862
+ out << source.pc ->function << " " << source.pc ->location_number << " \n " ;
863
+
864
+ for (
865
+ auto stackit = threads[source.thread_nr ].call_stack .rbegin (),
866
+ stackend = threads[source.thread_nr ].call_stack .rend ();
867
+ stackit != stackend;
868
+ ++stackit)
869
+ {
870
+ const auto &frame = *stackit;
871
+ if (frame.calling_location .is_set )
872
+ {
873
+ out << frame.calling_location .pc ->function << " "
874
+ << frame.calling_location .pc ->location_number << " \n " ;
875
+ }
876
+ }
877
+ }
Original file line number Diff line number Diff line change @@ -340,6 +340,8 @@ class goto_symex_statet final
340
340
void pop_frame () { call_stack ().pop_back (); }
341
341
const framet &previous_frame () { return *(--(--call_stack ().end ())); }
342
342
343
+ void print_backtrace (std::ostream &);
344
+
343
345
// threads
344
346
unsigned atomic_section_id;
345
347
typedef std::pair<unsigned , std::list<guardt> > a_s_r_entryt;
You can’t perform that action at this time.
0 commit comments