Commit Graph

50 Commits

Author SHA1 Message Date
openharmony_ci e16fc997f0 !1331 fix exception when JsDebuggerManager destroyed
Merge pull request !1331 from Gymee/bugfix
2022-05-17 08:42:23 +00:00
Gymee 3fe7a9313e fix crash when JsDebuggerManager destroyed
Signed-off-by: Gymee <yumeijie@huawei.com>
Change-Id: Ia11785865c0f68f1fe562a9cb6439026334b11ac
2022-05-16 16:18:59 +08:00
wengchangcheng 5b54d1c175 Descriptor: improve debugger performance
details: use binary search when search offset
issue: https://gitee.com/openharmony/ark_js_runtime/issues/I57GFP

Signed-off-by: wengchangcheng <wengchangcheng@huawei.com>
Change-Id: I92a3c995268a274d4751f0474225c366e8f8b999
2022-05-14 23:05:03 +08:00
Gymee 12d704cc4c tackle breakpoint with condition set empty
Signed-off-by: Gymee <yumeijie@huawei.com>
Change-Id: I54892d76bf7cfbb57cafb2d951d4c58333ce841d
2022-05-12 14:39:50 +08:00
openharmony_ci 5ff09c3c7f !1240 enhance evaluation
Merge pull request !1240 from Gymee/evaluate_enhance
2022-05-11 10:38:05 +00:00
Gymee 832160451d update local scope object when it changed
Signed-off-by: Gymee <yumeijie@huawei.com>
Change-Id: I3b7bfdf71aec34fb42e393148048765b4d51ef65
2022-05-09 16:24:11 +08:00
Gymee 904a4300da support evaluate on target callframe
Signed-off-by: Gymee <yumeijie@huawei.com>
Change-Id: I4e4b4b4f621706e5bb7e88e651fd9f3fb21c2b37
2022-05-09 13:56:17 +08:00
hjzhangcm a760638caa fix codex warning
Signed-off-by: hjzhangcm <zhanghaijun20@huawei.com>
2022-05-06 17:52:55 +08:00
Gymee 96292cb45c add closure variables to local scope
Signed-off-by: Gymee <yumeijie@huawei.com>
Change-Id: I0ce49467a5cfa027b7ab2f87d9c35ca8c9cd9ba6
2022-05-05 21:24:53 +08:00
guobingbing 129ebdbf25 refactor class FrameHandler
Signed-off-by: guobingbing <guobingbing3@huawei.com>
Change-Id: I9f3ff0c04d34a31a34f21da637689eb61d4166f1
2022-05-04 10:36:44 +08:00
wengchangcheng e8144ffd5a Descriptor: modify performance of debugger
details: skip check -1 when there's no step event
issue: https://gitee.com/openharmony/ark_js_runtime/issues/I558VZ

Signed-off-by: wengchangcheng <wengchangcheng@huawei.com>
Change-Id: Ie65d521cbc79ddd36d05c263dd5ccfd5d82e0b5c
2022-04-28 21:12:37 +08:00
openharmony_ci e5c716767e !1160 Avoid JSBackend's pause caused by HandleBreakPoint(...) function right after its pause caused by HandleStep() function in one ByteCodePcChanged(...) function
Merge pull request !1160 from Gongyuhang/master
2022-04-28 09:48:29 +00:00
Gongyuhang 7d3a405863 Change the type of the returned value from "void" to "bool" for
JSPtHooks::SingleStep(...) function, make it return true only when it
has actually invoked the backend_'s NotifyPaused(...) function.
And let the ByteCodePcChanged(...) function pass over the
HandleBreakPoint(...) function when the HandleStep(...) function returns
 true.

Issue:
    https://gitee.com/openharmony/ark_js_runtime/issues/I553T1

Changes:
    modified:   ecmascript/tooling/agent/js_backend.cpp
    modified:   ecmascript/tooling/agent/js_backend.h
    modified:   ecmascript/tooling/agent/js_pt_hooks.cpp
    modified:   ecmascript/tooling/agent/js_pt_hooks.h
    modified:   ecmascript/tooling/interface/js_debug_interface.h
    modified:   ecmascript/tooling/interface/js_debugger.cpp
    modified:   ecmascript/tooling/test/utils/testcases/js_single_step_test.h
    modified:   ecmascript/tooling/test/utils/test_hooks.h

Signed-off-by: Gongyuhang <gongyuhang5@huawei.com>
2022-04-28 15:20:07 +08:00
zhuguanghui123 495985a93b Funtions MatchWithOffset and callbackFunc split to two functions.Search separately by row and column.
variable extracted: methodId,offset

  Issue:https://gitee.com/openharmony/ark_js_runtime/issues/I53JD6?from=project-issue

Signed-off-by: zhuguanghui123 <zhuguanghui9@huawei.com>
Change-Id: I4951f10f17fe2af756b336e56e61033ea7fab689
2022-04-28 13:30:51 +08:00
buzhuyu 2912e2cfde change profiler types
issue:https://gitee.com/openharmony/ark_js_runtime/issues/I54J5Q

Signed-off-by: buzhuyu <buzhuyu@huawei.com>
2022-04-26 12:09:16 +08:00
openharmony_ci de8dd32c29 !1093 Delete useless code dependencies.
Merge pull request !1093 from yingguofeng/mmap
2022-04-24 16:26:56 +00:00
yingguofeng@huawei.com 6c5808fc28 Delete useless code dependencies
To reduce 'libark_ jsruntime.so' ROM size, delete useless code dependencies.

https://gitee.com/openharmony/ark_js_runtime/issues/I541H4?from=project-issue

Profit: libark_jsruntime.so size reduce from 3455(kb) to 2001(kb)

Change-Id: Ie7430fca6f539c9baff1f4aae7942da6fc9ef135
Signed-off-by: yingguofeng@huawei.com <yingguofeng@huawei.com>
2022-04-24 18:02:32 +08:00
Gymee 909b9081a9 debugger refactor
Change-Id: Idff2f871926a3893b5bd962f13b4a10c39f9f6d9
Signed-off-by: Gymee <yumeijie@huawei.com>
2022-04-24 11:35:13 +08:00
openharmony_ci 24fb3dc4f6 !1095 Display the data of ArrayBuffer
Merge pull request !1095 from Gongyuhang/master
2022-04-22 14:06:30 +00:00
openharmony_ci 9228e821e7 !1100 add host debugger module test
Merge pull request !1100 from changcheng/debugger_host_testcase
2022-04-22 13:57:18 +00:00
openharmony_ci 7350a5fc32 !1056 add Runtime.getHeapUsage
Merge pull request !1056 from wwx1083752/master
2022-04-22 13:41:45 +00:00
Gongyuhang e89c2e4abb delete the empty line.
Issue:https://gitee.com/maimaity/ark_js_runtime/issues/I53VO3

Change:
    modified:    ecmascript/tooling/agent/js_backend.cpp

Signed-off-by: Gongyuhang <gongyuhang5@huawei.com>
2022-04-22 21:26:49 +08:00
Gongyuhang ef4ecf8e53 delete "return" for the void-function.
Issue:https://gitee.com/maimaity/ark_js_runtime/issues/I53VO3

Change:
    modified:    ecmascript/tooling/agent/js_backend.cpp

Signed-off-by: Gongyuhang <gongyuhang5@huawei.com>
2022-04-22 20:42:39 +08:00
wengchangcheng 3ae043afa5 Descriptor: enable testcase with ecmavm instead of runtime
details:
1. add debugger module testcase in host
2. fix debugger crash when throw exception in interpreter
issue: https://gitee.com/openharmony/ark_js_runtime/issues/I53WBO

Change-Id: Ia7d878b0b81c011d940a9187d39c854f6a592e6d
Signed-off-by: wengchangcheng <wengchangcheng@huawei.com>
2022-04-22 20:42:16 +08:00
wwx1083752 521c800b32 add getHeapUsage
issue:https://gitee.com/wwx1083752/ark_js_runtime/issues/I53ZUK

Signed-off-by: wwx1083752 <wubinbin33@huawei.com>
2022-04-22 17:49:52 +08:00
Gongyuhang a4b630fb34 Add TypedArrayRefs for ArrayBufferRef, and add references to the
elements of the TypedArrayRef at JSBackend for the TypedArrayRef.

Issue:https://gitee.com/maimaity/ark_js_runtime/issues/I53VO3

Changes:
    modified:   ecmascript/tooling/agent/js_backend.cpp
    modified:   ecmascript/tooling/agent/js_backend.h

Signed-off-by: Gongyuhang <gongyuhang5@huawei.com>
2022-04-22 13:48:09 +08:00
wwx1083752 365bbd2797 add getHeapusage
Signed-off-by: wwx1083752 <wubinbin33@huawei.com>
2022-04-21 20:17:38 +08:00
xiongluo 771d51b546 refactor jsMethod
1. Move necessary fileds in jsMethod
2. Make jsMethod inherit aligned struct
3. Change some function names for easy reading

Signed-off-by: xiongluo <xiongluo@huawei.com>
2022-04-20 23:17:00 -10:00
Gymee 902e99d08c fix code review problems
Signed-off-by: Gymee <yumeijie@huawei.com>
Change-Id: If382b34005b2e76861106e40beff8d430c8d3a7f
2022-04-19 09:36:45 +08:00
Gymee 83048efbf1 support watch expression and conditional breakpoint
Signed-off-by: Gymee <yumeijie@huawei.com>
Change-Id: I794a5ee770f251e6fea4de5058575519ff0490e6
2022-04-18 20:04:33 +08:00
wengchangcheng d6c835caea Descriptor: debugger refactor
details:
1. debugger refactor, don't use runtime debugger
2. fix debugger crash

issue: https://gitee.com/openharmony/ark_js_runtime/issues/I52VXK

Signed-off-by: wengchangcheng <wengchangcheng@huawei.com>
Change-Id: I08e3c86bf659b9e0a44d014d13b11462d50218b3
2022-04-17 01:16:26 +08:00
wengchangcheng b80dbfa5bc refactor debugger part-3
1. get extractor from JSPandaFileManager
2. cache extractor map with url as key
3. get sourcecode from mainIndex, instead of traversal all methods

issue: https://gitee.com/openharmony/ark_js_runtime/issues/I51E4Y

Signed-off-by: wengchangcheng <wengchangcheng@huawei.com>
Change-Id: I8ae35d65318bb0969a2ce80c42993ae535462de4
2022-04-06 22:04:29 +08:00
wengchangcheng 0b4981525d refactor stl container
1. using runtime container instead of stl container
2. change debugger line amd column type to int32_t

issue: https://gitee.com/openharmony/ark_js_runtime/issues/I50NHW

Signed-off-by: wengchangcheng <wengchangcheng@huawei.com>
Change-Id: I0eb4651f17c6f6894f11de1ba904bcbe83a57db7
2022-04-06 16:05:22 +08:00
wengchangcheng 7c0ca961f5 refactor debugger extractor
1. rename js_pt_extractor
2. move debug_info_extractor to js_runtime
3. use map to store MethodDebug info and LocalVariable info
4. refactor ScopeInfo extractor

issue: https://gitee.com/openharmony/ark_js_runtime/issues/I5004N

Signed-off-by: wengchangcheng <wengchangcheng@huawei.com>
Change-Id: Id64d718aa9360afd53398ee729714c859bd61768
2022-03-30 17:49:11 +08:00
Gongyuhang 5ad84cd134 Add CallFunctionOn to avoid printing "Collecting data ..." when
JSBackend invoke GetProperties Function for "__proto__" and other items.

Changes:
modified:   ecmascript/tooling/agent/js_backend.cpp
modified:   ecmascript/tooling/agent/js_backend.h
modified:   ecmascript/tooling/agent/runtime_impl.cpp
modified:   ecmascript/tooling/agent/runtime_impl.h
modified:   ecmascript/tooling/base/pt_params.cpp
modified:   ecmascript/tooling/base/pt_params.h
modified:   ecmascript/tooling/base/pt_returns.cpp
modified:   ecmascript/tooling/base/pt_returns.h
modified:   ecmascript/tooling/base/pt_types.cpp
modified:   ecmascript/tooling/base/pt_types.h

Signed-off-by: Gongyuhang <gongyuhang5@huawei.com>
2022-03-25 19:23:52 +08:00
wengchangcheng 4804cd80d3 add Wextra and Werror in gn args
1. add -Wextra and -Werror to check code format error
2. modify all compiler error

issue: https://gitee.com/openharmony/ark_js_runtime/issues/I4ZDQE

Signed-off-by: wengchangcheng <wengchangcheng@huawei.com>
Change-Id: If5fdd1980494269b4c06bf1bb38a8eba7952adea
2022-03-24 21:45:19 +08:00
zhaozhibo 116b8f85cb Fix internal issue list problem
Signed-off-by: zhaozhibo <zhaozhibo3@huawei.com>
2022-03-14 15:19:45 +08:00
h00611971 66ad032336 issue: https://gitee.com/openharmony/ark_js_runtime/issues/I4VE0E
fix problems concerning lexicalEnv

Signed-off-by: h00611971 <huangfeijie@huawei.com>
2022-03-01 11:16:43 +08:00
wengchangcheng 8fd440a8bf fix compile error
cast int to size_t to fix compile error

issue: https://gitee.com/openharmony/ark_js_runtime/issues/I4U0CA

Signed-off-by: wengchangcheng <wengchangcheng@huawei.com>
Change-Id: I7cf682492b1a08dfebd052eb6e0d1d7fe8fd9974
2022-02-16 20:30:12 +08:00
wengchangcheng b5af7ac677 support column debugger
Signed-off-by: wengchangcheng <wengchangcheng@huawei.com>
2022-01-26 10:40:48 +08:00
h00611971 2a6826715f Enable column number in ark
Signed-off-by: h00611971 <huangfeijie@huawei.com>
2022-01-24 12:49:31 +08:00
wengchangcheng 2bfd68c01a modify ACCESSOR for EcmaString and TaggedArray
Signed-off-by: wengchangcheng <wengchangcheng@huawei.com>
Change-Id: I2995dc75ed34e8eb2bf249f2cced62ec9d91250e
2022-01-17 11:51:50 +08:00
h00611971 2f42667ed6 fix get extractor in debugger
Signed-off-by: h00611971 <huangfeijie@huawei.com>
2022-01-06 16:40:11 +08:00
huangfeijie 2782411111 bugfix in attach
Signed-off-by: huangfeijie <huangfeijie@huawei.com>
2021-12-23 10:30:13 +08:00
zhangyukun a97747fe18 Description:sync from code from wgr_master to ohos
Signed-off-by: zhangyukun <zhangyukun8@huawei.com>
Change-Id: Ic66a9e649de8c0ce530483296fe323b8f50621fb
2021-12-21 09:36:03 +08:00
wengchangcheng 84968c0677 seperate debugger notification manager of js and java
Signed-off-by: wengchangcheng <wengchangcheng@huawei.com>
2021-10-18 16:56:56 +08:00
surpassgoodchao 507111a0e8 fastboot fix
Signed-off-by: surpassgoodchao <surpassgoodchao@qq.com>
2021-10-12 14:17:00 +08:00
surpassgoodchao d15fafc5ac fastboot review
Signed-off-by: surpassgoodchao <surpassgoodchao@qq.com>
2021-10-12 12:26:02 +08:00
zhangyukun 7ffcc4b20f Sync js_runtime to openharmony
Signed-off-by: zhangyukun <zhangyukun8@huawei.com>
2021-09-08 09:20:53 +08:00
wanyanglan 86cfe52253 add ark js_runtime
Signed-off-by: wanyanglan <wanyanglan1@huawei.com>
Change-Id: Iac7851492f10c0ef1303c621febb65e5fdd22e41
2021-09-05 16:05:06 +08:00