<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/155692>155692</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
LLDB `SBMemoryRegionInfo` Python API does not expose `type` of memory region (macOS)
</td>
</tr>
<tr>
<th>Labels</th>
<td>
new issue
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
patryk4815
</td>
</tr>
</table>
<pre>
On macOS, when querying memory regions via LLDB’s Python API, the `type` field returned by gdb-remote packets (e.g., `type:malloc-metadata`) is **not exposed** through `lldb.SBMemoryRegionInfo`.
There is no `GetType()` method, so scripts cannot access memory region types even though the underlying packets provide this information.
Here `type:` is parsed:
https://github.com/llvm/llvm-project/blob/a87f776c1c873ea86a95c368f1a9331adc65d1ee/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp#L1638-L1645
## Example
```lldb
(lldb) b main
(lldb) log enable gdb-remote all
(lldb) script
>>> regions = lldb.process.GetMemoryRegions()
# Example packets show type field is present
< 87> read packet: $start:100020000;size:4000;permissions:r;dirty-pages:100020000;type:malloc-metadata;#00
< 88> read packet: $start:100024000;size:4000;permissions:rw;dirty-pages:100024000;type:malloc-metadata;#00
>>> region = lldb.SBMemoryRegionInfo()
>>> regions.GetMemoryRegionAtIndex(7, region)
True
>>> region
[0x0000000100024000-0x0000000100028000 RW-]
>>> region.GetType()
Traceback (most recent call last):
File "<console>", line 1, in <module>
AttributeError: 'SBMemoryRegionInfo' object has no attribute 'GetType'
```
## Expected behavior
- `SBMemoryRegionInfo` should expose the `type` field from gdb-remote packets
</pre>
<img width="1" height="1" alt="" src="http://email.email.llvm.org/o/eJyUVd1u2zgTfRr6ZmCDIvXnC13ISdyvQD60aAvsNUWOJW4pUktSSbxPv6CUOD_rAl1DgCmKMzwzZ-aMCEH3FrEhxYEUtxsxx8H5ZhLRn3_mdVZsOqfOzRcLo5BfvhN2A48DWvhrRn_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