diff options
author | Dimitry Andric <dim@FreeBSD.org> | 2016-02-13 15:01:33 +0000 |
---|---|---|
committer | Dimitry Andric <dim@FreeBSD.org> | 2016-02-13 15:01:33 +0000 |
commit | 2fc5d2d1dfaf623ce4e24cd8590565902f8c557c (patch) | |
tree | 525149683974afa86747b749d45f0425749e972e /source/Target | |
parent | e195173fdf080138dbb42936dea88c605e4b9a56 (diff) |
Notes
Diffstat (limited to 'source/Target')
-rw-r--r-- | source/Target/Target.cpp | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/source/Target/Target.cpp b/source/Target/Target.cpp index d2aa1bac49f6c..21e42916bae98 100644 --- a/source/Target/Target.cpp +++ b/source/Target/Target.cpp @@ -2442,18 +2442,18 @@ Target::GetBreakableLoadAddress (lldb::addr_t addr) SymbolContext sc; uint32_t resolve_scope = eSymbolContextFunction | eSymbolContextSymbol; temp_addr_module_sp->ResolveSymbolContextForAddress(resolved_addr, resolve_scope, sc); + Address sym_addr; if (sc.function) - { - function_start = sc.function->GetAddressRange().GetBaseAddress().GetLoadAddress(this); - if (function_start == LLDB_INVALID_ADDRESS) - function_start = sc.function->GetAddressRange().GetBaseAddress().GetFileAddress(); - } + sym_addr = sc.function->GetAddressRange().GetBaseAddress(); else if (sc.symbol) - { - Address sym_addr = sc.symbol->GetAddress(); + sym_addr = sc.symbol->GetAddress(); + + function_start = sym_addr.GetLoadAddress(this); + if (function_start == LLDB_INVALID_ADDRESS) function_start = sym_addr.GetFileAddress(); - } - current_offset = addr - function_start; + + if (function_start) + current_offset = addr - function_start; } // If breakpoint address is start of function then we dont have to do anything. |