GDBMI_complete.st
author Jan Vrany <jan.vrany@fit.cvut.cz>
Mon, 28 Jan 2019 14:56:14 +0000
changeset 173 02546d4fbe6d
parent 166 5cb191425081
child 197 b4d1befee03a
permissions -rw-r--r--
Fix frame of `GDBThreadSelectedEvent` if inferior is running When ifnferior is running at time we get `=thread-selected` event, we should at least make that frame kind of usable by fixing up it's debugger and thread. This allow clients to use (to some extent) event's frame without worring (too much) about these details.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
166
5cb191425081 Add class for new MI command `-complete`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
     1
"
5cb191425081 Add class for new MI command `-complete`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
     2
jv:libgdbs - GNU Debugger Interface Library
5cb191425081 Add class for new MI command `-complete`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
     3
Copyright (C) 2015-now Jan Vrany
5cb191425081 Add class for new MI command `-complete`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
     4
5cb191425081 Add class for new MI command `-complete`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
     5
This library is free software; you can redistribute it and/or
5cb191425081 Add class for new MI command `-complete`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
     6
modify it under the terms of the GNU Lesser General Public
5cb191425081 Add class for new MI command `-complete`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
     7
License as published by the Free Software Foundation; either
5cb191425081 Add class for new MI command `-complete`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
     8
version 2.1 of the License. 
5cb191425081 Add class for new MI command `-complete`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
     9
5cb191425081 Add class for new MI command `-complete`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    10
This library is distributed in the hope that it will be useful,
5cb191425081 Add class for new MI command `-complete`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    11
but WITHOUT ANY WARRANTY; without even the implied warranty of
5cb191425081 Add class for new MI command `-complete`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    12
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
5cb191425081 Add class for new MI command `-complete`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    13
Lesser General Public License for more details.
5cb191425081 Add class for new MI command `-complete`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    14
5cb191425081 Add class for new MI command `-complete`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    15
You should have received a copy of the GNU Lesser General Public
5cb191425081 Add class for new MI command `-complete`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    16
License along with this library; if not, write to the Free Software
5cb191425081 Add class for new MI command `-complete`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    17
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
5cb191425081 Add class for new MI command `-complete`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    18
"
5cb191425081 Add class for new MI command `-complete`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    19
"{ Package: 'jv:libgdbs' }"
5cb191425081 Add class for new MI command `-complete`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    20
5cb191425081 Add class for new MI command `-complete`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    21
"{ NameSpace: Smalltalk }"
5cb191425081 Add class for new MI command `-complete`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    22
5cb191425081 Add class for new MI command `-complete`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    23
GDBMICommand subclass:#GDBMI_complete
5cb191425081 Add class for new MI command `-complete`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    24
	instanceVariableNames:''
5cb191425081 Add class for new MI command `-complete`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    25
	classVariableNames:''
5cb191425081 Add class for new MI command `-complete`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    26
	poolDictionaries:''
5cb191425081 Add class for new MI command `-complete`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    27
	category:'GDB-Core-Commands-MI'
5cb191425081 Add class for new MI command `-complete`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    28
!
5cb191425081 Add class for new MI command `-complete`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    29
5cb191425081 Add class for new MI command `-complete`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    30
!GDBMI_complete class methodsFor:'documentation'!
5cb191425081 Add class for new MI command `-complete`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    31
5cb191425081 Add class for new MI command `-complete`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    32
copyright
5cb191425081 Add class for new MI command `-complete`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    33
"
5cb191425081 Add class for new MI command `-complete`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    34
jv:libgdbs - GNU Debugger Interface Library
5cb191425081 Add class for new MI command `-complete`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    35
Copyright (C) 2015-now Jan Vrany
5cb191425081 Add class for new MI command `-complete`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    36
5cb191425081 Add class for new MI command `-complete`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    37
This library is free software; you can redistribute it and/or
5cb191425081 Add class for new MI command `-complete`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    38
modify it under the terms of the GNU Lesser General Public
5cb191425081 Add class for new MI command `-complete`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    39
License as published by the Free Software Foundation; either
5cb191425081 Add class for new MI command `-complete`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    40
version 2.1 of the License. 
5cb191425081 Add class for new MI command `-complete`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    41
5cb191425081 Add class for new MI command `-complete`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    42
This library is distributed in the hope that it will be useful,
5cb191425081 Add class for new MI command `-complete`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    43
but WITHOUT ANY WARRANTY; without even the implied warranty of
5cb191425081 Add class for new MI command `-complete`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    44
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
5cb191425081 Add class for new MI command `-complete`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    45
Lesser General Public License for more details.
5cb191425081 Add class for new MI command `-complete`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    46
5cb191425081 Add class for new MI command `-complete`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    47
You should have received a copy of the GNU Lesser General Public
5cb191425081 Add class for new MI command `-complete`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    48
License along with this library; if not, write to the Free Software
5cb191425081 Add class for new MI command `-complete`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    49
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
5cb191425081 Add class for new MI command `-complete`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    50
"
5cb191425081 Add class for new MI command `-complete`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    51
!
5cb191425081 Add class for new MI command `-complete`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    52
5cb191425081 Add class for new MI command `-complete`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    53
documentation
5cb191425081 Add class for new MI command `-complete`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    54
"
5cb191425081 Add class for new MI command `-complete`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    55
The '-complete' Command
5cb191425081 Add class for new MI command `-complete`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    56
-----------------------
5cb191425081 Add class for new MI command `-complete`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    57
5cb191425081 Add class for new MI command `-complete`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    58
Synopsis
5cb191425081 Add class for new MI command `-complete`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    59
--------
5cb191425081 Add class for new MI command `-complete`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    60
5cb191425081 Add class for new MI command `-complete`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    61
     -complete COMMAND
5cb191425081 Add class for new MI command `-complete`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    62
5cb191425081 Add class for new MI command `-complete`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    63
   Show a list of completions for partially typed CLI COMMAND.  The
5cb191425081 Add class for new MI command `-complete`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    64
COMMAND should be given in verbatim without any quoting / escaping.
5cb191425081 Add class for new MI command `-complete`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    65
5cb191425081 Add class for new MI command `-complete`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    66
GDB Command
5cb191425081 Add class for new MI command `-complete`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    67
-----------
5cb191425081 Add class for new MI command `-complete`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    68
5cb191425081 Add class for new MI command `-complete`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    69
The corresponding GDB command is 'complete'.
5cb191425081 Add class for new MI command `-complete`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    70
5cb191425081 Add class for new MI command `-complete`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    71
Example
5cb191425081 Add class for new MI command `-complete`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    72
-------
5cb191425081 Add class for new MI command `-complete`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    73
5cb191425081 Add class for new MI command `-complete`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    74
     (gdb)
5cb191425081 Add class for new MI command `-complete`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    75
     -complete br
5cb191425081 Add class for new MI command `-complete`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    76
     ^done,completions=['break','break-range'],max_completions_reached='0'
5cb191425081 Add class for new MI command `-complete`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    77
     (gdb)
5cb191425081 Add class for new MI command `-complete`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    78
     -complete b madv
5cb191425081 Add class for new MI command `-complete`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    79
     ^done,completions=['b madvise'],max_completions_reached='0'
5cb191425081 Add class for new MI command `-complete`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    80
     (gdb)
5cb191425081 Add class for new MI command `-complete`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    81
"
5cb191425081 Add class for new MI command `-complete`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    82
! !
5cb191425081 Add class for new MI command `-complete`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    83
5cb191425081 Add class for new MI command `-complete`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    84
!GDBMI_complete methodsFor:'accessing'!
5cb191425081 Add class for new MI command `-complete`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    85
5cb191425081 Add class for new MI command `-complete`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    86
operation   
5cb191425081 Add class for new MI command `-complete`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    87
    ^ 'complete'
5cb191425081 Add class for new MI command `-complete`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    88
5cb191425081 Add class for new MI command `-complete`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    89
    "Created: / 30-12-2018 / 21:44:35 / Jan Vrany <jan.vrany@fit.cvut.cz>"
5cb191425081 Add class for new MI command `-complete`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    90
! !
5cb191425081 Add class for new MI command `-complete`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    91
5cb191425081 Add class for new MI command `-complete`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    92
!GDBMI_complete methodsFor:'converting'!
5cb191425081 Add class for new MI command `-complete`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    93
5cb191425081 Add class for new MI command `-complete`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    94
asString
5cb191425081 Add class for new MI command `-complete`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    95
    ^ String streamContents: [ :s |
5cb191425081 Add class for new MI command `-complete`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    96
        token notNil ifTrue:[
5cb191425081 Add class for new MI command `-complete`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    97
            token printOn: s.
5cb191425081 Add class for new MI command `-complete`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    98
        ].
5cb191425081 Add class for new MI command `-complete`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    99
        s nextPut: $-; nextPutAll: self operation.
5cb191425081 Add class for new MI command `-complete`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   100
        s space.
5cb191425081 Add class for new MI command `-complete`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   101
        arguments do:[:argument | s nextPutAll: argument ] separatedBy: [ s space ]
5cb191425081 Add class for new MI command `-complete`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   102
    ]
5cb191425081 Add class for new MI command `-complete`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   103
5cb191425081 Add class for new MI command `-complete`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   104
    "Created: / 01-01-2019 / 00:49:11 / Jan Vrany <jan.vrany@fit.cvut.cz>"
5cb191425081 Add class for new MI command `-complete`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   105
    "Modified: / 01-01-2019 / 23:53:27 / Jan Vrany <jan.vrany@fit.cvut.cz>"
5cb191425081 Add class for new MI command `-complete`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   106
! !
5cb191425081 Add class for new MI command `-complete`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   107
5cb191425081 Add class for new MI command `-complete`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   108
!GDBMI_complete class methodsFor:'documentation'!
5cb191425081 Add class for new MI command `-complete`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   109
5cb191425081 Add class for new MI command `-complete`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   110
version_HG
5cb191425081 Add class for new MI command `-complete`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   111
5cb191425081 Add class for new MI command `-complete`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   112
    ^ '$Changeset: <not expanded> $'
5cb191425081 Add class for new MI command `-complete`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   113
! !
5cb191425081 Add class for new MI command `-complete`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   114