Print call stack trace of a thread. Only works on suspended threads. @param t suspended thread to print stack trace of
(ThreadReference t)
| 743 | * @param t suspended thread to print stack trace of |
| 744 | */ |
| 745 | protected void printStackTrace(ThreadReference t) { |
| 746 | if (!t.isSuspended()) { |
| 747 | return; |
| 748 | } |
| 749 | try { |
| 750 | System.out.println("stack trace for thread " + t.name() + ":"); |
| 751 | int i = 0; |
| 752 | for (StackFrame f : t.frames()) { |
| 753 | // Location l = f.location(); |
| 754 | System.out.println(i++ + ": " + f.toString()); |
| 755 | } |
| 756 | } catch (IncompatibleThreadStateException ex) { |
| 757 | logitse(ex); |
| 758 | } |
| 759 | } |
| 760 | |
| 761 | |
| 762 | /** |