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
mobile-chrome-apps - Chrome apps on Android and iOS 2017-02-20
pycrumbs - Bits and bytes of Python from the Internet 2017-02-20
drupal - Verbatim mirror of the git.drupal.org repository f... 2017-02-20
elasticsearch-head - A web front end for an elastic search cluster 2017-02-19
launchrocket - A Mac PrefPane to manage all your Homebrew-install... 2017-02-19
jquery-boilerplate - A jump-start for jQuery plugins development ... 2017-02-19
MVVMReactiveCocoa - GitBucket iOS A 2017-02-19
ios-webkit-debug-proxy - A DevTools proxy (Chrome Remote Debugging Protocol... 2017-02-19
jump.js - A modern smooth scrolling library. ... 2017-02-19
GoSublime - A Golang plugin collection for SublimeText **3**, ... 2017-02-19

 Back to top