better explain nearpc behaviour (#2340)

pull/2347/head
k4lizen 1 year ago committed by GitHub
parent 42869c0be9
commit 88e1eb203e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -19,7 +19,7 @@ usage: nearpc [-h] [-e] [pc] [lines]
|Positional Argument|Help|
| :--- | :--- |
|`pc`|Address to disassemble near.|
|`pc`|Address to disassemble near. If this is the only argument and the value provided is small enough, it is interpreted as lines instead.|
|`lines`|Number of lines to show on either side of the address.|
## Optional Arguments

@ -6,7 +6,13 @@ import pwndbg.gdblib.nearpc
from pwndbg.commands import CommandCategory
parser = argparse.ArgumentParser(description="Disassemble near a specified address.")
parser.add_argument("pc", type=int, nargs="?", default=None, help="Address to disassemble near.")
parser.add_argument(
"pc",
type=int,
nargs="?",
default=None,
help="Address to disassemble near. If this is the only argument and the value provided is small enough, it is interpreted as lines instead.",
)
parser.add_argument(
"lines",
type=int,

Loading…
Cancel
Save