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

remove deprecated notice #176

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions peda.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,22 +108,22 @@ def execute_redirect(self, gdb_command, silent=False):
else:
logfd = tmpfile()
logname = logfd.name
gdb.execute('set logging off') # prevent nested call
gdb.execute('set logging enabled off') # prevent nested call
gdb.execute('set height 0') # disable paging
gdb.execute('set logging file %s' % logname)
gdb.execute('set logging overwrite on')
gdb.execute('set logging redirect on')
gdb.execute('set logging on')
gdb.execute('set logging enabled on')
try:
gdb.execute(gdb_command)
gdb.flush()
gdb.execute('set logging off')
gdb.execute('set logging enabled off')
if not silent:
logfd.flush()
result = logfd.read()
logfd.close()
except Exception as e:
gdb.execute('set logging off') #to be sure
gdb.execute('set logging enabled off') #to be sure
if config.Option.get("debug") == "on":
msg('Exception (%s): %s' % (gdb_command, e), "red")
traceback.print_exc()
Expand Down Expand Up @@ -6112,7 +6112,7 @@ def complete(self, text, word):
# handle SIGINT / Ctrl-C
def sigint_handler(signal, frame):
warning_msg("Got Ctrl+C / SIGINT!")
gdb.execute("set logging off")
gdb.execute("set logging enabled off")
peda.restore_user_command("all")
raise KeyboardInterrupt
signal.signal(signal.SIGINT, sigint_handler)
Expand Down