VDBUnixDebuggerConsoleApplication.st
author Jan Vrany <jan.vrany@labware.com>
Tue, 26 Jul 2022 15:01:33 +0100
changeset 265 f2470f0dd9cd
parent 264 23960fcb9dac
permissions -rw-r--r--
Do not show address for (pseudo) instructions with no code While such instructions do not appear in GDB-produced disassembly, they may appear in some manually-generated instruction lists. One example of such (pseudo) instruction is label.

"
jv:libgdbs - GNU Debugger Interface Library
Copyright (C) 2015-now Jan Vrany
Copyright (C) 2020 LabWare
Copyright (C) 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 }"

VDBAbstractUnixConsoleApplication subclass:#VDBUnixDebuggerConsoleApplication
	instanceVariableNames:''
	classVariableNames:''
	poolDictionaries:''
	category:'VDB-UI-Console-Unix'
!

!VDBUnixDebuggerConsoleApplication class methodsFor:'documentation'!

copyright
"
jv:libgdbs - GNU Debugger Interface Library
Copyright (C) 2015-now Jan Vrany
Copyright (C) 2020 LabWare
Copyright (C) 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.
"
! !

!VDBUnixDebuggerConsoleApplication class methodsFor:'accessing'!

defaultWindowTitle
    ^ self resources string: 'Debugger Console'

    "Created: / 08-01-2018 / 18:59:02 / Jan Vrany <jan.vrany@fit.cvut.cz>"
    "Modified: / 03-10-2018 / 15:39:18 / Jan Vrany <jan.vrany@fit.cvut.cz>"
! !

!VDBUnixDebuggerConsoleApplication class methodsFor:'startup-web applications'!

initialPageSpec
    "this is only required for web-applications"

    ^ self shouldImplement
!

pageSpecs
    "this is only required for web-applications"

    ^ self shouldImplement
! !

!VDBUnixDebuggerConsoleApplication methodsFor:'accessing'!

consoleInput
    "superclass VDBAbstractConsoleApplication says that I am responsible to implement this method"

    ^ debugger consoleInput

    "Modified: / 01-06-2017 / 09:45:21 / Jan Vrany <jan.vrany@fit.cvut.cz>"
!

consoleOutput
    "superclass VDBAbstractConsoleApplication says that I am responsible to implement this method"

    ^ debugger consoleOutput

    "Modified: / 01-06-2017 / 09:46:18 / Jan Vrany <jan.vrany@fit.cvut.cz>"
! !

!VDBUnixDebuggerConsoleApplication methodsFor:'change & update'!

enqueueDelayedUpdateSize
    self enqueueMessage:#delayedUpdateSize

    "Created: / 20-05-2019 / 11:57:24 / Jan Vrany <jan.vrany@fit.cvut.cz>"
!

update:aspect with:aParameter from:changedObject
    changedObject == consoleView ifTrue:[ 
        aspect == #sizeOfView ifTrue:[ 
            self enqueueDelayedUpdateSize     
        ].
    ].
    ^ super update:aspect with:aParameter from:changedObject

    "Created: / 20-05-2019 / 11:54:51 / Jan Vrany <jan.vrany@fit.cvut.cz>"
! !

!VDBUnixDebuggerConsoleApplication methodsFor:'change & update-delayed'!

delayedUpdateSize
    debugger notNil ifTrue:[
        debugger setParameter: 'width'  to: (consoleView widthInChars max: 0) printString.
        debugger setParameter: 'height' to: (consoleView heightInChars max: 0) printString.
    ]

    "Created: / 20-05-2019 / 13:35:34 / Jan Vrany <jan.vrany@fit.cvut.cz>"
    "Modified: / 16-11-2020 / 21:46:52 / Jan Vrany <jan.vrany@labware.com>"
! !

!VDBUnixDebuggerConsoleApplication methodsFor:'initialization & release'!

initializeConsoleView: aTerminalView forDebugger: aGDBDebugger
    super initializeConsoleView: aTerminalView forDebugger: aGDBDebugger.
    aGDBDebugger notNil ifTrue:[
        self enqueueDelayedUpdateSize
    ].

    "Created: / 20-05-2019 / 13:36:52 / Jan Vrany <jan.vrany@fit.cvut.cz>"
! !

!VDBUnixDebuggerConsoleApplication class methodsFor:'documentation'!

version_HG

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