BVB Source Codes

voltron Show backtrace.py Source code

Return Download voltron: download backtrace.py Source code - Download voltron Source code - Type:.py
  1. import voltron
  2. from voltron.api import *
  3.  
  4.  
  5. import logging
  6.  
  7. import voltron
  8. from voltron.api import *
  9.  
  10. from scruffy.plugin import Plugin
  11.  
  12. log = logging.getLogger('api')
  13.  
  14.  
  15. class APIBacktraceRequest(APIRequest):
  16.     """
  17.    API backtrace request.
  18.  
  19.    {
  20.        "type":         "request",
  21.        "request":      "backtrace"
  22.    }
  23.    """
  24.     @server_side
  25.     def dispatch(self):
  26.         try:
  27.             bt = voltron.debugger.backtrace()
  28.             res = APIBacktraceResponse(frames=bt)
  29.         except NoSuchTargetException:
  30.             res = APINoSuchTargetErrorResponse()
  31.         except Exception as e:
  32.             msg = "Exception getting backtrace: {}".format(repr(e))
  33.             log.exception(msg)
  34.             res = APIGenericErrorResponse(msg)
  35.  
  36.         return res
  37.  
  38.  
  39. class APIBacktraceResponse(APISuccessResponse):
  40.     """
  41.    API backtrace response.
  42.  
  43.    {
  44.        "type":         "response",
  45.        "status":       "success",
  46.        "data": {
  47.            "frames": [
  48.                {
  49.                    "index": 0,
  50.                    "addr": 0xffff,
  51.                    "name": "inferior`main + 0"
  52.                }
  53.            ]
  54.        }
  55.    }
  56.    """
  57.     _fields = {'frames': True}
  58.  
  59.     frames = []
  60.  
  61.  
  62. class APIBacktracePlugin(APIPlugin):
  63.     request = "backtrace"
  64.     request_class = APIBacktraceRequest
  65.     response_class = APIBacktraceResponse
  66.  
downloadbacktrace.py Source code - Download voltron Source code
Related Source Codes/Software:
IGListKit - A data-driven UICollectionView framework for build... 2017-01-11
androidmvp - MVP Android Example 2017-01-11
svelte - The magical disappearing UI framework ... 2017-01-11
kcptun - A Simple UDP Tunnel Based On KCP 2017-01-11
poisontap - Exploits locked/password protected computers over ... 2017-01-10
ecma262 - Status, process, and documents for ECMA262 ... 2017-01-11
react-native-elements - React Native Elements UI Toolkit 2017-01-11
tensorflow-zh - Google new open source ai system TensorFlow Chines... 2017-01-11
forum - Blue light (the Lantern) the official BBS 2017-01-11
socketcluster - Highly scalable realtime framework ... 2017-01-11
CRYENGINE - CRYENGINE is a powerful real-time game development... 2017-06-11
postal - 2017-06-11
reactide - Reactide is the first dedicated IDE for React web ... 2017-06-11
rkt - rkt is a pod-native container engine for Linux. It... 2017-06-11
uWebSockets - Tiny WebSockets https://for... 2017-06-11
realworld - TodoMVC for the RealWorld - Exemplary fullstack Me... 2017-06-11
goreplay - GoReplay is an open-source tool for capturing and ... 2017-06-10
pyenv - Simple Python version management 2017-06-10
redux-saga - An alternative side effect model for Redux apps ... 2017-06-10
angular-starter - 2017-06-10

 Back to top