[Lldb-commits] [lldb] [lldb/linux] Make truncated reads work (PR #106532)

2024-09-02 Thread Pavel Labath via lldb-commits
https://github.com/labath closed https://github.com/llvm/llvm-project/pull/106532 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb/linux] Make truncated reads work (PR #106532)

2024-09-02 Thread David Spickett via lldb-commits
https://github.com/DavidSpickett approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/106532 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb/linux] Make truncated reads work (PR #106532)

2024-09-02 Thread David Spickett via lldb-commits
@@ -2526,28 +2526,16 @@ GDBRemoteCommunicationServerLLGS::Handle_memory_read( size_t bytes_read = 0; Status error = m_current_process->ReadMemoryWithoutTrap( read_addr, &buf[0], byte_count, bytes_read); - if (error.Fail()) { -LLDB_LOGF(log, - "GDBRem

[Lldb-commits] [lldb] [lldb/linux] Make truncated reads work (PR #106532)

2024-09-02 Thread Pavel Labath via lldb-commits
https://github.com/labath updated https://github.com/llvm/llvm-project/pull/106532 >From 610757ced98139d3d10451dcca195692b0c2d832 Mon Sep 17 00:00:00 2001 From: Pavel Labath Date: Thu, 29 Aug 2024 12:26:01 +0200 Subject: [PATCH 1/3] [lldb/linux] Make truncated reads work Previously, we were re

[Lldb-commits] [lldb] [lldb/linux] Make truncated reads work (PR #106532)

2024-09-02 Thread Pavel Labath via lldb-commits
@@ -0,0 +1,63 @@ +""" +Test the memory commands operating on memory regions with holes labath wrote: Done. https://github.com/llvm/llvm-project/pull/106532 ___ lldb-commits mailing list lldb-commits@lists.llvm.org http

[Lldb-commits] [lldb] [lldb/linux] Make truncated reads work (PR #106532)

2024-09-02 Thread Pavel Labath via lldb-commits
@@ -2526,28 +2526,16 @@ GDBRemoteCommunicationServerLLGS::Handle_memory_read( size_t bytes_read = 0; Status error = m_current_process->ReadMemoryWithoutTrap( read_addr, &buf[0], byte_count, bytes_read); - if (error.Fail()) { -LLDB_LOGF(log, - "GDBRem

[Lldb-commits] [lldb] [lldb/linux] Make truncated reads work (PR #106532)

2024-09-02 Thread Pavel Labath via lldb-commits
@@ -0,0 +1,63 @@ +""" +Test the memory commands operating on memory regions with holes +""" + +import lldb +from lldbsuite.test.lldbtest import * +import lldbsuite.test.lldbutil as lldbutil +from lldbsuite.test.decorators import * + + +class MemoryHolesTestCase(TestBase): +NO_

[Lldb-commits] [lldb] [lldb/linux] Make truncated reads work (PR #106532)

2024-09-02 Thread Pavel Labath via lldb-commits
@@ -0,0 +1,63 @@ +""" +Test the memory commands operating on memory regions with holes +""" + +import lldb +from lldbsuite.test.lldbtest import * +import lldbsuite.test.lldbutil as lldbutil +from lldbsuite.test.decorators import * + + +class MemoryHolesTestCase(TestBase): +NO_

[Lldb-commits] [lldb] [lldb/linux] Make truncated reads work (PR #106532)

2024-09-02 Thread Pavel Labath via lldb-commits
@@ -1641,6 +1641,10 @@ NativeProcessLinux::GetSoftwareBreakpointTrapOpcode(size_t size_hint) { Status NativeProcessLinux::ReadMemory(lldb::addr_t addr, void *buf, size_t size, size_t &bytes_read) { + Log *log = GetLog(POSIXLog::Memory);

[Lldb-commits] [lldb] [lldb/linux] Make truncated reads work (PR #106532)

2024-09-02 Thread David Spickett via lldb-commits
@@ -0,0 +1,63 @@ +""" +Test the memory commands operating on memory regions with holes +""" + +import lldb +from lldbsuite.test.lldbtest import * +import lldbsuite.test.lldbutil as lldbutil +from lldbsuite.test.decorators import * + + +class MemoryHolesTestCase(TestBase): +NO_

[Lldb-commits] [lldb] [lldb/linux] Make truncated reads work (PR #106532)

2024-09-02 Thread David Spickett via lldb-commits
@@ -0,0 +1,63 @@ +""" +Test the memory commands operating on memory regions with holes DavidSpickett wrote: I don't mind the terminology but perhaps add ` with holes (inaccessible pages)` to help anyone who is skimming through this. So they only have to read the

[Lldb-commits] [lldb] [lldb/linux] Make truncated reads work (PR #106532)

2024-09-02 Thread David Spickett via lldb-commits
@@ -2526,28 +2526,16 @@ GDBRemoteCommunicationServerLLGS::Handle_memory_read( size_t bytes_read = 0; Status error = m_current_process->ReadMemoryWithoutTrap( read_addr, &buf[0], byte_count, bytes_read); - if (error.Fail()) { -LLDB_LOGF(log, - "GDBRem

[Lldb-commits] [lldb] [lldb/linux] Make truncated reads work (PR #106532)

2024-09-02 Thread David Spickett via lldb-commits
@@ -1641,6 +1641,10 @@ NativeProcessLinux::GetSoftwareBreakpointTrapOpcode(size_t size_hint) { Status NativeProcessLinux::ReadMemory(lldb::addr_t addr, void *buf, size_t size, size_t &bytes_read) { + Log *log = GetLog(POSIXLog::Memory);

[Lldb-commits] [lldb] [lldb/linux] Make truncated reads work (PR #106532)

2024-08-29 Thread Greg Clayton via lldb-commits
https://github.com/clayborg approved this pull request. https://github.com/llvm/llvm-project/pull/106532 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb/linux] Make truncated reads work (PR #106532)

2024-08-29 Thread Pavel Labath via lldb-commits
https://github.com/labath updated https://github.com/llvm/llvm-project/pull/106532 >From 610757ced98139d3d10451dcca195692b0c2d832 Mon Sep 17 00:00:00 2001 From: Pavel Labath Date: Thu, 29 Aug 2024 12:26:01 +0200 Subject: [PATCH 1/2] [lldb/linux] Make truncated reads work Previously, we were re

[Lldb-commits] [lldb] [lldb/linux] Make truncated reads work (PR #106532)

2024-08-29 Thread Pavel Labath via lldb-commits
@@ -2526,28 +2526,16 @@ GDBRemoteCommunicationServerLLGS::Handle_memory_read( size_t bytes_read = 0; Status error = m_current_process->ReadMemoryWithoutTrap( read_addr, &buf[0], byte_count, bytes_read); - if (error.Fail()) { -LLDB_LOGF(log, - "GDBRem

[Lldb-commits] [lldb] [lldb/linux] Make truncated reads work (PR #106532)

2024-08-29 Thread Pavel Labath via lldb-commits
@@ -0,0 +1,63 @@ +""" +Test the memory commands operating on memory regions with holes +""" + +import lldb +from lldbsuite.test.lldbtest import * +import lldbsuite.test.lldbutil as lldbutil +from lldbsuite.test.decorators import * + + +class MemoryHolesTestCase(TestBase): +NO_

[Lldb-commits] [lldb] [lldb/linux] Make truncated reads work (PR #106532)

2024-08-29 Thread via lldb-commits
github-actions[bot] wrote: :warning: C/C++ code formatter, clang-format found issues in your code. :warning: You can test this locally with the following command: ``bash git-clang-format --diff fdca2c33a1f33f4886d969ea0f0219764c7b6b59 610757ced98139d3d10451dcca195692b0c2d832 --e

[Lldb-commits] [lldb] [lldb/linux] Make truncated reads work (PR #106532)

2024-08-29 Thread via lldb-commits
llvmbot wrote: @llvm/pr-subscribers-lldb Author: Pavel Labath (labath) Changes Previously, we were returning an error if we couldn't read the whole region. This doesn't matter most of the time, because lldb caches memory reads, and in that process it aligns them to cache line boundaries.

[Lldb-commits] [lldb] [lldb/linux] Make truncated reads work (PR #106532)

2024-08-29 Thread Pavel Labath via lldb-commits
https://github.com/labath created https://github.com/llvm/llvm-project/pull/106532 Previously, we were returning an error if we couldn't read the whole region. This doesn't matter most of the time, because lldb caches memory reads, and in that process it aligns them to cache line boundaries. A