diff --git a/README.md b/README.md index ddb40655c..14d306f31 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,8 @@ +# BETA SOFTWARE + +This is barely a beta. There are currently no versioned releases, only `master`. I push to master with impunity. There are no tests. If anything works at all, consider yourself lucky. + +Feature contributions and bugfixes are both very welcome :) # pwndbg @@ -12,7 +17,7 @@ Best supported on Ubuntu 14.04 with default `gdb` or `gdb-multiarch` (e.g. with ## Installation 1. Clone the repo: `git clone https://github.com/zachriggle/pwndbg` -2. Add to `~/.gdbinit`: `source ~/pwndbg/gdbinit.py` +2. Add to `~/.gdbinit`: `echo "source $PWD/pwndbg/gdbinit.py" >> ~/.gdbinit` ### Prerequisites @@ -21,8 +26,8 @@ Best supported on Ubuntu 14.04 with default `gdb` or `gdb-multiarch` (e.g. with Currently this is only available via a source build. 1. Clone the repo: `git clone https://github.com/aquynh/capstone` -2. Select the `next` branch: `git checkout -t origin/next` -3. Build and install libcapstone: `sudo make.sh install` +2. Select the `next` branch: `cd capstone && git checkout -t origin/next` +3. Build and install libcapstone: `sudo ./make.sh install` 4. Build and install Python bindings: `cd bindings/python && python setup.py install` #### pycparser diff --git a/pwndbg/stack.py b/pwndbg/stack.py index 57787e185..9a59a0f57 100644 --- a/pwndbg/stack.py +++ b/pwndbg/stack.py @@ -54,17 +54,18 @@ def update(): for its stack. """ curr_thread = gdb.selected_thread() - try: for thread in gdb.selected_inferior().threads(): thread.switch() sp = pwndbg.regs.sp + sp_low = sp & ~(0xfff) + # If we don't already know about this thread, create # a new Page mapping for it. page = stacks.get(thread.ptid, None) if page is None: - start = pwndbg.memory.find_lower_boundary(sp) + start = sp_low stop = find_upper_stack_boundary(sp) page = pwndbg.memory.Page(start, stop-start, 6 if not is_executable() else 7, 0, '[stack]') stacks[thread.ptid] = page @@ -73,8 +74,8 @@ def update(): page.objfile = '[stack]' # If we *DO* already know about this thread, just - # update the lower boundary. - low = pwndbg.memory.find_lower_boundary(page.vaddr) + # update the lower boundary if it got any lower. + low = min(page.vaddr, sp_low) if low != page.vaddr: page.memsz += (page.vaddr - low) page.vaddr = low