You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
pwndbg/docs/commands/memory/mprotect.md

47 lines
1.3 KiB
Markdown

<!-- THIS PART OF THIS FILE IS AUTOGENERATED. DO NOT MODIFY IT. See scripts/generate_docs.sh -->
# mprotect
## Description
Calls the mprotect syscall and prints its result value.
Note that the mprotect syscall may fail for various reasons
(see `man mprotect`) and a non-zero error return value
can be decoded with the `errno <value>` command.
Examples:
mprotect $rsp 4096 PROT_READ|PROT_WRITE|PROT_EXEC
mprotect $rsp 4096 rwx
mprotect $rsp 4096 7
mprotect some_symbol 0x1000 PROT_NONE
## Usage:
```bash
usage: mprotect [-h] addr length prot
```
## Positional Arguments
|Positional Argument|Help|
| :--- | :--- |
|`addr`|Page-aligned address to all mprotect on.|
|`length`|Count of bytes to call mprotect on. Needs to be multiple of page size.|
|`prot`|Prot string as in mprotect(2). Eg. "PROT_READ\|PROT_EXEC", "rx", or "5"|
## Optional Arguments
|Short|Long|Default|Help|
| :--- | :--- | :--- | :--- |
|`-h`|`--help`||show this help message and exit|
<!-- END OF AUTOGENERATED PART. Do not modify this line or the line below, they mark the end of the auto-generated part of the file. If you want to extend the documentation in a way which cannot easily be done by adding to the command help description, write below the following line. -->
<!-- ------------\>8---- ----\>8---- ----\>8------------ -->