Skip to content

Commit

Permalink
docs: readme
Browse files Browse the repository at this point in the history
  • Loading branch information
ndrewh committed Jul 9, 2024
1 parent 2e7fd52 commit 8017878
Showing 1 changed file with 21 additions and 4 deletions.
25 changes: 21 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -165,11 +165,28 @@ p.syscall_post(1, lambda p, syscall_num: print(f"write called with {p.regs.rdx}

### FAQ

**Why should I use this over { GDB, Frida, Pwndbg }?**
**Why should I use this over GDB or other ptrace-based debuggers?**

If you like
scripting in these tools and are happy with their performance, then
you probably don't need this tool.
GDB breakpoints incur substantial overhead due to signal handling in the kernel and in
the tracer process. This introduces an insurmountable
performance challenge for high-frequency breakpoints.
For multithreaded programs, this problem is compounded by
["group-stop"](https://man7.org/linux/man-pages/man2/ptrace.2.html), which will
stop *all* threads when *any* thread receives a stop signal.

Unlike GDB, Pyda hooks are executed directly in the target process itself (without the overhead of signals
or a kernel context switch). As a result, Pyda hooks typically run faster.

**Why should I use this over Frida or other dynamic instrumentation tools?**

These tools are quite similar to Pyda, with mostly ergonomic differences: Pyda tools
are written in Python using a relatively minimal set of [APIs](#api). Pyda relies on the existing Python ecosystem for many features (e.g. ELF parsing).
As a result, Pyda tools are typically shorter and easier to write than equivalent Frida scripts.

However, Pyda is **not** (currently) an adequate replacement for full-fledged dynamic instrumentation
frameworks. We do not provide a fine-grained instrumentation API (e.g.
you cannot insert specific instructions), relying instead on hooks
as the primary unit of instrumentation.

**Can I use `LD_LIBRARY_PATH` on the target?**

Expand Down

0 comments on commit 8017878

Please sign in to comment.