6f83d29b5860c9483d3bc13847090ba468d7bb86 — Karl Schultheisz 2 years ago ca98e9c
README.md: give credit where due
1 files changed, 30 insertions(+), 0 deletions(-)

M README.md => README.md +30 -0
@@ 26,3 26,33 @@ Output:


## Status

This program is a prototype and guaranteed to do something different in
the future.

## Subtleties

Your Linux system likely supports address space layout randomization
(ASLR). It breaks uc by mapping functions to different addresses in
each process invocation. There are a few ways around this:

0. Build the target with static linking
1. Turn it off: `echo 0 >/proc/sys/kernel/randomize_va_space` (haven't tried it)
2. Subtract the base address, as found in /proc/\<child\>/maps

The first two are most accessible. uc does not subtract base addresses.

## Resources

Evan Klitzke, the libunwind team, and Marek Majkowski provided helpful
information. Thanks to Daniel Thompson for an adaptable starting point,
on which uc is based.

- [Using Ptrace For Fun And Profit](https://eklitzke.org/ptrace)
- [libunwind -- a (mostly) platform-independent unwind API](https://www.nongnu.org/libunwind/man/libunwind(3).html)
- [Linux process states](https://idea.popcount.org/2012-12-11-linux-process-states/)
- [libunwind-examples/unwind-pid.c](https://github.com/daniel-thompson/libunwind-examples/blob/master/unwind-pid.c)