import { Remote } from '../remotes/remotebase' ; import { MemoryDumpView } from './memorydumpview' ; /**
 * A Webview that shows the memory dump for certain registers.
 * I.e. it looks at the registers value and chooses a matching memory
 * range to display.
 */ export class MemoryRegisterView extends MemoryDumpView { protected registers = new Array < string > ( ) ; /**
     * Constructor.
     */ constructor ( ) { super ( ) ; this . vscodePanel . title = 'Memory View for Registers' ; } /**
     * Select the registers to display the memory contents.
     */ public addRegisters ( addRegs ) { this . registers . push ( ... addRegs ) ; } param reason public async update ( reason ? ) { if ( ! this . vscodePanel . webview . html ) { for ( let reg of this . registers ) { const value = Remote . getRegisterValue ( reg ) ; this . memDump . addBlock ( value , 1 , '@' + reg ) ; } } else { let i = 0 ; for ( let reg of this . registers ) { const value = Remote . getRegisterValue ( reg ) ; this . memDump . changeBlock ( i , value , 1 ) ; i ++ ; } } await super . update ( reason ) ; } }