Skip to content

Commit

Permalink
[lldb] Add swig doc for SBProcess address mask methods
Browse files Browse the repository at this point in the history
Add descriptions of `GetAddressMask`, `SetAddressMask`,
`SetAddressableBits`, and `FixAddress` SBProcess methods.
  • Loading branch information
jasonmolenda committed Apr 9, 2024
1 parent f7d9337 commit 41dc04e
Showing 1 changed file with 41 additions and 0 deletions.
41 changes: 41 additions & 0 deletions lldb/bindings/interface/SBProcessDocstrings.i
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,47 @@ SBProcess supports thread iteration. For example (from test/lldbutil.py), ::
process_info.GetProcessID()"
) lldb::SBProcess::GetProcessInfo;

%feature("docstring", "
Get the current address mask in this Process of a given type.
There are lldb.eAddressMaskTypeCode and lldb.eAddressMaskTypeData address
masks, and on most Targets, the the Data address mask is more general
because there are no alignment restrictions, as there can be with Code
addresses.
lldb.eAddressMaskTypeAny may be used to get the most general mask.
The bits which are not used for addressing are set to 1 in the returned
mask.
In an unusual environment with different address masks for high and low
memory, this may also be specified. This is uncommon, default is
lldb.eAddressMaskRangeLow."
) lldb::SBProcess::GetAddressMask;

%feature("docstring", "
Set the current address mask in this Process for a given type,
lldb.eAddressMaskTypeCode or lldb.eAddressMaskTypeData. Bits that are not
used for addressing should be set to 1 in the mask.
When setting all masks, lldb.eAddressMaskTypeAll may be specified.
In an unusual environment with different address masks for high and low
memory, this may also be specified. This is uncommon, default is
lldb.eAddressMaskRangeLow."
) lldb::SBProcess::SetAddressMask;

%feature("docstring", "
Set the number of low bits relevant for addressing in this Process
for a given type, lldb.eAddressMaskTypeCode or lldb.eAddressMaskTypeData.
When setting all masks, lldb.eAddressMaskTypeAll may be specified.
In an unusual environment with different address masks for high and low
memory, the address range may also be specified. This is uncommon,
default is lldb.eAddressMaskRangeLow."
) lldb::SBProcess::SetAddressableBits;

%feature("docstring", "
Given a virtual address, clear the bits that are not used for addressing
(and may be used for metadata, memory tagging, point authentication, etc).
By default the most general mask, lldb.eAddressMaskTypeAny is used to
process the address, but lldb.eAddressMaskTypeData and
lldb.eAddressMaskTypeCode may be specified if the type of address is known."
) lldb::SBProcess::FixAddress;

%feature("docstring", "
Allocates a block of memory within the process, with size and
access permissions specified in the arguments. The permissions
Expand Down

0 comments on commit 41dc04e

Please sign in to comment.