BVB Source Codes

voltron Show breakpoints.py Source code

Return Download voltron: download breakpoints.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 APIBreakpointsRequest(APIRequest):
  16.     """
  17.    API breakpoints request.
  18.  
  19.    {
  20.        "type":         "request",
  21.        "request":      "breakpoints"
  22.    }
  23.    """
  24.     @server_side
  25.     def dispatch(self):
  26.         try:
  27.             bps = voltron.debugger.breakpoints()
  28.             res = APIBreakpointsResponse(breakpoints=bps)
  29.         except NoSuchTargetException:
  30.             res = APINoSuchTargetErrorResponse()
  31.         except Exception as e:
  32.             msg = "Exception getting breakpoints: {}".format(repr(e))
  33.             log.exception(msg)
  34.             res = APIGenericErrorResponse(msg)
  35.  
  36.         return res
  37.  
  38.  
  39. class APIBreakpointsResponse(APISuccessResponse):
  40.     """
  41.    API breakpoints response.
  42.  
  43.    {
  44.        "type":         "response",
  45.        "status":       "success",
  46.        "data": {
  47.            "breakpoints": [
  48.                {
  49.                    "id":           1,
  50.                    "enabled":      True,
  51.                    "one_shot":     False,
  52.                    "hit_count":    5,
  53.                    "locations": [
  54.                        {
  55.                            "address":  0x100000cf0,
  56.                            "name":     'main'
  57.                        }
  58.                    ]
  59.                }
  60.            ]
  61.        }
  62.    }
  63.    """
  64.     _fields = {'breakpoints': True}
  65.  
  66.     breakpoints = []
  67.  
  68.  
  69. class APIBreakpointsPlugin(APIPlugin):
  70.     request = "breakpoints"
  71.     request_class = APIBreakpointsRequest
  72.     response_class = APIBreakpointsResponse
  73.  
downloadbreakpoints.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