Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix the up and down commands when provided with an argument. #473

Merged
merged 1 commit into from May 27, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
16 changes: 8 additions & 8 deletions pwndbg/commands/ida.py
Expand Up @@ -43,10 +43,10 @@ def up(n=1):
"""
f = gdb.selected_frame()

for i in range(n):
o = f.older()
if o:
o.select()
for i in range(int(n)):
if f.older():
f = f.older()
f.select()

bt = pwndbg.commands.context.context_backtrace(with_banner=False)
print('\n'.join(bt))
Expand All @@ -63,10 +63,10 @@ def down(n=1):
"""
f = gdb.selected_frame()

for i in range(n):
o = f.newer()
if o:
o.select()
for i in range(int(n)):
if f.newer():
f = f.newer()
f.select()

bt = pwndbg.commands.context.context_backtrace(with_banner=False)
print('\n'.join(bt))
Expand Down