aboutsummaryrefslogtreecommitdiff
path: root/lldb/unittests/Process/gdb-remote/GDBRemoteCommunicationClientTest.cpp
diff options
context:
space:
mode:
authorFelipe de Azevedo Piovezan <fpiovezan@apple.com>2024-09-04 07:02:55 -0700
committerGitHub <noreply@github.com>2024-09-04 07:02:55 -0700
commit1b0a80249399dadfe0c3f682fff77bf9eb666535 (patch)
treec2e623f22b1bd0697ec5abb4971f443c566f36c6 /lldb/unittests/Process/gdb-remote/GDBRemoteCommunicationClientTest.cpp
parent7732d8e51819416b9d28b1815bdf81d0e0642b04 (diff)
downloadllvm-1b0a80249399dadfe0c3f682fff77bf9eb666535.zip
llvm-1b0a80249399dadfe0c3f682fff77bf9eb666535.tar.gz
llvm-1b0a80249399dadfe0c3f682fff77bf9eb666535.tar.bz2
[GDBRemote] Handle 'heap' memory region info type (#105883)
This should cause the memory region info "is stack" field to be set to "no".
Diffstat (limited to 'lldb/unittests/Process/gdb-remote/GDBRemoteCommunicationClientTest.cpp')
-rw-r--r--lldb/unittests/Process/gdb-remote/GDBRemoteCommunicationClientTest.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/lldb/unittests/Process/gdb-remote/GDBRemoteCommunicationClientTest.cpp b/lldb/unittests/Process/gdb-remote/GDBRemoteCommunicationClientTest.cpp
index 18020c8e..ce5ab2c 100644
--- a/lldb/unittests/Process/gdb-remote/GDBRemoteCommunicationClientTest.cpp
+++ b/lldb/unittests/Process/gdb-remote/GDBRemoteCommunicationClientTest.cpp
@@ -364,6 +364,15 @@ TEST_F(GDBRemoteCommunicationClientTest, GetMemoryRegionInfo) {
EXPECT_TRUE(result.get().Success());
EXPECT_EQ(MemoryRegionInfo::eYes, region_info.GetMemoryTagged());
EXPECT_EQ(MemoryRegionInfo::eYes, region_info.IsStackMemory());
+
+ result = std::async(std::launch::async, [&] {
+ return client.GetMemoryRegionInfo(addr, region_info);
+ });
+
+ HandlePacket(server, "qMemoryRegionInfo:a000",
+ "start:a000;size:2000;type:heap;");
+ EXPECT_TRUE(result.get().Success());
+ EXPECT_EQ(MemoryRegionInfo::eNo, region_info.IsStackMemory());
}
TEST_F(GDBRemoteCommunicationClientTest, GetMemoryRegionInfoInvalidResponse) {