VDBRegisterPresenter.st
author Jan Vrany <jan.vrany@labware.com>
Fri, 29 Jul 2022 16:12:54 +0100
changeset 266 e21d777d076e
parent 264 23960fcb9dac
permissions -rw-r--r--
Fix `VDBInstructionListApplication` to analyze blocks for standalone instruction list ...that is, for instructions without any "disassemblable" (function, address range). This is used in some inspector goodies on Compiler's code buffer.

"
jv:libgdbs - GNU Debugger Interface Library
Copyright (C) 2015-now Jan Vrany
Copyright (C) 2021-2022 LabWare

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the 'Software'), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
"
"{ Package: 'jv:vdb' }"

"{ NameSpace: Smalltalk }"

VDBAbstractPresenter subclass:#VDBRegisterPresenter
	instanceVariableNames:'register'
	classVariableNames:''
	poolDictionaries:''
	category:'VDB-Presentation'
!

!VDBRegisterPresenter class methodsFor:'documentation'!

copyright
"
jv:libgdbs - GNU Debugger Interface Library
Copyright (C) 2015-now Jan Vrany
Copyright (C) 2021-2022 LabWare

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the 'Software'), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
"
! !

!VDBRegisterPresenter class methodsFor:'menu specs'!

contextMenu
    "This resource specification was automatically generated
     by the MenuEditor of ST/X."

    "Do not manually edit this!! If it is corrupted,
     the MenuEditor may not be able to read the specification."


    "
     MenuEditor new openOnClass:VDBRegisterPresenter andSelector:#contextMenu
     (Menu new fromLiteralArrayEncoding:(VDBRegisterPresenter contextMenu)) startUp
    "

    <resource: #menu>

    ^ 
     #(Menu
        (
         (MenuItem
            label: 'Copy Value'
            itemValue: doCopyValue
            isVisible: true
          )
         )
        nil
        nil
      )
! !

!VDBRegisterPresenter methodsFor:'accessing'!

label
    ^ register name

    "Created: / 27-02-2015 / 15:57:35 / Jan Vrany <jan.vrany@fit.cvut.cz>"
    "Modified: / 27-09-2018 / 21:04:15 / Jan Vrany <jan.vrany@fit.cvut.cz>"
!

register
    ^ register

    "Created: / 27-09-2018 / 20:39:09 / Jan Vrany <jan.vrany@fit.cvut.cz>"
!

subject
    "Return an instance of GDB object that this presenter displays."

    ^ register

    "Modified: / 05-02-2018 / 13:08:54 / Jan Vrany <jan.vrany@fit.cvut.cz>"
!

tooltip
    ^ self valueString

    "Created: / 29-07-2018 / 21:35:25 / Jan Vrany <jan.vrany@fit.cvut.cz>"
!

value
    ^ register valueString

    "Created: / 02-06-2017 / 07:32:38 / Jan Vrany <jan.vrany@fit.cvut.cz>"
    "Modified: / 28-01-2018 / 22:49:54 / Jan Vrany <jan.vrany@fit.cvut.cz>"
    "Modified: / 10-09-2021 / 14:14:29 / Jan Vrany <jan.vrany@labware.com>"
!

valueString
    ^ register valueString

    "Created: / 11-06-2017 / 23:25:28 / Jan Vrany <jan.vrany@fit.cvut.cz>"
    "Modified: / 01-09-2018 / 00:55:24 / Jan Vrany <jan.vrany@fit.cvut.cz>"
    "Modified: / 10-09-2021 / 14:14:47 / Jan Vrany <jan.vrany@labware.com>"
! !

!VDBRegisterPresenter methodsFor:'initialization'!

setRegister:aGDBRegisterWithValue 
    register := aGDBRegisterWithValue

    "Created: / 27-09-2018 / 20:38:00 / Jan Vrany <jan.vrany@fit.cvut.cz>"
! !

!VDBRegisterPresenter methodsFor:'menu actions'!

doCopyValue
    self doCopy: register value.

    "Created: / 16-01-2018 / 23:28:56 / jv"
    "Modified: / 28-01-2018 / 22:55:14 / Jan Vrany <jan.vrany@fit.cvut.cz>"
! !

!VDBRegisterPresenter methodsFor:'protocol-queries'!

hasChanged
    ^ register hasChanged

    "Created: / 18-03-2022 / 11:27:45 / Jan Vrany <jan.vrany@labware.com>"
!

hasChildren
    ^ false

    "Created: / 28-01-2018 / 22:49:07 / Jan Vrany <jan.vrany@fit.cvut.cz>"
    "Modified: / 27-09-2018 / 20:38:58 / Jan Vrany <jan.vrany@fit.cvut.cz>"
! !

!VDBRegisterPresenter methodsFor:'testing'!

isRegisterPresenter
    ^ true
! !

!VDBRegisterPresenter class methodsFor:'documentation'!

version_HG

    ^ '$Changeset: <not expanded> $'
! !