#include <debugger.h>
Definition at line 460 of file debugger.h.
◆ DebuggerStackTrace()
dart::DebuggerStackTrace::DebuggerStackTrace |
( |
int |
capacity | ) |
|
|
inlineexplicit |
Definition at line 462 of file debugger.h.
static Thread * Current()
◆ Collect()
Definition at line 1671 of file debugger.cc.
1671 {
1673 Zone* zone = thread->zone();
1674
1677
1680 for (StackFrame*
frame = iterator.NextFrame();
frame !=
nullptr;
1681 frame = iterator.NextFrame()) {
1683 if (FLAG_trace_debugger_stacktrace) {
1684 OS::PrintErr(
"CollectStackTrace: visiting frame:\n\t%s\n",
1685 frame->ToCString());
1686 }
1687 if (
frame->IsDartFrame()) {
1689 stack_trace->AppendCodeFrames(
frame,
code);
1690 }
1691 }
1692 return stack_trace;
1693}
DebuggerStackTrace(int capacity)
static void static void PrintErr(const char *format,...) PRINTF_ATTRIBUTE(1
@ kNoCrossThreadIteration
◆ CollectAsyncAwaiters()
Definition at line 1732 of file debugger.cc.
1732 {
1734 Zone* zone = thread->zone();
1735
1737
1740
1741 bool has_async = false;
1744 thread, 0,
1745 [&](
const StackTraceUtils::Frame&
frame) {
1746 if (
frame.frame !=
nullptr) {
1747 stack_trace->AppendCodeFrames(frame.frame, frame.code);
1748 } else {
1749 has_async = true;
1750
1751 if (frame.code.ptr() == StubCode::AsynchronousGapMarker().ptr()) {
1752 stack_trace->AddAsyncSuspension();
1753 return;
1754 }
1755
1756
1759 return;
1760 }
1761
1762 const uword absolute_pc =
frame.code.PayloadStart() +
frame.pc_offset;
1763 stack_trace->AddAsyncAwaiterFrame(absolute_pc,
frame.code,
1765 }
1766 },
1768
1769
1770 if (!has_async) {
1771 return nullptr;
1772 }
1773
1775
1776 return stack_trace;
1777}
bool has_async_catch_error() const
static void CollectFrames(Thread *thread, int skip_frames, const std::function< void(const Frame &)> &handle_frame, bool *has_async_catch_error=nullptr)
Dart_NativeFunction function
static constexpr intptr_t kDefaultStackAllocation
◆ FrameAt()
◆ From()
Definition at line 1808 of file debugger.cc.
1808 {
1813
1817 const intptr_t deopt_frame_offset = -1;
1818
1819 for (intptr_t
i = 0;
i < ex_trace.Length();
i++) {
1820 code_object = ex_trace.CodeAtFrame(
i);
1821
1822
1823
1824
1825
1826 if (!code_object.IsNull()) {
1827 code ^= code_object.ptr();
1832 uword pc =
code.PayloadStart() + ex_trace.PcOffsetAtFrame(
i);
1833 if (
code.is_optimized() && ex_trace.expand_inlined()) {
1834
1835 for (InlinedFunctionsIterator it(
code, pc); !it.Done();
1836 it.Advance()) {
1844
1845 ActivationFrame* activation = new ActivationFrame(
1846 pc,
fp, sp,
code, deopt_frame, deopt_frame_offset);
1847 stack_trace->AddActivation(activation);
1848 }
1849 } else {
1850 ActivationFrame* activation = new ActivationFrame(
1851 pc,
fp, sp,
code, deopt_frame, deopt_frame_offset);
1852 stack_trace->AddActivation(activation);
1853 }
1854 }
1855 }
1856 }
1857 return stack_trace;
1858}
◆ GetHandlerFrame()
Definition at line 733 of file debugger.cc.
734 {
735 if (FLAG_trace_debugger_stacktrace) {
736 OS::PrintErr(
"GetHandlerFrame(%s)\n", exc_obj.ToCString());
737 }
738
739 for (intptr_t frame_index = 0; frame_index <
Length(); frame_index++) {
741 const bool can_handle =
frame->HandlesException(exc_obj);
742 if (FLAG_trace_debugger_stacktrace) {
744 can_handle ?
"+" :
"-",
frame->ToCString());
745 }
746 if (can_handle) {
748 }
749 }
750 return nullptr;
751}
ActivationFrame * FrameAt(int i) const
◆ has_async_catch_error()
bool dart::DebuggerStackTrace::has_async_catch_error |
( |
| ) |
const |
|
inline |
Definition at line 479 of file debugger.h.
479{ return has_async_catch_error_; }
◆ Length()
intptr_t dart::DebuggerStackTrace::Length |
( |
| ) |
const |
|
inline |
Definition at line 465 of file debugger.h.
465{ return trace_.length(); }
◆ set_has_async_catch_error()
void dart::DebuggerStackTrace::set_has_async_catch_error |
( |
bool |
has_async_catch_error | ) |
|
|
inline |
◆ Debugger
The documentation for this class was generated from the following files: