Skip to content

Commit

Permalink
vmmap: dont get on new_objfile
Browse files Browse the repository at this point in the history
  • Loading branch information
disconnect3d committed Aug 21, 2021
1 parent cc84a15 commit 8faa634
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
3 changes: 3 additions & 0 deletions pwndbg/stack.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,9 @@ def find_upper_stack_boundary(addr, max_pages=1024):
if not pwndbg.abi.linux:
return addr + pwndbg.memory.PAGE_SIZE

# We don't want to find ELF magic here. We reuse the find_elf_magic func
# as it traverses 4kB pages and can find the boundary for us
# (in other words, we expect the ELF magic to not be present on the stack)
return pwndbg.elf.find_elf_magic(addr, max_pages=max_pages, ret_addr_anyway=True)


Expand Down
1 change: 0 additions & 1 deletion pwndbg/vmmap.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@
# List of custom pages that can be managed manually by vmmap_* commands family
custom_pages = []

@pwndbg.events.new_objfile
@pwndbg.memoize.reset_on_stop
def get():
if not pwndbg.proc.alive:
Expand Down

0 comments on commit 8faa634

Please sign in to comment.