Improve JerryScript debugger (#4299)

- Support print (p) as alias to eval (e)
- Fix backtrace processing (incorrect increment when cpointer is 4 byte long)
- Support partial names for pending breakpoints (similar to normal breakpoints)
- Don't print newline after pending breakpoint dialog text
- Add jerryscript-debugger-transport.h to all-in-one build

JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
This commit is contained in:
Zoltan Herczeg
2020-10-19 15:26:19 +02:00
committed by GitHub
parent 3c9a7915e1
commit 6f25d6ed31
9 changed files with 26 additions and 26 deletions
+1 -2
View File
@@ -6,8 +6,7 @@ Stopped at tests/debugger/do_delete.js:17
(jerry-debugger) b do_delete.js:17
Breakpoint 1 at tests/debugger/do_delete.js:17
(jerry-debugger) b do_delete.js:21
No breakpoint found, do you want to add a pending breakpoint? (y or [n])
Pending breakpoint 2 at do_delete.js:21
No breakpoint found, do you want to add a pending breakpoint? (y or [n]) Pending breakpoint 2 at do_delete.js:21
(jerry-debugger) b do_delete.js:19
Breakpoint 3 at tests/debugger/do_delete.js:19
(jerry-debugger) b do_delete.js:18
+2 -4
View File
@@ -7,11 +7,9 @@ Breakpoint 2 at tests/debugger/do_delete_all.js:18
(jerry-debugger) b do_delete_all.js:21
Breakpoint 3 at tests/debugger/do_delete_all.js:21 (in delete_test() at line:20, col:1)
(jerry-debugger) b do_delete_all:350
No breakpoint found, do you want to add a pending breakpoint? (y or [n])
Pending breakpoint 4 at do_delete_all:350
No breakpoint found, do you want to add a pending breakpoint? (y or [n]) Pending breakpoint 4 at do_delete_all:350
(jerry-debugger) b do_delete_all:37
No breakpoint found, do you want to add a pending breakpoint? (y or [n])
Pending breakpoint 5 at do_delete_all:37
No breakpoint found, do you want to add a pending breakpoint? (y or [n]) Pending breakpoint 5 at do_delete_all:37
(jerry-debugger) list
=== Active breakpoints ===
1: tests/debugger/do_delete_all.js:17
+2 -2
View File
@@ -3,9 +3,9 @@ n
eval a
break f
n
e b
p b
next
e b
print b
e "1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 XXX 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 YYY 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 ZZZ " + 123
e b = 8
n
+2 -2
View File
@@ -10,11 +10,11 @@ Stopped at tests/debugger/do_eval.js:23
Breakpoint 1 at tests/debugger/do_eval.js:19 (in f() at line:17, col:1)
(jerry-debugger) n
Stopped at breakpoint:1 tests/debugger/do_eval.js:19 (in f() at line:17, col:1)
(jerry-debugger) e b
(jerry-debugger) p b
undefined
(jerry-debugger) next
Stopped at tests/debugger/do_eval.js:20 (in f() at line:17, col:1)
(jerry-debugger) e b
(jerry-debugger) print b
6
(jerry-debugger) e "1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 XXX 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 YYY 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 ZZZ " + 123
1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 XXX 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 YYY 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 ZZZ 123
+5 -5
View File
@@ -4,10 +4,10 @@ Stopped at tests/debugger/do_help.js:15
Documented commands (type help <topic>):
========================================
EOF bt dump f ms restart src
abort c e finish n s step
b continue eval help next scope throw
backtrace delete eval_at list quit scroll variables
break display exception memstats res source
EOF bt dump f ms quit scroll variables
abort c e finish n res source
b continue eval help next restart src
backtrace delete eval_at list p s step
break display exception memstats print scope throw
(jerry-debugger) quit
@@ -1,11 +1,9 @@
Connecting to: localhost:5001
Stopped at tests/debugger/do_pending_breakpoints.js:15
(jerry-debugger) break :1
No breakpoint found, do you want to add a pending breakpoint? (y or [n])
Pending breakpoint 1 at :1
No breakpoint found, do you want to add a pending breakpoint? (y or [n]) Pending breakpoint 1 at :1
(jerry-debugger) break f
No breakpoint found, do you want to add a pending breakpoint? (y or [n])
Pending breakpoint 2 at f()
No breakpoint found, do you want to add a pending breakpoint? (y or [n]) Pending breakpoint 2 at f()
(jerry-debugger) list
=== Pending breakpoints ===
1: :1 (pending)