Commit 7043c0f
authored
Scripting Engine Debugger Support (#1701)
This PR introduces the support for implementing remote debuggers in
scripting engines modules.
The module API is extended with scripting engines callbacks and new
functions that can be used by scripting engine modules to implement a
remote debugger.
Most of the code that was used to implement the Lua debugger, was
refactored and moved to the `scripting_engine.c` file, and only the code
specific to the Lua engine, remained in the `debug_lua.c` file.
The `SCRIPT DEBUG (YES|NO|SYNC)` command was extend with an optional
parameter that can be used to specify the engine name, where we want to
enable the debugger. If no engine name is specified, the Lua engine is
used to keep backwards compatibility.
In
[src/valkeymodule.h](https://github.com/valkey-io/valkey/pull/1701/files#diff-b91520205c29a3a5a940786e509b2f13a5e73a1ac2016be773e62ea64c7efb28)
we see the module API changes. And in the `helloscripting.c` file we can
see how to implement a simple debugger for the dummy HELLO scripting
engine.
---------
Signed-off-by: Ricardo Dias <[email protected]>1 parent f1270a8 commit 7043c0f
File tree
15 files changed
+1800
-618
lines changed- src
- commands
- lua
- tests
- modules
- unit
- moduleapi
15 files changed
+1800
-618
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5969 | 5969 | | |
5970 | 5970 | | |
5971 | 5971 | | |
| 5972 | + | |
5972 | 5973 | | |
5973 | 5974 | | |
5974 | 5975 | | |
| |||
6115 | 6116 | | |
6116 | 6117 | | |
6117 | 6118 | | |
6118 | | - | |
| 6119 | + | |
6119 | 6120 | | |
6120 | 6121 | | |
6121 | 6122 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
7 | | - | |
| 7 | + | |
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
| |||
34 | 34 | | |
35 | 35 | | |
36 | 36 | | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
37 | 43 | | |
38 | 44 | | |
39 | 45 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
49 | 49 | | |
50 | 50 | | |
51 | 51 | | |
52 | | - | |
53 | 52 | | |
54 | 53 | | |
55 | 54 | | |
| |||
561 | 560 | | |
562 | 561 | | |
563 | 562 | | |
564 | | - | |
565 | | - | |
| 563 | + | |
| 564 | + | |
| 565 | + | |
566 | 566 | | |
567 | 567 | | |
568 | 568 | | |
| |||
614 | 614 | | |
615 | 615 | | |
616 | 616 | | |
617 | | - | |
| 617 | + | |
618 | 618 | | |
619 | 619 | | |
620 | 620 | | |
621 | 621 | | |
| 622 | + | |
| 623 | + | |
| 624 | + | |
| 625 | + | |
| 626 | + | |
| 627 | + | |
| 628 | + | |
| 629 | + | |
| 630 | + | |
| 631 | + | |
622 | 632 | | |
623 | | - | |
| 633 | + | |
624 | 634 | | |
625 | 635 | | |
626 | | - | |
| 636 | + | |
| 637 | + | |
| 638 | + | |
| 639 | + | |
627 | 640 | | |
628 | 641 | | |
629 | | - | |
| 642 | + | |
| 643 | + | |
| 644 | + | |
| 645 | + | |
630 | 646 | | |
631 | 647 | | |
632 | 648 | | |
| |||
674 | 690 | | |
675 | 691 | | |
676 | 692 | | |
677 | | - | |
| 693 | + | |
678 | 694 | | |
679 | | - | |
| 695 | + | |
680 | 696 | | |
681 | | - | |
| 697 | + | |
682 | 698 | | |
683 | 699 | | |
684 | 700 | | |
| |||
0 commit comments