[Lldb-commits] [lldb] r360105 - [Breakpoint] Remove unused dependency

Jim Ingham via lldb-commits lldb-commits at lists.llvm.org
Mon May 6 18:28:49 PDT 2019


Shouldn't be hard to do.  The problem this is trying to solve is that ObjC has the notion of categories which organize methods of a class in to sub-buckets.  When you call a method you generally don't specify the category name, even though the actual method name contains the category.  So from a user's standpoint the name without the category is the "real" one.  Moreover, you can add categories at runtime, the latest added wins so there might be more than one...  So lldb has to find all the candidate category decorated names and break on all of them to match the user's expectations.

So we would need a method on Language like "FindCandidateNamesForUndecoratedName" - that's a horrible name but you get the drift.  All the other languages would return the name they were given, and the ObjCLanguage would do what BreakpointResolverName::AddNameLookup does.

Jim



> On May 6, 2019, at 6:03 PM, Alex Langford via lldb-commits <lldb-commits at lists.llvm.org> wrote:
> 
> Author: xiaobai
> Date: Mon May  6 18:03:40 2019
> New Revision: 360105
> 
> URL: http://llvm.org/viewvc/llvm-project?rev=360105&view=rev
> Log:
> [Breakpoint] Remove unused dependency
> 
> The CPlusPlus Language plugin is unused in lldbBreakpoint. We should just remove
> it.
> 
> A great follow up to this change would be to remove the dependency on the ObjC
> language plugin, but that is actually used and requires some refactoring.
> 
> Modified:
>    lldb/trunk/source/Breakpoint/BreakpointResolverName.cpp
>    lldb/trunk/source/Breakpoint/CMakeLists.txt
> 
> Modified: lldb/trunk/source/Breakpoint/BreakpointResolverName.cpp
> URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Breakpoint/BreakpointResolverName.cpp?rev=360105&r1=360104&r2=360105&view=diff
> ==============================================================================
> --- lldb/trunk/source/Breakpoint/BreakpointResolverName.cpp (original)
> +++ lldb/trunk/source/Breakpoint/BreakpointResolverName.cpp Mon May  6 18:03:40 2019
> @@ -8,7 +8,6 @@
> 
> #include "lldb/Breakpoint/BreakpointResolverName.h"
> 
> -#include "Plugins/Language/CPlusPlus/CPlusPlusLanguage.h"
> #include "Plugins/Language/ObjC/ObjCLanguage.h"
> #include "lldb/Breakpoint/BreakpointLocation.h"
> #include "lldb/Core/Architecture.h"
> 
> Modified: lldb/trunk/source/Breakpoint/CMakeLists.txt
> URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Breakpoint/CMakeLists.txt?rev=360105&r1=360104&r2=360105&view=diff
> ==============================================================================
> --- lldb/trunk/source/Breakpoint/CMakeLists.txt (original)
> +++ lldb/trunk/source/Breakpoint/CMakeLists.txt Mon May  6 18:03:40 2019
> @@ -30,7 +30,6 @@ add_lldb_library(lldbBreakpoint
>     lldbSymbol
>     lldbTarget
>     lldbUtility
> -    lldbPluginCPlusPlusLanguage
>     lldbPluginObjCLanguage
> 
>   LINK_COMPONENTS
> 
> 
> _______________________________________________
> lldb-commits mailing list
> lldb-commits at lists.llvm.org
> https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits



More information about the lldb-commits mailing list