summaryrefslogtreecommitdiff
path: root/source/Breakpoint/BreakpointResolverName.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'source/Breakpoint/BreakpointResolverName.cpp')
-rw-r--r--source/Breakpoint/BreakpointResolverName.cpp17
1 files changed, 12 insertions, 5 deletions
diff --git a/source/Breakpoint/BreakpointResolverName.cpp b/source/Breakpoint/BreakpointResolverName.cpp
index 468de35db0ee7..ba277ae2655e2 100644
--- a/source/Breakpoint/BreakpointResolverName.cpp
+++ b/source/Breakpoint/BreakpointResolverName.cpp
@@ -16,11 +16,13 @@
#include "Plugins/Language/CPlusPlus/CPlusPlusLanguage.h"
#include "Plugins/Language/ObjC/ObjCLanguage.h"
#include "lldb/Breakpoint/BreakpointLocation.h"
+#include "lldb/Core/Architecture.h"
#include "lldb/Core/Module.h"
#include "lldb/Symbol/Block.h"
#include "lldb/Symbol/Function.h"
#include "lldb/Symbol/Symbol.h"
#include "lldb/Symbol/SymbolContext.h"
+#include "lldb/Target/Target.h"
#include "lldb/Utility/Log.h"
#include "lldb/Utility/StreamString.h"
@@ -239,9 +241,8 @@ void BreakpointResolverName::AddNameLookup(const ConstString &name,
// FIXME: Right now we look at the module level, and call the module's
// "FindFunctions".
// Greg says he will add function tables, maybe at the CompileUnit level to
-// accelerate function
-// lookup. At that point, we should switch the depth to CompileUnit, and look
-// in these tables.
+// accelerate function lookup. At that point, we should switch the depth to
+// CompileUnit, and look in these tables.
Searcher::CallbackReturn
BreakpointResolverName::SearchCallback(SearchFilter &filter,
@@ -299,8 +300,8 @@ BreakpointResolverName::SearchCallback(SearchFilter &filter,
break;
}
- // If the filter specifies a Compilation Unit, remove the ones that don't pass
- // at this point.
+ // If the filter specifies a Compilation Unit, remove the ones that don't
+ // pass at this point.
if (filter_by_cu || filter_by_language) {
uint32_t num_functions = func_list.GetSize();
@@ -365,6 +366,12 @@ BreakpointResolverName::SearchCallback(SearchFilter &filter,
sc.symbol->GetPrologueByteSize();
if (prologue_byte_size)
break_addr.SetOffset(break_addr.GetOffset() + prologue_byte_size);
+ else {
+ const Architecture *arch =
+ m_breakpoint->GetTarget().GetArchitecturePlugin();
+ if (arch)
+ arch->AdjustBreakpointAddress(*sc.symbol, break_addr);
+ }
}
}