author | Jan Vrany <jan.vrany@labware.com> |
Fri, 08 Sep 2023 12:40:22 +0100 | |
changeset 317 | 7f63737e0374 |
parent 272 | cdd1c9ad00de |
permissions | -rw-r--r-- |
205
26ed194991b7
Add RISC-V architecture definition
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
1 |
" |
26ed194991b7
Add RISC-V architecture definition
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
2 |
jv:libgdbs - GNU Debugger Interface Library |
26ed194991b7
Add RISC-V architecture definition
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
3 |
Copyright (C) 2015-now Jan Vrany |
272
cdd1c9ad00de
Change class categories to facilitate Pharo port
Jan Vrany <jan.vrany@labware.com>
parents:
259
diff
changeset
|
4 |
Copyright (C) 2021-2023 LabWare |
205
26ed194991b7
Add RISC-V architecture definition
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
5 |
|
259
651864c2aa29
Relicense under MIT license.
Jan Vrany <jan.vrany@labware.com>
parents:
241
diff
changeset
|
6 |
Permission is hereby granted, free of charge, to any person obtaining a copy |
651864c2aa29
Relicense under MIT license.
Jan Vrany <jan.vrany@labware.com>
parents:
241
diff
changeset
|
7 |
of this software and associated documentation files (the 'Software'), to deal |
651864c2aa29
Relicense under MIT license.
Jan Vrany <jan.vrany@labware.com>
parents:
241
diff
changeset
|
8 |
in the Software without restriction, including without limitation the rights |
651864c2aa29
Relicense under MIT license.
Jan Vrany <jan.vrany@labware.com>
parents:
241
diff
changeset
|
9 |
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell |
651864c2aa29
Relicense under MIT license.
Jan Vrany <jan.vrany@labware.com>
parents:
241
diff
changeset
|
10 |
copies of the Software, and to permit persons to whom the Software is |
651864c2aa29
Relicense under MIT license.
Jan Vrany <jan.vrany@labware.com>
parents:
241
diff
changeset
|
11 |
furnished to do so, subject to the following conditions: |
205
26ed194991b7
Add RISC-V architecture definition
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
12 |
|
259
651864c2aa29
Relicense under MIT license.
Jan Vrany <jan.vrany@labware.com>
parents:
241
diff
changeset
|
13 |
The above copyright notice and this permission notice shall be included in all |
651864c2aa29
Relicense under MIT license.
Jan Vrany <jan.vrany@labware.com>
parents:
241
diff
changeset
|
14 |
copies or substantial portions of the Software. |
205
26ed194991b7
Add RISC-V architecture definition
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
15 |
|
259
651864c2aa29
Relicense under MIT license.
Jan Vrany <jan.vrany@labware.com>
parents:
241
diff
changeset
|
16 |
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR |
651864c2aa29
Relicense under MIT license.
Jan Vrany <jan.vrany@labware.com>
parents:
241
diff
changeset
|
17 |
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
651864c2aa29
Relicense under MIT license.
Jan Vrany <jan.vrany@labware.com>
parents:
241
diff
changeset
|
18 |
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE |
651864c2aa29
Relicense under MIT license.
Jan Vrany <jan.vrany@labware.com>
parents:
241
diff
changeset
|
19 |
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER |
651864c2aa29
Relicense under MIT license.
Jan Vrany <jan.vrany@labware.com>
parents:
241
diff
changeset
|
20 |
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, |
651864c2aa29
Relicense under MIT license.
Jan Vrany <jan.vrany@labware.com>
parents:
241
diff
changeset
|
21 |
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE |
651864c2aa29
Relicense under MIT license.
Jan Vrany <jan.vrany@labware.com>
parents:
241
diff
changeset
|
22 |
SOFTWARE. |
205
26ed194991b7
Add RISC-V architecture definition
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
23 |
" |
26ed194991b7
Add RISC-V architecture definition
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
24 |
"{ Package: 'jv:libgdbs' }" |
26ed194991b7
Add RISC-V architecture definition
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
25 |
|
26ed194991b7
Add RISC-V architecture definition
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
26 |
"{ NameSpace: Smalltalk }" |
26ed194991b7
Add RISC-V architecture definition
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
27 |
|
26ed194991b7
Add RISC-V architecture definition
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
28 |
GDBArchitecture subclass:#GDBArch_RV64 |
26ed194991b7
Add RISC-V architecture definition
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
29 |
instanceVariableNames:'' |
26ed194991b7
Add RISC-V architecture definition
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
30 |
classVariableNames:'' |
26ed194991b7
Add RISC-V architecture definition
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
31 |
poolDictionaries:'' |
272
cdd1c9ad00de
Change class categories to facilitate Pharo port
Jan Vrany <jan.vrany@labware.com>
parents:
259
diff
changeset
|
32 |
category:'GDB' |
205
26ed194991b7
Add RISC-V architecture definition
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
33 |
! |
26ed194991b7
Add RISC-V architecture definition
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
34 |
|
26ed194991b7
Add RISC-V architecture definition
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
35 |
!GDBArch_RV64 class methodsFor:'documentation'! |
26ed194991b7
Add RISC-V architecture definition
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
36 |
|
26ed194991b7
Add RISC-V architecture definition
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
37 |
copyright |
26ed194991b7
Add RISC-V architecture definition
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
38 |
" |
26ed194991b7
Add RISC-V architecture definition
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
39 |
jv:libgdbs - GNU Debugger Interface Library |
26ed194991b7
Add RISC-V architecture definition
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
40 |
Copyright (C) 2015-now Jan Vrany |
272
cdd1c9ad00de
Change class categories to facilitate Pharo port
Jan Vrany <jan.vrany@labware.com>
parents:
259
diff
changeset
|
41 |
Copyright (C) 2021-2023 LabWare |
205
26ed194991b7
Add RISC-V architecture definition
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
42 |
|
259
651864c2aa29
Relicense under MIT license.
Jan Vrany <jan.vrany@labware.com>
parents:
241
diff
changeset
|
43 |
Permission is hereby granted, free of charge, to any person obtaining a copy |
651864c2aa29
Relicense under MIT license.
Jan Vrany <jan.vrany@labware.com>
parents:
241
diff
changeset
|
44 |
of this software and associated documentation files (the 'Software'), to deal |
651864c2aa29
Relicense under MIT license.
Jan Vrany <jan.vrany@labware.com>
parents:
241
diff
changeset
|
45 |
in the Software without restriction, including without limitation the rights |
651864c2aa29
Relicense under MIT license.
Jan Vrany <jan.vrany@labware.com>
parents:
241
diff
changeset
|
46 |
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell |
651864c2aa29
Relicense under MIT license.
Jan Vrany <jan.vrany@labware.com>
parents:
241
diff
changeset
|
47 |
copies of the Software, and to permit persons to whom the Software is |
651864c2aa29
Relicense under MIT license.
Jan Vrany <jan.vrany@labware.com>
parents:
241
diff
changeset
|
48 |
furnished to do so, subject to the following conditions: |
205
26ed194991b7
Add RISC-V architecture definition
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
49 |
|
259
651864c2aa29
Relicense under MIT license.
Jan Vrany <jan.vrany@labware.com>
parents:
241
diff
changeset
|
50 |
The above copyright notice and this permission notice shall be included in all |
651864c2aa29
Relicense under MIT license.
Jan Vrany <jan.vrany@labware.com>
parents:
241
diff
changeset
|
51 |
copies or substantial portions of the Software. |
205
26ed194991b7
Add RISC-V architecture definition
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
52 |
|
259
651864c2aa29
Relicense under MIT license.
Jan Vrany <jan.vrany@labware.com>
parents:
241
diff
changeset
|
53 |
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR |
651864c2aa29
Relicense under MIT license.
Jan Vrany <jan.vrany@labware.com>
parents:
241
diff
changeset
|
54 |
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
651864c2aa29
Relicense under MIT license.
Jan Vrany <jan.vrany@labware.com>
parents:
241
diff
changeset
|
55 |
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE |
651864c2aa29
Relicense under MIT license.
Jan Vrany <jan.vrany@labware.com>
parents:
241
diff
changeset
|
56 |
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER |
651864c2aa29
Relicense under MIT license.
Jan Vrany <jan.vrany@labware.com>
parents:
241
diff
changeset
|
57 |
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, |
651864c2aa29
Relicense under MIT license.
Jan Vrany <jan.vrany@labware.com>
parents:
241
diff
changeset
|
58 |
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE |
651864c2aa29
Relicense under MIT license.
Jan Vrany <jan.vrany@labware.com>
parents:
241
diff
changeset
|
59 |
SOFTWARE. |
205
26ed194991b7
Add RISC-V architecture definition
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
60 |
" |
26ed194991b7
Add RISC-V architecture definition
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
61 |
! ! |
26ed194991b7
Add RISC-V architecture definition
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
62 |
|
26ed194991b7
Add RISC-V architecture definition
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
63 |
!GDBArch_RV64 methodsFor:'accessing'! |
26ed194991b7
Add RISC-V architecture definition
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
64 |
|
26ed194991b7
Add RISC-V architecture definition
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
65 |
name |
26ed194991b7
Add RISC-V architecture definition
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
66 |
^ 'RISC-V 64' |
26ed194991b7
Add RISC-V architecture definition
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
67 |
|
26ed194991b7
Add RISC-V architecture definition
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
68 |
"Created: / 22-05-2020 / 13:12:53 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
206
3d4aca3ff608
Allow architecture definition to specify a subset of registers to display
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
205
diff
changeset
|
69 |
! |
3d4aca3ff608
Allow architecture definition to specify a subset of registers to display
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
205
diff
changeset
|
70 |
|
3d4aca3ff608
Allow architecture definition to specify a subset of registers to display
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
205
diff
changeset
|
71 |
registerNamesToDisplay |
3d4aca3ff608
Allow architecture definition to specify a subset of registers to display
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
205
diff
changeset
|
72 |
"Returns a list of register names to display in register view (VDBRegisterListApplication) |
3d4aca3ff608
Allow architecture definition to specify a subset of registers to display
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
205
diff
changeset
|
73 |
or `nil` if all available registers are to be displayed. |
3d4aca3ff608
Allow architecture definition to specify a subset of registers to display
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
205
diff
changeset
|
74 |
|
3d4aca3ff608
Allow architecture definition to specify a subset of registers to display
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
205
diff
changeset
|
75 |
This is used on platforms for limit the number of registers, usually |
3d4aca3ff608
Allow architecture definition to specify a subset of registers to display
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
205
diff
changeset
|
76 |
because either (i) it is too long and has a lots of 'uninterested' registers |
3d4aca3ff608
Allow architecture definition to specify a subset of registers to display
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
205
diff
changeset
|
77 |
or (ii) some registers are not supported by gdbserver / QEMU or whatever |
3d4aca3ff608
Allow architecture definition to specify a subset of registers to display
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
205
diff
changeset
|
78 |
and this is used to avoid errors while still displaying 'interesting' registers. |
3d4aca3ff608
Allow architecture definition to specify a subset of registers to display
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
205
diff
changeset
|
79 |
|
3d4aca3ff608
Allow architecture definition to specify a subset of registers to display
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
205
diff
changeset
|
80 |
Essentially a hack. |
3d4aca3ff608
Allow architecture definition to specify a subset of registers to display
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
205
diff
changeset
|
81 |
" |
3d4aca3ff608
Allow architecture definition to specify a subset of registers to display
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
205
diff
changeset
|
82 |
^ #('pc' 'zero' 'ra' 'sp' 'gp' 'tp' 't0' 't1' 't2' 'fp' 's1' 'a0' 'a1' 'a2' 'a3' 'a4' 'a5' 'a6' 'a7' 's2' 's3' 's4' 's5' 's6' 's7' 's8' 's9' 's10' 's11' 't3' 't4' 't5' 't6' 'ft0' 'ft1' 'ft2' 'ft3' 'ft4' 'ft5' 'ft6' 'ft7' 'fs0' 'fs1' 'fa0' 'fa1' 'fa2' 'fa3' 'fa4' 'fa5' 'fa6' 'fa7' 'fs2' 'fs3' 'fs4' 'fs5' 'fs6' 'fs7' 'fs8' 'fs9' 'fs10' 'fs11' 'ft8' 'ft9' 'ft10' 'ft11') |
3d4aca3ff608
Allow architecture definition to specify a subset of registers to display
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
205
diff
changeset
|
83 |
|
3d4aca3ff608
Allow architecture definition to specify a subset of registers to display
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
205
diff
changeset
|
84 |
"Created: / 22-05-2020 / 13:21:05 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
205
26ed194991b7
Add RISC-V architecture definition
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
85 |
! ! |
26ed194991b7
Add RISC-V architecture definition
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
86 |
|
26ed194991b7
Add RISC-V architecture definition
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
87 |
!GDBArch_RV64 methodsFor:'queries'! |
26ed194991b7
Add RISC-V architecture definition
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
88 |
|
26ed194991b7
Add RISC-V architecture definition
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
89 |
sizeofPointer |
26ed194991b7
Add RISC-V architecture definition
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
90 |
^ 8 |
26ed194991b7
Add RISC-V architecture definition
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
91 |
|
26ed194991b7
Add RISC-V architecture definition
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
92 |
"Created: / 22-05-2020 / 13:12:24 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
26ed194991b7
Add RISC-V architecture definition
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
93 |
! ! |
26ed194991b7
Add RISC-V architecture definition
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
94 |
|
241
286aa6020b9e
Update only "displayed" registers
Jan Vrany <jan.vrany@labware.com>
parents:
206
diff
changeset
|
95 |
!GDBArch_RV64 class methodsFor:'documentation'! |
286aa6020b9e
Update only "displayed" registers
Jan Vrany <jan.vrany@labware.com>
parents:
206
diff
changeset
|
96 |
|
286aa6020b9e
Update only "displayed" registers
Jan Vrany <jan.vrany@labware.com>
parents:
206
diff
changeset
|
97 |
version_HG |
286aa6020b9e
Update only "displayed" registers
Jan Vrany <jan.vrany@labware.com>
parents:
206
diff
changeset
|
98 |
|
286aa6020b9e
Update only "displayed" registers
Jan Vrany <jan.vrany@labware.com>
parents:
206
diff
changeset
|
99 |
^ '$Changeset: <not expanded> $' |
286aa6020b9e
Update only "displayed" registers
Jan Vrany <jan.vrany@labware.com>
parents:
206
diff
changeset
|
100 |
! ! |
286aa6020b9e
Update only "displayed" registers
Jan Vrany <jan.vrany@labware.com>
parents:
206
diff
changeset
|
101 |