Skip to content
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
8 changes: 8 additions & 0 deletions voltron/plugins/debugger/dbg_gdb.py
Original file line number Diff line number Diff line change
Expand Up @@ -649,6 +649,14 @@ def get_arch(self):
arch = gdb.selected_frame().architecture().name()
except:
arch = re.search('\(currently (.*)\)', gdb.execute('show architecture', to_string=True)).group(1)

# Fix bug:
# Exception getting targets from debugger: KeyError('"i386"')
# gdb: 10.2 python: 3.9.2 kali-linux(WSL2)
quot = ['\'','"']
if len(arch) > 2 and arch[0] in quot and arch[-1] in quot:
arch = arch.split(quot[quot.index(arch[0])])[1]

return self.archs[arch]

def get_addr_size(self):
Expand Down