Skip to content

Commit 41a8307

Browse files
Merge pull request #102 from StevenCostiou/Pharo13
Pharo13 lost changes from master. Unrelated test failures.
2 parents a365df1 + a35277f commit 41a8307

40 files changed

+291
-217
lines changed

.github/workflows/scriptabledebugger-all.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,11 @@ jobs:
2424
strategy:
2525
matrix:
2626
os: [ ubuntu-latest ]
27-
smalltalk: [ Pharo64-13 ]
27+
smalltalk: [ Pharo64-alpha ]
2828
runs-on: ${{ matrix.os }}
2929
name: ${{ matrix.smalltalk }} on ${{ matrix.os }}
3030
steps:
31-
- uses: actions/checkout@v2 # or 3
31+
- uses: actions/checkout@v3
3232
- name: Setup smalltalkCI
3333
uses: hpi-swa/setup-smalltalkCI@v1
3434
with:

.github/workflows/scriptabledebugger.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,11 @@ jobs:
2323
strategy:
2424
matrix:
2525
os: [ ubuntu-latest ]
26-
smalltalk: [ Pharo64-13 ]
26+
smalltalk: [ Pharo64-alpha ]
2727
runs-on: ${{ matrix.os }}
2828
name: ${{ matrix.smalltalk }} on ${{ matrix.os }}
2929
steps:
30-
- uses: actions/checkout@v2 # or 3
30+
- uses: actions/checkout@v3
3131
- name: Setup smalltalkCI
3232
uses: hpi-swa/setup-smalltalkCI@v1
3333
with:

AUTHORS

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
Steven Costiou, Inria <[email protected]>
2+
Adrien Vanègue, Inria <[email protected]>

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2024 Steven Costiou, Adrien Vanègue
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

README.md

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,25 @@
11
# Sindarin
2-
Instanciate a UI-less debugger on your execution, allowing you to manipulate and inspect it via scripting.
3-
The API is on the `SindarinDebugger` class.
2+
Sindarin is a versatile and interactive debugger scripting API for object-oriented programming languages. Sindarin is designed to help building dedicated debugging tools targeting specific problems or domains.
3+
To do this, Sindarin attaches to a running process then exposes stepping and introspection operations to control, manipulate and observe that process’ execution.
4+
It simplifies the creation of personalized debugging scripts by providing an AST-based API, thus also proposing different stepping granularity over the debugging session.
5+
Once written, scripts are extensible and reusable on other scenario, and can be used to build more complex debugging tools.
6+
7+
**Research paper:** [Sindarin: A Versatile Scripting API for the Pharo Debugger](https://hal.archives-ouvertes.fr/hal-02280915)
8+
9+
### Main authors
10+
- [Steven Costiou](https://github.com/StevenCostiou) (2019 - ...)
11+
- [Adrien Vanègue](https://github.com/adri09070) (2022 - 2024)
412

5-
- Original author: **Thomas Dupriez** (dupriezt on github)
6-
- Research paper: [Sindarin: A Versatile Scripting API for the Pharo Debugger](https://hal.archives-ouvertes.fr/hal-02280915)
13+
### Original author
14+
- [Thomas Dupriez](https://github.com/dupriezt) (2019 - 2021)
715

816
> Note: The master branch is now obsolete and should not be used anymore
917
1018
## Usage
1119

20+
Instanciate a UI-less debugger on your execution, allowing you to manipulate and inspect it via scripting.
21+
The API is on the `SindarinDebugger` class.
22+
1223
```Smalltalk
1324
dbg := SindarinDebugger debug: [<your code>].
1425
"Manipulate and inspect the debugged execution by sending messages to dbg"

src/BaselineOfSindarin/BaselineOfSindarin.class.st

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
Class {
2-
#name : #BaselineOfSindarin,
3-
#superclass : #BaselineOf,
4-
#category : #BaselineOfSindarin
2+
#name : 'BaselineOfSindarin',
3+
#superclass : 'BaselineOf',
4+
#category : 'BaselineOfSindarin',
5+
#package : 'BaselineOfSindarin'
56
}
67

7-
{ #category : #baselines }
8+
{ #category : 'baselines' }
89
BaselineOfSindarin >> baseline: spec [
910

1011
<baseline>
@@ -21,7 +22,7 @@ BaselineOfSindarin >> baseline: spec [
2122
group: 'experiments' with: #( 'default' 'Sindarin-Experiments' )
2223
]
2324

24-
{ #category : #baselines }
25+
{ #category : 'baselines' }
2526
BaselineOfSindarin >> postloadWithLoader: loader withPackageSpec: spec [
2627

2728
InstructionStream compiledMethodAt: #willJumpIfFalse ifAbsent: [

src/BaselineOfSindarin/package.st

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
Package { #name : #BaselineOfSindarin }
1+
Package { #name : 'BaselineOfSindarin' }

src/Sindarin-Demo/SindarinDemo.class.st

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,40 @@
11
Class {
2-
#name : #SindarinDemo,
3-
#superclass : #Object,
2+
#name : 'SindarinDemo',
3+
#superclass : 'Object',
44
#instVars : [
55
'count'
66
],
7-
#category : #'Sindarin-Demo'
7+
#category : 'Sindarin-Demo',
8+
#package : 'Sindarin-Demo'
89
}
910

10-
{ #category : #'as yet unclassified' }
11+
{ #category : 'as yet unclassified' }
1112
SindarinDemo >> doThings1 [
1213
1+1.
1314
ZeroDivide signal.
1415
]
1516

16-
{ #category : #'as yet unclassified' }
17+
{ #category : 'as yet unclassified' }
1718
SindarinDemo >> doThings2 [
1819
Point x: 2 y: 2.
1920
SubscriptOutOfBounds signal.
2021
]
2122

22-
{ #category : #'as yet unclassified' }
23+
{ #category : 'as yet unclassified' }
2324
SindarinDemo >> doThingsAndSignalExceptions [
2425
self doThings1.
2526
Error signal.
2627
self doThings2.
2728
]
2829

29-
{ #category : #'as yet unclassified' }
30+
{ #category : 'as yet unclassified' }
3031
SindarinDemo >> primeCount [
3132
count := 0.
3233
{ 2. 3. 5. 7. 10. 11. 13. 17. 19. 23 } do: [:int | count := count + int ]
3334

3435
]
3536

36-
{ #category : #'as yet unclassified' }
37+
{ #category : 'as yet unclassified' }
3738
SindarinDemo >> primeCountHalt [.
3839
count := 0.
3940
self halt.

src/Sindarin-Demo/SindarinDemo_GoldDigger.class.st

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -7,61 +7,62 @@ dbg step: 3; stepOver: 2; step: 3.
77
88
"
99
Class {
10-
#name : #'SindarinDemo_GoldDigger',
11-
#superclass : #Object,
12-
#category : #'Sindarin-Demo'
10+
#name : 'SindarinDemo_GoldDigger',
11+
#superclass : 'Object',
12+
#category : 'Sindarin-Demo',
13+
#package : 'Sindarin-Demo'
1314
}
1415

15-
{ #category : #'as yet unclassified' }
16+
{ #category : 'as yet unclassified' }
1617
SindarinDemo_GoldDigger >> gold [
1718
^ 42
1819
]
1920

20-
{ #category : #'as yet unclassified' }
21+
{ #category : 'as yet unclassified' }
2122
SindarinDemo_GoldDigger >> moreRock [
2223
^self
2324
]
2425

25-
{ #category : #'as yet unclassified' }
26+
{ #category : 'as yet unclassified' }
2627
SindarinDemo_GoldDigger >> rock [
2728
self halt.
2829
self rock1
2930
]
3031

31-
{ #category : #'as yet unclassified' }
32+
{ #category : 'as yet unclassified' }
3233
SindarinDemo_GoldDigger >> rock1 [
3334
self rock2
3435
]
3536

36-
{ #category : #'as yet unclassified' }
37+
{ #category : 'as yet unclassified' }
3738
SindarinDemo_GoldDigger >> rock2 [
3839
self rock3
3940
]
4041

41-
{ #category : #'as yet unclassified' }
42+
{ #category : 'as yet unclassified' }
4243
SindarinDemo_GoldDigger >> rock3 [
4344
self moreRock.
4445
self moreRock.
4546
self rock4.
4647
]
4748

48-
{ #category : #'as yet unclassified' }
49+
{ #category : 'as yet unclassified' }
4950
SindarinDemo_GoldDigger >> rock4 [
5051
self rock5.
5152
]
5253

53-
{ #category : #'as yet unclassified' }
54+
{ #category : 'as yet unclassified' }
5455
SindarinDemo_GoldDigger >> rock5 [
5556
self rock6.
5657
]
5758

58-
{ #category : #'as yet unclassified' }
59+
{ #category : 'as yet unclassified' }
5960
SindarinDemo_GoldDigger >> rock6 [
6061
"Relevant point for the bug you are tracking"
6162
self gold.
6263
]
6364

64-
{ #category : #'as yet unclassified' }
65+
{ #category : 'as yet unclassified' }
6566
SindarinDemo_GoldDigger >> start [
6667
self rock
6768
]

src/Sindarin-Demo/SindarinDemo_SkipNextException.class.st

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -10,49 +10,50 @@ dbg := SindarinDebugger debug: [ SindarinDemo_SkipNextException new start ].
1010
dbg skip.
1111
"
1212
Class {
13-
#name : #'SindarinDemo_SkipNextException',
14-
#superclass : #Object,
15-
#category : #'Sindarin-Demo'
13+
#name : 'SindarinDemo_SkipNextException',
14+
#superclass : 'Object',
15+
#category : 'Sindarin-Demo',
16+
#package : 'Sindarin-Demo'
1617
}
1718

18-
{ #category : #accessing }
19+
{ #category : 'accessing' }
1920
SindarinDemo_SkipNextException >> method1 [
2021
self halt.
2122
self method2.
2223
]
2324

24-
{ #category : #accessing }
25+
{ #category : 'accessing' }
2526
SindarinDemo_SkipNextException >> method2 [
2627
self method3.
2728
]
2829

29-
{ #category : #accessing }
30+
{ #category : 'accessing' }
3031
SindarinDemo_SkipNextException >> method3 [
3132
self method4.
3233
]
3334

34-
{ #category : #accessing }
35+
{ #category : 'accessing' }
3536
SindarinDemo_SkipNextException >> method4 [
3637
self method5.
3738
]
3839

39-
{ #category : #accessing }
40+
{ #category : 'accessing' }
4041
SindarinDemo_SkipNextException >> method5 [
4142
Error signal: 'Something truly unexpected happened :)'.
4243
self method6.
4344
]
4445

45-
{ #category : #accessing }
46+
{ #category : 'accessing' }
4647
SindarinDemo_SkipNextException >> method6 [
4748
self method7.
4849
]
4950

50-
{ #category : #accessing }
51+
{ #category : 'accessing' }
5152
SindarinDemo_SkipNextException >> method7 [
5253
^ 42
5354
]
5455

55-
{ #category : #accessing }
56+
{ #category : 'accessing' }
5657
SindarinDemo_SkipNextException >> start [
5758
self method1
5859
]

src/Sindarin-Demo/SindarinDemo_StepToNextIteration.class.st

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,16 @@
11
Class {
2-
#name : #'SindarinDemo_StepToNextIteration',
3-
#superclass : #Object,
4-
#category : #'Sindarin-Demo'
2+
#name : 'SindarinDemo_StepToNextIteration',
3+
#superclass : 'Object',
4+
#category : 'Sindarin-Demo',
5+
#package : 'Sindarin-Demo'
56
}
67

7-
{ #category : #accessing }
8+
{ #category : 'accessing' }
89
SindarinDemo_StepToNextIteration >> start [
910
self sum
1011
]
1112

12-
{ #category : #accessing }
13+
{ #category : 'accessing' }
1314
SindarinDemo_StepToNextIteration >> sum [
1415
| count |
1516
self halt.

src/Sindarin-Demo/package.st

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
Package { #name : #'Sindarin-Demo' }
1+
Package { #name : 'Sindarin-Demo' }

src/Sindarin-Experiments/Bug_TestPassesWhenRanAloneButFailsWhenRanFromTheClass.class.st

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,21 @@
11
Class {
2-
#name : #'Bug_TestPassesWhenRanAloneButFailsWhenRanFromTheClass',
3-
#superclass : #TestCase,
2+
#name : 'Bug_TestPassesWhenRanAloneButFailsWhenRanFromTheClass',
3+
#superclass : 'TestCase',
44
#instVars : [
55
'breakpointsBeforeTest'
66
],
7-
#category : #'Sindarin-Experiments'
7+
#category : 'Sindarin-Experiments',
8+
#package : 'Sindarin-Experiments'
89
}
910

10-
{ #category : #tests }
11+
{ #category : 'tests' }
1112
Bug_TestPassesWhenRanAloneButFailsWhenRanFromTheClass >> helperMethod13 [
1213
| a |
1314
a := 5.
1415
^ Point x: 5 y: '3' asInteger.
1516
]
1617

17-
{ #category : #running }
18+
{ #category : 'running' }
1819
Bug_TestPassesWhenRanAloneButFailsWhenRanFromTheClass >> runCaseManaged [
1920
"This prevents the TestExecutionEnvironment from trying to kill processes created during the test. Without it, it adds on:do: contexts on the process, and this somehow makes the process answers true to isTerminating, triggering the protection against stepping terminating processes from DebugSessionPlus>>stepInto:
2021
It is not necessary to terminate processes created by ScriptableDebugger because these processes are not scheduled."
@@ -23,20 +24,20 @@ Bug_TestPassesWhenRanAloneButFailsWhenRanFromTheClass >> runCaseManaged [
2324
^ self runCase.
2425
]
2526

26-
{ #category : #running }
27+
{ #category : 'running' }
2728
Bug_TestPassesWhenRanAloneButFailsWhenRanFromTheClass >> setUp [
2829
"Hooks that subclasses may override to define the fixture of test."
2930
breakpointsBeforeTest := VirtualBreakpoint all.
3031
VirtualBreakpoint all removeAll.
3132
]
3233

33-
{ #category : #running }
34+
{ #category : 'running' }
3435
Bug_TestPassesWhenRanAloneButFailsWhenRanFromTheClass >> tearDown [
3536
VirtualBreakpoint all removeAll.
3637
breakpointsBeforeTest do: [ :brkpt | VirtualBreakpoint all add: brkpt ].
3738
]
3839

39-
{ #category : #tests }
40+
{ #category : 'tests' }
4041
Bug_TestPassesWhenRanAloneButFailsWhenRanFromTheClass >> testStep [
4142
<haltOrBreakpointForTesting>
4243
| node scdbg |

0 commit comments

Comments
 (0)