Add feature commands for debugger python script (#1604)

JerryScript-DCO-1.0-Signed-off-by: Levente Orban orbanl@inf.u-szeged.hu
This commit is contained in:
Levente Orban
2017-03-06 11:08:30 +01:00
committed by Zoltan Herczeg
parent 6254748081
commit b996841a65
18 changed files with 215 additions and 174 deletions
+7 -2
View File
@@ -1,4 +1,9 @@
b do_backtrace.js:32
c
next
n
next
step
next
n
s
bt
c
+12 -7
View File
@@ -1,9 +1,14 @@
Connecting to: localhost:5001
Stopped at tests/debugger/do_backtrace.js:15
(jerry-debugger) Breakpoint 1 at tests/debugger/do_backtrace.js:32 (in f4)
(jerry-debugger) Stopped at breakpoint:1 tests/debugger/do_backtrace.js:32 (in f4)
(jerry-debugger) Frame 0: tests/debugger/do_backtrace.js:32 (in f4)
Frame 1: tests/debugger/do_backtrace.js:39 (in foo)
Frame 2: tests/debugger/do_backtrace.js:48 (in test)
Frame 3: tests/debugger/do_backtrace.js:60
(jerry-debugger) Connection closed.
(jerry-debugger) Stopped at tests/debugger/do_backtrace.js:28
(jerry-debugger) Stopped at tests/debugger/do_backtrace.js:37
(jerry-debugger) Stopped at tests/debugger/do_backtrace.js:40
(jerry-debugger) Stopped at tests/debugger/do_backtrace.js:30 (in test)
(jerry-debugger) Stopped at tests/debugger/do_backtrace.js:32 (in test)
(jerry-debugger) Stopped at tests/debugger/do_backtrace.js:33 (in test)
(jerry-debugger) Stopped at tests/debugger/do_backtrace.js:21 (in foo)
(jerry-debugger) Frame 0: tests/debugger/do_backtrace.js:21 (in foo)
Frame 1: tests/debugger/do_backtrace.js:33 (in test)
Frame 2: tests/debugger/do_backtrace.js:40
(jerry-debugger) Press enter to stop JavaScript execution.
Connection closed.
+1 -21
View File
@@ -12,21 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
print("first line of code");
function f1()
{
function f2()
{
return function f3() {
a = 4;
print("funciton f3");
};
}
x =
6;
}
print("backtrace-test");
function f4() {
print("function f4");
@@ -39,18 +25,12 @@ function foo()
f4();
}
print ("var cat");
var cat = 'cat';
function test()
{
print("function test");
foo();
var a = 3;
var b = 5;
var c = a + b;
global_var = c;
return c;
}
var
+5 -5
View File
@@ -1,7 +1,7 @@
break do_break.js:28
break do_break.js:24
b do_break.js:27
b do_break.js:17
list
b do_break.js:40
delete 1
delete 2
next
next
continue
c
+9 -6
View File
@@ -1,8 +1,11 @@
Connecting to: localhost:5001
Stopped at tests/debugger/do_break.js:15
(jerry-debugger) Breakpoint not found
(jerry-debugger) (jerry-debugger) Breakpoint not found
(jerry-debugger) Error: Breakpoint 1 not found
(jerry-debugger) Stopped at tests/debugger/do_break.js:42
(jerry-debugger) Stopped at tests/debugger/do_break.js:43
(jerry-debugger) Connection closed.
(jerry-debugger) Breakpoint 1 at tests/debugger/do_break.js:24 (in test)
(jerry-debugger) Breakpoint 2 at tests/debugger/do_break.js:27 (in test)
(jerry-debugger) Breakpoint 3 at tests/debugger/do_break.js:17
(jerry-debugger) 1: tests/debugger/do_break.js:24 (in test)
2: tests/debugger/do_break.js:27 (in test)
3: tests/debugger/do_break.js:17
(jerry-debugger) (jerry-debugger) Stopped at breakpoint:3 tests/debugger/do_break.js:17
(jerry-debugger) Press enter to stop JavaScript execution.
Connection closed.
+1 -28
View File
@@ -12,32 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
print("first line of code");
function f1()
{
function f2()
{
return function f3() {
a = 4;
print("funciton f3");
};
}
x =
6;
}
function f4() {
print("function f4");
}
function foo()
{
print("function foo");
var tmp = 4;
f4();
}
print("break test");
print ("var cat");
var cat = 'cat';
@@ -56,5 +31,3 @@ function test()
var
x =
1;
test();
+7
View File
@@ -0,0 +1,7 @@
break do_delete_all.js:17
b do_delete_all.js:18
b do_delete_all.js:21
list
delete all
next
c
+11
View File
@@ -0,0 +1,11 @@
Connecting to: localhost:5001
Stopped at tests/debugger/do_delete_all.js:15
(jerry-debugger) Breakpoint 1 at tests/debugger/do_delete_all.js:17
(jerry-debugger) Breakpoint 2 at tests/debugger/do_delete_all.js:18
(jerry-debugger) Breakpoint 3 at tests/debugger/do_delete_all.js:21 (in delete_test)
(jerry-debugger) 1: tests/debugger/do_delete_all.js:17
2: tests/debugger/do_delete_all.js:18
3: tests/debugger/do_delete_all.js:21 (in delete_test)
(jerry-debugger) (jerry-debugger) Stopped at tests/debugger/do_delete_all.js:16
(jerry-debugger) Press enter to stop JavaScript execution.
Connection closed.
+22
View File
@@ -0,0 +1,22 @@
// Copyright JS Foundation and other contributors, http://js.foundation
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
var str = "Delete all breakpoints";
var patt = new RegExp("e");
var res = patt.test(str);
var pi = Math.PI;
function delete_test(x,y) {
var sum = x + y;
}
+1
View File
@@ -1,2 +1,3 @@
step
dump
c
+3 -1
View File
@@ -1,5 +1,6 @@
Connecting to: localhost:5001
Stopped at tests/debugger/do_dump.js:15
(jerry-debugger) Stopped at tests/debugger/do_dump.js:42
(jerry-debugger) {68: Function(byte_code_cp:0x44, source_name:"tests/debugger/do_dump.js", name:"f4", { Breakpoint(line:32, offset:17, active_index:-1),Breakpoint(line:31, offset:16, active_index:-1) }),
79: Function(byte_code_cp:0x4f, source_name:"tests/debugger/do_dump.js", name:"f1", { Breakpoint(line:17, offset:21, active_index:-1),Breakpoint(line:27, offset:22, active_index:-1) }),
102: Function(byte_code_cp:0x66, source_name:"tests/debugger/do_dump.js", name:"f2", { Breakpoint(line:19, offset:14, active_index:-1),Breakpoint(line:21, offset:15, active_index:-1) }),
@@ -7,4 +8,5 @@ Stopped at tests/debugger/do_dump.js:15
125: Function(byte_code_cp:0x7d, source_name:"tests/debugger/do_dump.js", name:"f3", { Breakpoint(line:22, offset:25, active_index:-1),Breakpoint(line:23, offset:30, active_index:-1) }),
131: Function(byte_code_cp:0x83, source_name:"tests/debugger/do_dump.js", name:"", { Breakpoint(line:57, offset:63, active_index:-1),Breakpoint(line:42, offset:54, active_index:-1),Breakpoint(line:43, offset:59, active_index:-1),Breakpoint(line:60, offset:68, active_index:-1),Breakpoint(line:15, offset:49, active_index:-1) }),
154: Function(byte_code_cp:0x9a, source_name:"tests/debugger/do_dump.js", name:"test", { Breakpoint(line:45, offset:28, active_index:-1),Breakpoint(line:47, offset:29, active_index:-1),Breakpoint(line:48, offset:34, active_index:-1),Breakpoint(line:49, offset:38, active_index:-1),Breakpoint(line:50, offset:43, active_index:-1),Breakpoint(line:51, offset:48, active_index:-1),Breakpoint(line:52, offset:54, active_index:-1),Breakpoint(line:53, offset:58, active_index:-1) })}
(jerry-debugger) Connection closed.
(jerry-debugger) Press enter to stop JavaScript execution.
Connection closed.
+2 -3
View File
@@ -2,11 +2,10 @@ e a
n
eval a
break f
c
e a
n
e b
n
next
e 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
next
c
+4 -4
View File
@@ -5,10 +5,10 @@ Stopped at tests/debugger/do_eval.js:15
(jerry-debugger) 5
(jerry-debugger) Breakpoint 1 at tests/debugger/do_eval.js:17 (in f)
(jerry-debugger) Stopped at breakpoint:1 tests/debugger/do_eval.js:17 (in f)
(jerry-debugger) 3.3
(jerry-debugger) undefined
(jerry-debugger) Stopped at tests/debugger/do_eval.js:19 (in f)
(jerry-debugger) undefined
(jerry-debugger) Stopped at tests/debugger/do_eval.js:20 (in f)
(jerry-debugger) 6
(jerry-debugger) 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
(jerry-debugger) Connection closed.
(jerry-debugger) Stopped at tests/debugger/do_eval.js:20 (in f)
(jerry-debugger) Press enter to stop JavaScript execution.
Connection closed.
+2 -5
View File
@@ -1,13 +1,10 @@
b f
n
n
next
n
s
src
n
b f
c
src
c
step
src
c
+3 -7
View File
@@ -8,12 +8,8 @@ Stopped at tests/debugger/do_src.js:19
(jerry-debugger) f = function f() {
print('F2') }
(jerry-debugger) Stopped at tests/debugger/do_src.js:21
(jerry-debugger) Breakpoint 2 at <unknown>:2 (in f)
Breakpoint 1 at tests/debugger/do_src.js:15 (in f)
(jerry-debugger) Stopped at breakpoint:2 <unknown>:2 (in f)
(jerry-debugger) Stopped at <unknown>:2 (in f)
(jerry-debugger) f = function f() {
print('F2') }
(jerry-debugger) Stopped at breakpoint:2 <unknown>:2 (in f)
(jerry-debugger) f = function f() {
print('F2') }
(jerry-debugger) Connection closed.
(jerry-debugger) Press enter to stop JavaScript execution.
Connection closed.
+2 -2
View File
@@ -2,7 +2,7 @@ break do_step.js:25
step
backtrace
b do_step.js:26
c
s
next
next
bt
c
+4 -4
View File
@@ -5,8 +5,8 @@ Stopped at tests/debugger/do_step.js:25
(jerry-debugger) Frame 0: tests/debugger/do_step.js:15 (in f1)
Frame 1: tests/debugger/do_step.js:25
(jerry-debugger) Breakpoint 2 at tests/debugger/do_step.js:26
(jerry-debugger) Stopped at tests/debugger/do_step.js:17 (in f1)
(jerry-debugger) Stopped at breakpoint:2 tests/debugger/do_step.js:26
(jerry-debugger) Stopped at tests/debugger/do_step.js:20 (in f2)
(jerry-debugger) Frame 0: tests/debugger/do_step.js:20 (in f2)
Frame 1: tests/debugger/do_step.js:26
(jerry-debugger) Connection closed.
(jerry-debugger) Frame 0: tests/debugger/do_step.js:26
(jerry-debugger) Press enter to stop JavaScript execution.
Connection closed.