proxygen
gdb.FiberPrinter Class Reference

Public Member Functions

def __init__ (self, val)
 
def state_to_string (self)
 
def backtrace_available (self)
 
def children (self)
 
def to_string (self)
 
def display_hint (self)
 

Public Attributes

 val
 
 state
 

Detailed Description

Print a folly::fibers::Fiber

Definition at line 13 of file gdb.py.

Constructor & Destructor Documentation

def gdb.FiberPrinter.__init__ (   self,
  val 
)

Definition at line 16 of file gdb.py.

16  def __init__(self, val):
17  self.val = val
18 
19  state = self.val['state_']
20  d = gdb.types.make_enum_dict(state.type)
21  d = dict((v, k) for k, v in d.items())
22  self.state = d[int(state)]
23 
def __init__(self, val)
Definition: gdb.py:16

Member Function Documentation

def gdb.FiberPrinter.backtrace_available (   self)

Definition at line 41 of file gdb.py.

References gdb.FiberPrinter.state, folly::FutureDAGFunctor< T >.state, and http_parser.state.

Referenced by gdb.FiberPrinter.children().

42  return self.state != "folly::fibers::Fiber::INVALID" and \
43  self.state != "folly::fibers::Fiber::NOT_STARTED" and \
44  self.state != "folly::fibers::Fiber::RUNNING"
45 
def backtrace_available(self)
Definition: gdb.py:41
def gdb.FiberPrinter.children (   self)

Definition at line 46 of file gdb.py.

References gdb.FiberPrinter.backtrace_available(), and gdb.FiberPrinter.state_to_string().

46  def children(self):
47  result = collections.OrderedDict()
48  result["state"] = self.state_to_string()
49  result["backtrace available"] = self.backtrace_available()
50  return result.items()
51 
def backtrace_available(self)
Definition: gdb.py:41
def children(self)
Definition: gdb.py:46
def state_to_string(self)
Definition: gdb.py:24
def gdb.FiberPrinter.display_hint (   self)

Definition at line 55 of file gdb.py.

55  def display_hint(self):
56  return "folly::fibers::Fiber"
57 
58 
def display_hint(self)
Definition: gdb.py:55
def gdb.FiberPrinter.state_to_string (   self)

Definition at line 24 of file gdb.py.

References gdb.FiberPrinter.state, folly::FutureDAGFunctor< T >.state, and http_parser.state.

Referenced by gdb.FiberPrinter.children().

24  def state_to_string(self):
25  if self.state == "folly::fibers::Fiber::INVALID":
26  return "Invalid"
27  if self.state == "folly::fibers::Fiber::NOT_STARTED":
28  return "Not started"
29  if self.state == "folly::fibers::Fiber::READY_TO_RUN":
30  return "Ready to run"
31  if self.state == "folly::fibers::Fiber::RUNNING":
32  return "Running"
33  if self.state == "folly::fibers::Fiber::AWAITING":
34  return "Awaiting"
35  if self.state == "folly::fibers::Fiber::AWAITING_IMMEDIATE":
36  return "Awaiting immediate"
37  if self.state == "folly::fibers::Fiber::YIELDED":
38  return "Yielded"
39  return "Unknown"
40 
def state_to_string(self)
Definition: gdb.py:24
def gdb.FiberPrinter.to_string (   self)

Definition at line 52 of file gdb.py.

52  def to_string(self):
53  return "folly::fibers::Fiber"
54 
def to_string(self)
Definition: gdb.py:52

Member Data Documentation

gdb.FiberPrinter.state
gdb.FiberPrinter.val

Definition at line 17 of file gdb.py.


The documentation for this class was generated from the following file: