Skip to content

Commit

Permalink
Revert LLDB changes and change back to use absolute address in "b -s …
Browse files Browse the repository at this point in the history
…-a" command. Fix Vector35#499
  • Loading branch information
xusheng6 committed Jan 8, 2024
1 parent 538df7a commit 1e5bcfc
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 1 deletion.
3 changes: 2 additions & 1 deletion core/adapters/lldbadapter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -600,7 +600,8 @@ DebugBreakpoint LldbAdapter::AddBreakpoint(const ModuleNameAndOffset& address, u
}
else
{
std::string entryBreakpointCommand = fmt::format("b -s \"{}\" -a 0x{:x}", address.module, address.offset);
uint64_t addr = address.offset + m_originalBase;
std::string entryBreakpointCommand = fmt::format("b -s \"{}\" -a 0x{:x}", address.module, addr);
auto ret = InvokeBackendCommand(entryBreakpointCommand);
DebuggerEvent evt;
evt.type = BackendMessageEventType;
Expand Down
1 change: 1 addition & 0 deletions core/debugadapter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ DebugAdapter::DebugAdapter(BinaryView* data)
// Here we check if there is actually a function at the entry point, to determine if the entry point is real.
m_hasEntryFunction = (data->GetAnalysisEntryPoint() != nullptr);
m_start = data->GetStart();
m_originalBase = data->GetOriginalBase();
if (data->GetDefaultArchitecture())
m_defaultArchitecture = data->GetDefaultArchitecture()->GetName();

Expand Down
1 change: 1 addition & 0 deletions core/debugadapter.h
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,7 @@ namespace BinaryNinjaDebugger {
uint64_t m_entryPoint;
bool m_hasEntryFunction;
uint64_t m_start;
uint64_t m_originalBase;
std::string m_defaultArchitecture;
std::string m_originalFileName;

Expand Down

0 comments on commit 1e5bcfc

Please sign in to comment.