From 1b0a80249399dadfe0c3f682fff77bf9eb666535 Mon Sep 17 00:00:00 2001 From: Felipe de Azevedo Piovezan Date: Wed, 4 Sep 2024 07:02:55 -0700 Subject: [GDBRemote] Handle 'heap' memory region info type (#105883) This should cause the memory region info "is stack" field to be set to "no". --- .../Process/gdb-remote/GDBRemoteCommunicationClientTest.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'lldb/unittests/Process/gdb-remote/GDBRemoteCommunicationClientTest.cpp') 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) { -- cgit v1.1