def build_requests(self): height, width = self.window_size() # check args if self.args.register: args = {'register': self.args.register} elif self.args.command: args = {'command': self.args.command} else: if self.args.address.startswith('0x'): addr = int(self.args.address, 16) else: try: addr = int(self.args.address, 10) except: addr = int(self.args.address, 16) args = {'address': addr} if self.args.deref: args['words'] = height else: args['length'] = height * self.args.bytes args['offset'] = self.scroll_offset # get memory and target info return [ api_request('targets'), api_request('memory', deref=self.args.deref is True, **args) ]
def build_requests(self): height, width = self.window_size() # check args if self.args.register: args = {'register': self.args.register} elif self.args.command: args = {'command': self.args.command} elif self.args.address: if self.args.address.startswith('0x'): addr = int(self.args.address, 16) else: try: addr = int(self.args.address, 10) except: addr = int(self.args.address, 16) args = {'address': addr} else: args = {'register': 'sp'} if self.args.deref: args['words'] = height args[ 'offset'] = self.scroll_offset if self.args.reverse else -self.scroll_offset else: args['length'] = height * self.args.bytes args[ 'offset'] = self.scroll_offset * self.args.bytes if self.args.reverse else -self.scroll_offset * self.args.bytes # get memory and target info return [ api_request('targets'), api_request('memory', deref=self.args.deref is True, **args) ]
def build_requests(self): height, width = self.window_size() # check args if self.args.register: args = {'register': self.args.register} elif self.args.command: args = {'command': self.args.command} elif self.args.address: if self.args.address.startswith('0x'): addr = int(self.args.address, 16) else: try: addr = int(self.args.address, 10) except: addr = int(self.args.address, 16) # force address be 4-byte aligned addr = int(addr/4)*4 args = {'address': addr} else: args = {'register': 'sp'} args['length'] = self.args.stride*height args['offset'] = self.scroll_offset*self.args.stride if self.args.reverse else -self.scroll_offset*self.args.stride if self.args.max: args['length'] = self.args.max # get memory and target info return [ api_request('targets'), api_request('memory', deref=False, **args) ]
def build_requests(self): if self.args.address: if self.args.address.startswith('0x'): addr = int(self.args.address, 16) else: try: addr = int(self.args.address, 10) except: addr = int(self.args.address, 16) else: addr = None req = api_request('disassemble', block=self.block, use_capstone=self.args.use_capstone, offset=self.scroll_offset, address=addr) req.count = self.body_height() return [req]
def build_requests(): return [ api_request('registers', registers=['pc'], block=True), api_request('breakpoints', block=True), ]