[Lldb-commits] [PATCH] D140358: [lldb-vscode] Add support for disassembly view

2023-01-17 Thread Enrico Loparco via Phabricator via lldb-commits
eloparco added inline comments. Comment at: lldb/tools/lldb-vscode/lldb-vscode.cpp:2177 + const auto max_instruction_size = g_vsc.target.GetMaximumOpcodeByteSize(); + const auto bytes_offset = -instruction_offset * max_instruction_size; + auto start_addr = base_addr - bytes_of

[Lldb-commits] [PATCH] D140358: [lldb-vscode] Add support for disassembly view

2023-01-16 Thread Greg Clayton via Phabricator via lldb-commits
clayborg added inline comments. Comment at: lldb/tools/lldb-vscode/lldb-vscode.cpp:2177 + const auto max_instruction_size = g_vsc.target.GetMaximumOpcodeByteSize(); + const auto bytes_offset = -instruction_offset * max_instruction_size; + auto start_addr = base_addr - bytes_of

[Lldb-commits] [PATCH] D140358: [lldb-vscode] Add support for disassembly view

2023-01-15 Thread Enrico Loparco via Phabricator via lldb-commits
eloparco added inline comments. Comment at: lldb/tools/lldb-vscode/lldb-vscode.cpp:2177 + const auto max_instruction_size = g_vsc.target.GetMaximumOpcodeByteSize(); + const auto bytes_offset = -instruction_offset * max_instruction_size; + auto start_addr = base_addr - bytes_of

[Lldb-commits] [PATCH] D140358: [lldb-vscode] Add support for disassembly view

2023-01-11 Thread Greg Clayton via Phabricator via lldb-commits
clayborg added inline comments. Comment at: lldb/tools/lldb-vscode/lldb-vscode.cpp:2177 + const auto max_instruction_size = g_vsc.target.GetMaximumOpcodeByteSize(); + const auto bytes_offset = -instruction_offset * max_instruction_size; + auto start_addr = base_addr - bytes_of

[Lldb-commits] [PATCH] D140358: [lldb-vscode] Add support for disassembly view

2023-01-11 Thread Enrico Loparco via Phabricator via lldb-commits
eloparco added inline comments. Comment at: lldb/tools/lldb-vscode/lldb-vscode.cpp:2177 + const auto bytes_offset = -instruction_offset * bytes_per_instruction; + auto start_addr = base_addr - bytes_offset; + const auto disassemble_bytes = instruction_count * bytes_per_instruc

[Lldb-commits] [PATCH] D140358: [lldb-vscode] Add support for disassembly view

2023-01-11 Thread Greg Clayton via Phabricator via lldb-commits
clayborg added a comment. I mean we can not just subtract something, any number, from any address unless we have fixed size opcodes. If we do this for x86, you can get complete garbage with no hope of ever getting back on track and this disassembly just won't make sense at all and will be usele

[Lldb-commits] [PATCH] D140358: [lldb-vscode] Add support for disassembly view

2023-01-11 Thread Enrico Loparco via Phabricator via lldb-commits
eloparco added a comment. In D140358#4045469 , @eloparco wrote: > In D140358#4045450 , @clayborg > wrote: > >> In D140358#4045442 , @eloparco >> wrote: >> >>> In D140358

[Lldb-commits] [PATCH] D140358: [lldb-vscode] Add support for disassembly view

2023-01-11 Thread Enrico Loparco via Phabricator via lldb-commits
eloparco updated this revision to Diff 488415. eloparco added a comment. Use single-line comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D140358/new/ https://reviews.llvm.org/D140358 Files: lldb/bindings/interface/SBTarget.i lldb/include

[Lldb-commits] [PATCH] D140358: [lldb-vscode] Add support for disassembly view

2023-01-11 Thread Enrico Loparco via Phabricator via lldb-commits
eloparco added a comment. In D140358#4045450 , @clayborg wrote: > In D140358#4045442 , @eloparco > wrote: > >> In D140358#4045210 , @clayborg >> wrote: >> >>> Are you pl

[Lldb-commits] [PATCH] D140358: [lldb-vscode] Add support for disassembly view

2023-01-11 Thread Enrico Loparco via Phabricator via lldb-commits
eloparco added inline comments. Comment at: lldb/include/lldb/API/SBTarget.h:844 + uint32_t GetMaximumOpcodeByteSize() const; + clayborg wrote: > Do we still need this API change with the new approach? We can't really use > this unless we include GetMinimumOp

[Lldb-commits] [PATCH] D140358: [lldb-vscode] Add support for disassembly view

2023-01-11 Thread Greg Clayton via Phabricator via lldb-commits
clayborg added a comment. In D140358#4045442 , @eloparco wrote: > In D140358#4045210 , @clayborg > wrote: > >> Are you planning on updating the reverse disassembly code still on this >> patch? > > What do you me

[Lldb-commits] [PATCH] D140358: [lldb-vscode] Add support for disassembly view

2023-01-11 Thread Enrico Loparco via Phabricator via lldb-commits
eloparco added a comment. In D140358#4045210 , @clayborg wrote: > Are you planning on updating the reverse disassembly code still on this patch? What do you mean by "reverse disassembly"? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[Lldb-commits] [PATCH] D140358: [lldb-vscode] Add support for disassembly view

2023-01-11 Thread Greg Clayton via Phabricator via lldb-commits
clayborg added a comment. Are you planning on updating the reverse disassembly code still on this patch? Comment at: lldb/include/lldb/API/SBTarget.h:844 + uint32_t GetMaximumOpcodeByteSize() const; + Do we still need this API change with the new approach? W

[Lldb-commits] [PATCH] D140358: [lldb-vscode] Add support for disassembly view

2023-01-11 Thread Jim Ingham via Phabricator via lldb-commits
jingham accepted this revision. jingham added a comment. That looks fine. I'm removing my objection, but that's just to the SB API parts, I'm not commenting on the vscode part. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D140358/new/ https://rev

[Lldb-commits] [PATCH] D140358: [lldb-vscode] Add support for disassembly view

2023-01-11 Thread Enrico Loparco via Phabricator via lldb-commits
eloparco added a comment. @jingham I added the test that was missing Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D140358/new/ https://reviews.llvm.org/D140358 ___ lldb-commits mailing list lldb-commits@

[Lldb-commits] [PATCH] D140358: [lldb-vscode] Add support for disassembly view

2023-01-11 Thread Enrico Loparco via Phabricator via lldb-commits
eloparco updated this revision to Diff 488117. eloparco added a comment. Add binding and test for SBTarget::GetMaximumOpcodeByteSize() Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D140358/new/ https://reviews.llvm.org/D140358 Files: lldb/binding

[Lldb-commits] [PATCH] D140358: [lldb-vscode] Add support for disassembly view

2023-01-10 Thread Jim Ingham via Phabricator via lldb-commits
jingham requested changes to this revision. jingham added a comment. This revision now requires changes to proceed. I haven't followed the lldb-vscode codebase closely enough to have useful comments on that part of the code. But so far as I can tell, you didn't add a test for SBTarget::GetMaxim

[Lldb-commits] [PATCH] D140358: [lldb-vscode] Add support for disassembly view

2023-01-06 Thread Enrico Loparco via Phabricator via lldb-commits
eloparco updated this revision to Diff 486794. eloparco added a comment. Fix disassemble on variable-length instructions and disassemble with positive offset Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D140358/new/ https://reviews.llvm.org/D14035

[Lldb-commits] [PATCH] D140358: [lldb-vscode] Add support for disassembly view

2023-01-06 Thread Enrico Loparco via Phabricator via lldb-commits
eloparco added inline comments. Comment at: lldb/tools/lldb-vscode/lldb-vscode.cpp:2194 + if (index == sb_instructions.size() + 1) { +fprintf(stderr, "current line not found in disassembled instructions\n"); +return response_instructions; eloparco wrote:

[Lldb-commits] [PATCH] D140358: [lldb-vscode] Add support for disassembly view

2023-01-06 Thread Enrico Loparco via Phabricator via lldb-commits
eloparco added inline comments. Comment at: lldb/tools/lldb-vscode/lldb-vscode.cpp:2194 + if (index == sb_instructions.size() + 1) { +fprintf(stderr, "current line not found in disassembled instructions\n"); +return response_instructions; clayborg wrote:

[Lldb-commits] [PATCH] D140358: [lldb-vscode] Add support for disassembly view

2023-01-06 Thread Enrico Loparco via Phabricator via lldb-commits
eloparco added inline comments. Comment at: lldb/tools/lldb-vscode/lldb-vscode.cpp:2177 + const auto bytes_offset = -instruction_offset * bytes_per_instruction; + auto start_addr = base_addr - bytes_offset; + const auto disassemble_bytes = instruction_count * bytes_per_instruc

[Lldb-commits] [PATCH] D140358: [lldb-vscode] Add support for disassembly view

2023-01-05 Thread Greg Clayton via Phabricator via lldb-commits
clayborg added inline comments. Comment at: lldb/tools/lldb-vscode/lldb-vscode.cpp:2177 + const auto bytes_offset = -instruction_offset * bytes_per_instruction; + auto start_addr = base_addr - bytes_offset; + const auto disassemble_bytes = instruction_count * bytes_per_instruc

[Lldb-commits] [PATCH] D140358: [lldb-vscode] Add support for disassembly view

2023-01-05 Thread Enrico Loparco via Phabricator via lldb-commits
eloparco updated this revision to Diff 486554. eloparco added a comment. Add integration tests for disassemble request Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D140358/new/ https://reviews.llvm.org/D140358 Files: lldb/include/lldb/API/SBTarg

[Lldb-commits] [PATCH] D140358: [lldb-vscode] Add support for disassembly view

2023-01-05 Thread Enrico Loparco via Phabricator via lldb-commits
eloparco updated this revision to Diff 486553. eloparco added a comment. Add integration tests for disassemble request Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D140358/new/ https://reviews.llvm.org/D140358 Files: lldb/include/lldb/API/SBTarg

[Lldb-commits] [PATCH] D140358: [lldb-vscode] Add support for disassembly view

2023-01-05 Thread Enrico Loparco via Phabricator via lldb-commits
eloparco updated this revision to Diff 486514. eloparco added a comment. Remove printf usage Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D140358/new/ https://reviews.llvm.org/D140358 Files: lldb/include/lldb/API/SBTarget.h lldb/source/API/SBT

[Lldb-commits] [PATCH] D140358: [lldb-vscode] Add support for disassembly view

2023-01-05 Thread Enrico Loparco via Phabricator via lldb-commits
eloparco added inline comments. Comment at: lldb/tools/lldb-vscode/lldb-vscode.cpp:2194 + if (index == sb_instructions.size() + 1) { +fprintf(stderr, "current line not found in disassembled instructions\n"); +return response_instructions; clayborg wrote:

[Lldb-commits] [PATCH] D140358: [lldb-vscode] Add support for disassembly view

2023-01-05 Thread Enrico Loparco via Phabricator via lldb-commits
eloparco added inline comments. Comment at: lldb/tools/lldb-vscode/lldb-vscode.cpp:2177 + const auto bytes_offset = -instruction_offset * bytes_per_instruction; + auto start_addr = base_addr - bytes_offset; + const auto disassemble_bytes = instruction_count * bytes_per_instruc

[Lldb-commits] [PATCH] D140358: [lldb-vscode] Add support for disassembly view

2023-01-04 Thread Greg Clayton via Phabricator via lldb-commits
clayborg requested changes to this revision. clayborg added a comment. This revision now requires changes to proceed. Sorry for delay, I was on recharge for all of December. Comment at: lldb/tools/lldb-vscode/lldb-vscode.cpp:2177 + const auto bytes_offset = -instruction_offset

[Lldb-commits] [PATCH] D140358: [lldb-vscode] Add support for disassembly view

2023-01-04 Thread Greg Clayton via Phabricator via lldb-commits
clayborg added a comment. Sorry for delay, I was on recharge for all of December. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D140358/new/ https://reviews.llvm.org/D140358 ___ lldb-commits mailing list

[Lldb-commits] [PATCH] D140358: [lldb-vscode] Add support for disassembly view

2022-12-21 Thread Enrico Loparco via Phabricator via lldb-commits
eloparco added a comment. @JDevlieghere let me know if there's anything I can do to make the review easier Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D140358/new/ https://reviews.llvm.org/D140358 ___ l

[Lldb-commits] [PATCH] D140358: [lldb-vscode] Add support for disassembly view

2022-12-21 Thread Enrico Loparco via Phabricator via lldb-commits
eloparco updated this revision to Diff 484579. eloparco added a comment. Avoid tracking stack frame boundaries. It is unnecessary and makes the disassembler functionality not work in multi-threaded programs. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm

[Lldb-commits] [PATCH] D140358: [lldb-vscode] Add support for disassembly view

2022-12-20 Thread Enrico Loparco via Phabricator via lldb-commits
eloparco added a comment. That's how it currently looks like: F25758029: image.png I plan on adding support for disassembly in multi-threaded applications (now I only track the stack frame for the main thread in `g_curr_frame`). Repository: rG LLVM Github

[Lldb-commits] [PATCH] D140358: [lldb-vscode] Add support for disassembly view

2022-12-19 Thread Enrico Loparco via Phabricator via lldb-commits
eloparco created this revision. Herald added a project: All. eloparco requested review of this revision. Herald added a project: LLDB. Herald added a subscriber: lldb-commits. Implement DAP (Debug Adapter Protocol) for Disassemble Requests. Repository: rG LLVM Github Monorepo https://reviews.