Skip to content

Commit

Permalink
"cd" instad of "set cwd" for MSYS2 compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
rohanrhu committed Apr 16, 2022
1 parent 022dd9a commit 82e437b
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions api/debug.py
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ def load(file):
gdb.execute("file \"%s\"" % file)

if settings.SET_CWD_TO_EXECUTABLE:
gdb.execute("set cwd %s" % os.path.dirname(file))
gdb.execute("cd %s" % os.path.dirname(file))

return True
except Exception as e:
Expand Down Expand Up @@ -1372,7 +1372,11 @@ def serializable(self):

@threadSafe(no_interrupt=True)
def getRegisters():
selected_thread = gdb.selected_thread()
try:
selected_thread = gdb.selected_thread()
except Exception as e:
util.verbose(e, traceback.format_exc())
return {}

if (not selected_thread) or gdb.selected_thread().is_running():
return {}
Expand Down

0 comments on commit 82e437b

Please sign in to comment.