cleanup: fix command names '_' with '-' (#2878)

* cleanup: fix command names '_' with '-'

* regenerate docs
patryk4815 8 months ago committed by Patryk Sondej
parent e5d9fc2d5c
commit 258a0e16e1

@ -433,7 +433,7 @@ Capstone will expose the most "simplified" one possible, and the underlying list
When encountering an instruction that is behaving strangely (incorrect annotation, or there is a jump target when one shouldn't exist, or the target is incorrect), there are a couple routine things to check.
1. Use the `dev_dump_instruction` command to print all the enhancement information. With no arguments, it will dump the info from the instruction at the current address. If given an address, it will pull from the instruction cache at the corresponding location.
1. Use the `dev-dump-instruction` command to print all the enhancement information. With no arguments, it will dump the info from the instruction at the current address. If given an address, it will pull from the instruction cache at the corresponding location.
If the issue is not related to branches, check the operands and the resolved values for registers and memory accesses. Verify that the values are correct - are the resolved memory locations correct? Step past the instruction and use instructions like `telescope` and `regs` to read memory and verify if the claim that the annotation is making is correct. For things like memory operands, you can try to look around the resolved memory location in memory to see the actual value that the instruction dereferenced, and see if the resolved memory location is simply off by a couple bytes.

@ -21,7 +21,7 @@ For coredump debugging, GDB also lacks all vmmap info but we do our best to get
As a last resort, we sometimes try to explore the addresses in CPU registers and if they are readable by GDB, we determine their bounds and create an "<explored>" vmmap. However, this method is slow and is not used on each GDB stop.
Memory pages can also be added manually with the use of vmmap_add, vmmap_clear and vmmap_load commands. This may be useful for bare metal debugging.
Memory pages can also be added manually with the use of vmmap-add, vmmap-clear and vmmap-load commands. This may be useful for bare metal debugging.
[0] https://lore.kernel.org/all/20220221030910.3203063-1-dominik.b.czarnota@gmail.com/
## Usage:

@ -1,2 +1,2 @@
This benchmark was used to investigate performance problems with the `vis_heap_chunks` command described in https://github.com/pwndbg/pwndbg/issues/1675
This benchmark was used to investigate performance problems with the `vis-heap-chunks` command described in https://github.com/pwndbg/pwndbg/issues/1675

@ -73,7 +73,7 @@ force - pwndbg will always try to use heuristics, even if debug symbols are av
never - pwndbg will never use heuristics to resolve the heap
If the output of the heap related command produces errors with heuristics, you can try manually setting the libc symbol addresses.
For this, see the `heap_config` command output and set the `main_arena`, `mp_`, `global_max_fast`, `tcache` and `thread_arena` addresses.
For this, see the `heap-config` command output and set the `main_arena`, `mp_`, `global_max_fast`, `tcache` and `thread_arena` addresses.
Note: pwndbg will generate more reliable results with proper debug symbols.
Therefore, when debug symbols are missing, you should try to install them first if you haven't already.

@ -133,7 +133,7 @@ def _fetch_via_exploration() -> Dict[int, pwndbg.lib.memory.Page]:
M.warn(
"Warning: All methods to detect STACK have failed.\n"
"You can explore STACK using exploration, but it may be very slow.\n"
"To explicitly explore, use the command: `stack_explore`\n"
"To explicitly explore, use the command: `stack-explore`\n"
"Alternatively, enable it by default with: `set auto-explore-stack yes`"
)
)

@ -96,7 +96,7 @@ def explore(address_maybe: int) -> pwndbg.lib.memory.Page | None:
print(
M.warn(
f"Warning: Avoided exploring possible address {address_maybe:#x}.\n"
f"You can explicitly explore it with `vmmap_explore {page_start:#x}`"
f"You can explicitly explore it with `vmmap-explore {page_start:#x}`"
)
)
return None

@ -130,7 +130,7 @@ def explore_stack_auxv() -> AUXV | None:
M.warn(
"Warning: All methods to detect AUXV have failed.\n"
"You can explore AUXV using stack exploration, but it may be very slow.\n"
"To explicitly explore, use the command: `auxv_explore`\n"
"To explicitly explore, use the command: `auxv-explore`\n"
"Alternatively, enable it by default with: `set auto-explore-auxv yes`\n\n"
"Note: AUXV is probably not necessary for debugging firmware or embedded systems."
)

@ -454,7 +454,7 @@ def _try2run_heap_command(function: Callable[P, T], *a: P.args, **kw: P.kwargs)
)
else:
w(
f"You can try to determine the libc symbols addresses manually and set them appropriately. For this, see the `heap_config` command output and set the config for `{err.symbol}`."
f"You can try to determine the libc symbols addresses manually and set them appropriately. For this, see the `heap-config` command output and set the config for `{err.symbol}`."
)
if pwndbg.config.exception_verbose or pwndbg.config.exception_debugger:
raise err
@ -464,7 +464,7 @@ def _try2run_heap_command(function: Callable[P, T], *a: P.args, **kw: P.kwargs)
e(f"{func_name(function)}: An unknown error occurred when running this command.")
if isinstance(pwndbg.aglib.heap.current, HeuristicHeap):
w(
"Maybe you can try to determine the libc symbols addresses manually, set them appropriately and re-run this command. For this, see the `heap_config` command output and set the `main_arena`, `mp_`, `global_max_fast`, `tcache` and `thread_arena` addresses."
"Maybe you can try to determine the libc symbols addresses manually, set them appropriately and re-run this command. For this, see the `heap-config` command output and set the `main_arena`, `mp_`, `global_max_fast`, `tcache` and `thread_arena` addresses."
)
else:
w("You can try `set resolve-heap-via-heuristic force` and re-run this command.\n")

@ -165,7 +165,7 @@ For coredump debugging, GDB also lacks all vmmap info but we do our best to get
As a last resort, we sometimes try to explore the addresses in CPU registers and if they are readable by GDB, we determine their bounds and create an "<explored>" vmmap. However, this method is slow and is not used on each GDB stop.
Memory pages can also be added manually with the use of vmmap_add, vmmap_clear and vmmap_load commands. This may be useful for bare metal debugging.
Memory pages can also be added manually with the use of vmmap-add, vmmap-clear and vmmap-load commands. This may be useful for bare metal debugging.
[0] https://lore.kernel.org/all/20220221030910.3203063-1-dominik.b.czarnota@gmail.com/""",
)

@ -42,7 +42,7 @@ PWNDBG_TIPS: List[str] = [
"Use the `spray` command to spray memory with cyclic pattern or specified value",
"Use `patch <address> '<assembly>'` to patch an address with given assembly code",
"Want to NOP some instructions? Use `patch <address> 'nop; nop; nop'`",
"`heap_config` shows heap related configuration",
"`heap-config` shows heap related configuration",
"`break-if-taken` and `break-if-not-taken` commands sets breakpoints after a given jump instruction was taken or not",
"`stepuntilasm <assembly-instruction [operands]>` steps program forward until matching instruction occures",
"Use `plist` command to dump elements of linked list",

Loading…
Cancel
Save