From fa957b152faed302f5c74a14f1177614861dd0a1 Mon Sep 17 00:00:00 2001 From: Zach Riggle Date: Tue, 24 Jan 2017 11:32:58 -0500 Subject: [PATCH] Catch exceptions from disassembly-flavor intel Fixes pwndbg/pwndbg#27 --- pwndbg/__init__.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/pwndbg/__init__.py b/pwndbg/__init__.py index ea3b4b268..f862d9756 100755 --- a/pwndbg/__init__.py +++ b/pwndbg/__init__.py @@ -133,3 +133,11 @@ handle SIGSEGV stop print nopass for line in pre_commands.strip().splitlines(): gdb.execute(line) + +# This may throw an exception, see pwndbg/pwndbg#27 +try: + gdb.execute("set disassembly-flavor intel") +except gdb.error: + pass + +