[Lldb-commits] [lldb] [lldb][riscv] Fix setting breakpoint for undecoded instruction (PR #90075)

2024-06-07 Thread Jonas Devlieghere via lldb-commits
@@ -94,6 +94,39 @@ static lldb::addr_t ReadFlags(NativeRegisterContext _context) { LLDB_INVALID_ADDRESS); } +static int GetSoftwareBreakpointSize(const ArchSpec , + lldb::addr_t next_flags)

[Lldb-commits] [lldb] [lldb][riscv] Fix setting breakpoint for undecoded instruction (PR #90075)

2024-06-07 Thread Jonas Devlieghere via lldb-commits
https://github.com/JDevlieghere edited https://github.com/llvm/llvm-project/pull/90075 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb][riscv] Fix setting breakpoint for undecoded instruction (PR #90075)

2024-06-07 Thread Jonas Devlieghere via lldb-commits
https://github.com/JDevlieghere commented: A few small nits. I defer to Pavel and Jason for the functional changes. https://github.com/llvm/llvm-project/pull/90075 ___ lldb-commits mailing list lldb-commits@lists.llvm.org

[Lldb-commits] [lldb] [lldb][riscv] Fix setting breakpoint for undecoded instruction (PR #90075)

2024-06-07 Thread Jonas Devlieghere via lldb-commits
@@ -94,6 +94,39 @@ static lldb::addr_t ReadFlags(NativeRegisterContext _context) { LLDB_INVALID_ADDRESS); } +static int GetSoftwareBreakpointSize(const ArchSpec , + lldb::addr_t next_flags)

[Lldb-commits] [lldb] [lldb][riscv] Fix setting breakpoint for undecoded instruction (PR #90075)

2024-06-07 Thread via lldb-commits
https://github.com/ita-sc updated https://github.com/llvm/llvm-project/pull/90075 >From b30ddc631ccc02b0bf1de6f1d98065199ed0b82d Mon Sep 17 00:00:00 2001 From: Ivan Tetyushkin Date: Fri, 7 Jun 2024 11:23:24 +0300 Subject: [PATCH] [lldb][riscv] Fix setting breakpoint for undecoded instruction

[Lldb-commits] [lldb] [lldb][riscv] Fix setting breakpoint for undecoded instruction (PR #90075)

2024-06-07 Thread via lldb-commits
https://github.com/ita-sc updated https://github.com/llvm/llvm-project/pull/90075 >From 936846a18f31bba09f08d73195fe4945ef3508d3 Mon Sep 17 00:00:00 2001 From: Ivan Tetyushkin Date: Fri, 7 Jun 2024 11:23:24 +0300 Subject: [PATCH] [lldb][riscv] Fix setting breakpoint for undecoded instruction

[Lldb-commits] [lldb] [lldb][riscv] Fix setting breakpoint for undecoded instruction (PR #90075)

2024-06-07 Thread via lldb-commits
@@ -94,6 +94,39 @@ static lldb::addr_t ReadFlags(NativeRegisterContext _context) { LLDB_INVALID_ADDRESS); } +static int GetSoftwareWatchpointSize(const ArchSpec , ita-sc wrote: Fixed, changed to

[Lldb-commits] [lldb] [lldb][riscv] Fix setting breakpoint for undecoded instruction (PR #90075)

2024-06-07 Thread via lldb-commits
https://github.com/ita-sc updated https://github.com/llvm/llvm-project/pull/90075 >From 11ecb22c9473a2eee135ba0373e3890b9389851a Mon Sep 17 00:00:00 2001 From: Ivan Tetyushkin Date: Fri, 7 Jun 2024 11:23:24 +0300 Subject: [PATCH] [lldb][riscv] Fix setting breakpoint for undecoded instruction

[Lldb-commits] [lldb] [lldb][riscv] Fix setting breakpoint for undecoded instruction (PR #90075)

2024-06-07 Thread via lldb-commits
github-actions[bot] wrote: :warning: Python code formatter, darker found issues in your code. :warning: You can test this locally with the following command: ``bash darker --check --diff -r 8ef5c98e9f9276f09c590e22ab88a20ae86f3859...a8ee2a2ee75fcfac96a45796d0675eaa89c1aca6

[Lldb-commits] [lldb] [lldb][riscv] Fix setting breakpoint for undecoded instruction (PR #90075)

2024-06-07 Thread via lldb-commits
@@ -115,8 +148,23 @@ Status NativeProcessSoftwareSingleStep::SetupSoftwareSingleStepping( emulator_up->SetWriteMemCallback(); emulator_up->SetWriteRegCallback(); - if (!emulator_up->ReadInstruction()) -return Status("Read instruction failed!"); + if

[Lldb-commits] [lldb] [lldb][riscv] Fix setting breakpoint for undecoded instruction (PR #90075)

2024-06-07 Thread via lldb-commits
@@ -0,0 +1,27 @@ +""" +Test that we can set up software breakpoint even if we failed to decode and execute instruction +""" + +import lldb +from lldbsuite.test.decorators import * +from lldbsuite.test.lldbtest import * +from lldbsuite.test import lldbutil + + +class

[Lldb-commits] [lldb] [lldb][riscv] Fix setting breakpoint for undecoded instruction (PR #90075)

2024-06-07 Thread via lldb-commits
@@ -94,6 +94,39 @@ static lldb::addr_t ReadFlags(NativeRegisterContext _context) { LLDB_INVALID_ADDRESS); } +static int GetSoftwareWatchpointSize(const ArchSpec , + lldb::addr_t next_flags)

[Lldb-commits] [lldb] [lldb][riscv] Fix setting breakpoint for undecoded instruction (PR #90075)

2024-06-07 Thread via lldb-commits
@@ -94,6 +94,39 @@ static lldb::addr_t ReadFlags(NativeRegisterContext _context) { LLDB_INVALID_ADDRESS); } +static int GetSoftwareWatchpointSize(const ArchSpec , + lldb::addr_t next_flags)

[Lldb-commits] [lldb] [lldb][riscv] Fix setting breakpoint for undecoded instruction (PR #90075)

2024-06-07 Thread via lldb-commits
https://github.com/ita-sc updated https://github.com/llvm/llvm-project/pull/90075 >From a8ee2a2ee75fcfac96a45796d0675eaa89c1aca6 Mon Sep 17 00:00:00 2001 From: Ivan Tetyushkin Date: Fri, 7 Jun 2024 11:23:24 +0300 Subject: [PATCH] Fix setting breakpoint for undecoded instruction Copy gdb

[Lldb-commits] [lldb] [lldb][riscv] Fix setting breakpoint for undecoded instruction (PR #90075)

2024-05-29 Thread Pavel Labath via lldb-commits
@@ -0,0 +1,27 @@ +""" +Test that we can set up software breakpoint even if we failed to decode and execute instruction +""" + +import lldb +from lldbsuite.test.decorators import * +from lldbsuite.test.lldbtest import * +from lldbsuite.test import lldbutil + + +class

[Lldb-commits] [lldb] [lldb][riscv] Fix setting breakpoint for undecoded instruction (PR #90075)

2024-05-29 Thread Pavel Labath via lldb-commits
@@ -94,6 +94,39 @@ static lldb::addr_t ReadFlags(NativeRegisterContext _context) { LLDB_INVALID_ADDRESS); } +static int GetSoftwareWatchpointSize(const ArchSpec , + lldb::addr_t next_flags)

[Lldb-commits] [lldb] [lldb][riscv] Fix setting breakpoint for undecoded instruction (PR #90075)

2024-05-29 Thread Pavel Labath via lldb-commits
@@ -115,8 +148,23 @@ Status NativeProcessSoftwareSingleStep::SetupSoftwareSingleStepping( emulator_up->SetWriteMemCallback(); emulator_up->SetWriteRegCallback(); - if (!emulator_up->ReadInstruction()) -return Status("Read instruction failed!"); + if

[Lldb-commits] [lldb] [lldb][riscv] Fix setting breakpoint for undecoded instruction (PR #90075)

2024-05-29 Thread Pavel Labath via lldb-commits
@@ -94,6 +94,39 @@ static lldb::addr_t ReadFlags(NativeRegisterContext _context) { LLDB_INVALID_ADDRESS); } +static int GetSoftwareWatchpointSize(const ArchSpec , + lldb::addr_t next_flags)

[Lldb-commits] [lldb] [lldb][riscv] Fix setting breakpoint for undecoded instruction (PR #90075)

2024-05-29 Thread Pavel Labath via lldb-commits
@@ -94,6 +94,39 @@ static lldb::addr_t ReadFlags(NativeRegisterContext _context) { LLDB_INVALID_ADDRESS); } +static int GetSoftwareWatchpointSize(const ArchSpec , labath wrote: Doesn't this return the size of

[Lldb-commits] [lldb] [lldb][riscv] Fix setting breakpoint for undecoded instruction (PR #90075)

2024-05-27 Thread via lldb-commits
ita-sc wrote: > I read this patch while trying to keep the RVC instruction set in mind > because it's an interesting case to consider. Maybe the test file could have > a compressed instruction? The one instruction there now ends in 0b11 so I > don't think it will decode that way. The test

[Lldb-commits] [lldb] [lldb][riscv] Fix setting breakpoint for undecoded instruction (PR #90075)

2024-05-27 Thread via lldb-commits
@@ -99,6 +100,8 @@ class EmulateInstructionRISCV : public EmulateInstruction { private: /// Last decoded instruction from m_opcode DecodeResult m_decoded; + /// Last tried to be decoded instruction expected size. ita-sc wrote: Well, I tried to emphasize

[Lldb-commits] [lldb] [lldb][riscv] Fix setting breakpoint for undecoded instruction (PR #90075)

2024-05-27 Thread via lldb-commits
@@ -115,8 +148,23 @@ Status NativeProcessSoftwareSingleStep::SetupSoftwareSingleStepping( emulator_up->SetWriteMemCallback(); emulator_up->SetWriteRegCallback(); - if (!emulator_up->ReadInstruction()) -return Status("Read instruction failed!"); + if

[Lldb-commits] [lldb] [lldb][riscv] Fix setting breakpoint for undecoded instruction (PR #90075)

2024-05-27 Thread via lldb-commits
@@ -115,8 +148,23 @@ Status NativeProcessSoftwareSingleStep::SetupSoftwareSingleStepping( emulator_up->SetWriteMemCallback(); emulator_up->SetWriteRegCallback(); - if (!emulator_up->ReadInstruction()) -return Status("Read instruction failed!"); + if

[Lldb-commits] [lldb] [lldb][riscv] Fix setting breakpoint for undecoded instruction (PR #90075)

2024-05-27 Thread via lldb-commits
https://github.com/ita-sc updated https://github.com/llvm/llvm-project/pull/90075 >From a95314eb8afd5f697a7a138d4e1e1465611c8533 Mon Sep 17 00:00:00 2001 From: Ivan Tetyushkin Date: Fri, 19 Apr 2024 18:47:05 +0300 Subject: [PATCH 1/2] [lldb][riscv] Fix setting breakpoint for undecoded

[Lldb-commits] [lldb] [lldb][riscv] Fix setting breakpoint for undecoded instruction (PR #90075)

2024-05-27 Thread via lldb-commits
@@ -115,8 +148,23 @@ Status NativeProcessSoftwareSingleStep::SetupSoftwareSingleStepping( emulator_up->SetWriteMemCallback(); emulator_up->SetWriteRegCallback(); - if (!emulator_up->ReadInstruction()) -return Status("Read instruction failed!"); + if

[Lldb-commits] [lldb] [lldb][riscv] Fix setting breakpoint for undecoded instruction (PR #90075)

2024-05-20 Thread Jason Molenda via lldb-commits
https://github.com/jasonmolenda edited https://github.com/llvm/llvm-project/pull/90075 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb][riscv] Fix setting breakpoint for undecoded instruction (PR #90075)

2024-05-20 Thread Jason Molenda via lldb-commits
@@ -115,8 +148,23 @@ Status NativeProcessSoftwareSingleStep::SetupSoftwareSingleStepping( emulator_up->SetWriteMemCallback(); emulator_up->SetWriteRegCallback(); - if (!emulator_up->ReadInstruction()) -return Status("Read instruction failed!"); + if

[Lldb-commits] [lldb] [lldb][riscv] Fix setting breakpoint for undecoded instruction (PR #90075)

2024-05-20 Thread Jason Molenda via lldb-commits
https://github.com/jasonmolenda edited https://github.com/llvm/llvm-project/pull/90075 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb][riscv] Fix setting breakpoint for undecoded instruction (PR #90075)

2024-05-20 Thread Jason Molenda via lldb-commits
@@ -115,8 +148,23 @@ Status NativeProcessSoftwareSingleStep::SetupSoftwareSingleStepping( emulator_up->SetWriteMemCallback(); emulator_up->SetWriteRegCallback(); - if (!emulator_up->ReadInstruction()) -return Status("Read instruction failed!"); + if

[Lldb-commits] [lldb] [lldb][riscv] Fix setting breakpoint for undecoded instruction (PR #90075)

2024-05-20 Thread Jason Molenda via lldb-commits
@@ -115,8 +148,23 @@ Status NativeProcessSoftwareSingleStep::SetupSoftwareSingleStepping( emulator_up->SetWriteMemCallback(); emulator_up->SetWriteRegCallback(); - if (!emulator_up->ReadInstruction()) -return Status("Read instruction failed!"); + if

[Lldb-commits] [lldb] [lldb][riscv] Fix setting breakpoint for undecoded instruction (PR #90075)

2024-05-20 Thread Jason Molenda via lldb-commits
@@ -115,8 +148,23 @@ Status NativeProcessSoftwareSingleStep::SetupSoftwareSingleStepping( emulator_up->SetWriteMemCallback(); emulator_up->SetWriteRegCallback(); - if (!emulator_up->ReadInstruction()) -return Status("Read instruction failed!"); + if

[Lldb-commits] [lldb] [lldb][riscv] Fix setting breakpoint for undecoded instruction (PR #90075)

2024-05-20 Thread Jason Molenda via lldb-commits
https://github.com/jasonmolenda commented: I read this patch while trying to keep the RVC instruction set in mind because it's an interesting case to consider. Maybe the test file could have a compressed instruction? The one instruction there now ends in 0b11 so I don't think it will decode

[Lldb-commits] [lldb] [lldb][riscv] Fix setting breakpoint for undecoded instruction (PR #90075)

2024-05-20 Thread Jason Molenda via lldb-commits
@@ -99,6 +100,8 @@ class EmulateInstructionRISCV : public EmulateInstruction { private: /// Last decoded instruction from m_opcode DecodeResult m_decoded; + /// Last tried to be decoded instruction expected size. jasonmolenda wrote: I might call this

[Lldb-commits] [lldb] [lldb][riscv] Fix setting breakpoint for undecoded instruction (PR #90075)

2024-04-25 Thread via lldb-commits
llvmbot wrote: @llvm/pr-subscribers-lldb Author: None (ita-sc) Changes Hi This patch adds an interface GetLastInstrSize to get information about the size of last tried to be decoded instruction and uses it to set software breakpoint if the memory can be decoded as instruction. RISC-V

[Lldb-commits] [lldb] [lldb][riscv] Fix setting breakpoint for undecoded instruction (PR #90075)

2024-04-25 Thread via lldb-commits
https://github.com/ita-sc created https://github.com/llvm/llvm-project/pull/90075 Hi This patch adds an interface GetLastInstrSize to get information about the size of last tried to be decoded instruction and uses it to set software breakpoint if the memory can be decoded as instruction.