@@ -343,24 +343,36 @@ TEST_F(GDBRemoteCommunicationClientTest, GetMemoryRegionInfo) {
343
343
EXPECT_EQ (MemoryRegionInfo::eYes, region_info.GetExecutable ());
344
344
EXPECT_EQ (" /foo/bar.so" , region_info.GetName ().GetStringRef ());
345
345
EXPECT_EQ (MemoryRegionInfo::eDontKnow, region_info.GetMemoryTagged ());
346
+ EXPECT_EQ (MemoryRegionInfo::eDontKnow, region_info.IsStackMemory ());
346
347
347
348
result = std::async (std::launch::async, [&] {
348
349
return client.GetMemoryRegionInfo (addr, region_info);
349
350
});
350
351
351
352
HandlePacket (server, " qMemoryRegionInfo:a000" ,
352
- " start:a000;size:2000;flags:;" );
353
+ " start:a000;size:2000;flags:;type:stack; " );
353
354
EXPECT_TRUE (result.get ().Success ());
354
355
EXPECT_EQ (MemoryRegionInfo::eNo, region_info.GetMemoryTagged ());
356
+ EXPECT_EQ (MemoryRegionInfo::eYes, region_info.IsStackMemory ());
355
357
356
358
result = std::async (std::launch::async, [&] {
357
359
return client.GetMemoryRegionInfo (addr, region_info);
358
360
});
359
361
360
362
HandlePacket (server, " qMemoryRegionInfo:a000" ,
361
- " start:a000;size:2000;flags: mt zz mt ;" );
363
+ " start:a000;size:2000;flags: mt zz mt ;type:ha,ha,stack; " );
362
364
EXPECT_TRUE (result.get ().Success ());
363
365
EXPECT_EQ (MemoryRegionInfo::eYes, region_info.GetMemoryTagged ());
366
+ EXPECT_EQ (MemoryRegionInfo::eYes, region_info.IsStackMemory ());
367
+
368
+ result = std::async (std::launch::async, [&] {
369
+ return client.GetMemoryRegionInfo (addr, region_info);
370
+ });
371
+
372
+ HandlePacket (server, " qMemoryRegionInfo:a000" ,
373
+ " start:a000;size:2000;type:heap;" );
374
+ EXPECT_TRUE (result.get ().Success ());
375
+ EXPECT_EQ (MemoryRegionInfo::eNo, region_info.IsStackMemory ());
364
376
}
365
377
366
378
TEST_F (GDBRemoteCommunicationClientTest, GetMemoryRegionInfoInvalidResponse) {
0 commit comments