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
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