[Lldb-commits] [lldb] [lldb] Implement WebAssembly debugging (PR #77949)

2024-02-22 Thread Xu Jun via lldb-commits
@@ -0,0 +1,108 @@ +//=== wasmRegisterContext.cpp -===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Ap

[Lldb-commits] [lldb] [lldb] Implement WebAssembly debugging (PR #77949)

2024-02-20 Thread Xu Jun via lldb-commits
@@ -24,17 +24,33 @@ def format_register_value(val): return result +def make_code_address(module_id, offset): +return 0x4000 | (module_id << 32) | offset + xujuntwt95329 wrote: @paolosevMSFT Seems the rule require two empty lines before cl

[Lldb-commits] [lldb] [lldb] Support DW_OP_WASM_location in DWARFExpression (PR #78977)

2024-02-20 Thread Xu Jun via lldb-commits
xujuntwt95329 wrote: Hi @JDevlieghere Could you please give us some suggestions about the next steps for this PR and https://github.com/llvm/llvm-project/pull/77949? Thanks a lot! https://github.com/llvm/llvm-project/pull/78977 ___ lldb-commits maili

[Lldb-commits] [lldb] [lldb] Implement WebAssembly debugging (PR #77949)

2024-02-05 Thread Xu Jun via lldb-commits
xujuntwt95329 wrote: > > I see, thanks for the clarification. In the patch, the WasmLocal and > > WasmGlobal calls are done in ReadRegister, so it seems like those are being > > presented as register values? `register read` should show them. BTW, we > > shouldn't make a top level `wasm` comman

[Lldb-commits] [lldb] [lldb] Implement WebAssembly debugging (PR #77949)

2024-02-05 Thread Xu Jun via lldb-commits
xujuntwt95329 wrote: > > On the other hand, as a managed language, I think most people won't need to > > read specific local/global of an instance, just like most of the JavaScript > > developer won't care about the value of a register in V8 during debugging, > > they just care about the value

[Lldb-commits] [lldb] [lldb] Implement WebAssembly debugging (PR #77949)

2024-01-28 Thread Xu Jun via lldb-commits
xujuntwt95329 wrote: > > Hi @mh4ck-Thales this is caused by [#77949 > > (comment)](https://github.com/llvm/llvm-project/pull/77949#discussion_r1463458728), > > currently we need to modify it manually. > > Thanks! That did the trick for the breakpoint and disassembly problems. When > using `re

[Lldb-commits] [lldb] [lldb] Implement WebAssembly debugging (PR #77949)

2024-01-25 Thread Xu Jun via lldb-commits
xujuntwt95329 wrote: > I already tried to use `register read` to access Wasm variables without > success. But it was the patch available > [here](https://github.com/bytecodealliance/wasm-micro-runtime/blob/main/build-scripts/lldb_wasm.patch) > is part of WAMR, maybe this patch is different and

[Lldb-commits] [lldb] [lldb] Implement WebAssembly debugging (PR #77949)

2024-01-23 Thread Xu Jun via lldb-commits
xujuntwt95329 wrote: Thanks @paolosevMSFT for the great work! We have implemented debugger server in [WebAssembly Micro Runtime (WAMR)](https://github.com/bytecodealliance/wasm-micro-runtime) to work with this, and it works well! ![image](https://github.com/llvm/llvm-project/assets/20285361/bb

[Lldb-commits] [lldb] [lldb] Implement WebAssembly debugging (PR #77949)

2024-01-23 Thread Xu Jun via lldb-commits
@@ -0,0 +1,291 @@ +//===-- ProcessWasm.cpp ---===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Ap

[Lldb-commits] [lldb] [lldb] Implement WebAssembly debugging (PR #77949)

2024-01-23 Thread Xu Jun via lldb-commits
@@ -0,0 +1,293 @@ +//===-- ProcessWasm.cpp ---===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Ap

[Lldb-commits] [lldb] [lldb][dap] always add column field in StackFrame body (PR #73393)

2023-11-26 Thread Xu Jun via lldb-commits
@@ -817,8 +817,7 @@ llvm::json::Value CreateStackFrame(lldb::SBFrame &frame) { if (line && line != LLDB_INVALID_LINE_NUMBER) object.try_emplace("line", line); xujuntwt95329 wrote: Thanks! Updated https://github.com/llvm/llvm-project/pull/73393 __

[Lldb-commits] [lldb] [lldb][dap] always add column field in StackFrame body (PR #73393)

2023-11-26 Thread Xu Jun via lldb-commits
https://github.com/xujuntwt95329 updated https://github.com/llvm/llvm-project/pull/73393 >From 4621be9af9a8003c52850ed57ae7a24f26769b2c Mon Sep 17 00:00:00 2001 From: Xu Jun <693788...@qq.com> Date: Sat, 25 Nov 2023 22:52:53 +0800 Subject: [PATCH 1/2] [lldb][dap] always add column field in Stack

[Lldb-commits] [lldb] [lldb][dap] always add column field in StackFrame body (PR #73393)

2023-11-25 Thread Xu Jun via lldb-commits
https://github.com/xujuntwt95329 created https://github.com/llvm/llvm-project/pull/73393 The `column` field is mandatory in StackTraceResponse, otherwise the debugger client may raise error (e.g. VSCode can't correctly open an editor without the column field) >From 4621be9af9a8003c52850ed57a

[Lldb-commits] [lldb] [lldb] enable wasm source debugging (PR #72634)

2023-11-17 Thread Xu Jun via lldb-commits
https://github.com/xujuntwt95329 closed https://github.com/llvm/llvm-project/pull/72634 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb] enable wasm source debugging (PR #72634)

2023-11-17 Thread Xu Jun via lldb-commits
https://github.com/xujuntwt95329 created https://github.com/llvm/llvm-project/pull/72634 Rebase https://reviews.llvm.org/D78978 on latest code base, with less modification to LLDB core part: I treat wasm locals, globals and operand stack values as virtual registers, and implement a wasmRegist