Skip to content

Commit

Permalink
Invoking any empty command now repeats the last command. Fix Vector35…
Browse files Browse the repository at this point in the history
  • Loading branch information
xusheng6 committed Jun 19, 2023
1 parent f891dcf commit 7fcdfe8
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
10 changes: 9 additions & 1 deletion core/debuggercontroller.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1440,7 +1440,15 @@ std::string DebuggerController::InvokeBackendCommand(const std::string& cmd)
}

if (m_adapter)
return m_adapter->InvokeBackendCommand(cmd);
{
std::string cmdToSend = cmd;
if (cmdToSend.empty())
cmdToSend = m_lastCommand;
else
m_lastCommand = cmdToSend;

return m_adapter->InvokeBackendCommand(cmdToSend);
}

return "Error: invalid adapter\n";
}
Expand Down
1 change: 1 addition & 0 deletions core/debuggercontroller.h
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,7 @@ namespace BinaryNinjaDebugger {
void ApplyBreakpoints();

std::string m_lastAdapterName;
std::string m_lastCommand;

void DetectLoadedModule();

Expand Down

0 comments on commit 7fcdfe8

Please sign in to comment.