Ask user for how many bytes to read

This commit is contained in:
Ben Jackson 2021-06-08 22:25:24 +01:00
commit 58a1c05465

View file

@ -543,13 +543,16 @@ class DebugSession( object ):
return return
memoryReference = self._variablesView.GetMemoryReference( buf, line_num ) memoryReference = self._variablesView.GetMemoryReference( buf, line_num )
length = 1024 # TODO: WHat?
if memoryReference is None: if memoryReference is None:
utils.UserMessage( "Cannot find memory reference for that", utils.UserMessage( "Cannot find memory reference for that",
error = True ) error = True )
return return
length = utils.AskForInput( 'How much data to display? ',
default_value = '1024' )
if length is None:
return
def handler( msg ): def handler( msg ):
@ -559,7 +562,7 @@ class DebugSession( object ):
'command': 'readMemory', 'command': 'readMemory',
'arguments': { 'arguments': {
'memoryReference': memoryReference, 'memoryReference': memoryReference,
'count': length, 'count': int( length ),
} }
} ) } )