[Lldb-commits] [PATCH] D63181: [Target] Decouple ObjCLanguageRuntime from LanguageRuntime

Alex Langford via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Tue Jun 11 20:41:52 PDT 2019


xiaobai created this revision.
xiaobai added reviewers: labath, JDevlieghere, davide, compnerd.

ObjCLanguageRuntime was being pulled into LanguageRuntime because of
Breakpoint Preconditions. I tried a few ideas, but I felt like this was the last
invasive.

Other ideas I had and reasons I rejected them:

- Make "LanguageRuntime::CreateExceptionBreakpoint" a virtual method and having each language runtime implement them. I didn't do this because LanguageRuntime::CreateExceptionBreakpoint would look extremely similar (if not the same) in each of the LanguageRuntime derived classes. It makes sense to me to keep it as-is, and try to change just the BreakpointPrecondition parts.

- Add a callback to return a BreakpointPreconditionSP instead of having the callback add one to the breakpoint. I didn't do this because that would mean that the typedef for the callback (lldb-private-interfaces.h) would have to have visibility into the Breakpoint class to see BreakpointPrecondition. Either that, or we would move BreakpointPrecondition out of Breakpoint, and I'm not entirely sure that makes sense to do.

If you have another idea or think one of the ideas I rejected is actually better
than this solution, please let me know.


https://reviews.llvm.org/D63181

Files:
  include/lldb/Core/PluginManager.h
  include/lldb/Target/LanguageRuntime.h
  include/lldb/Target/ObjCLanguageRuntime.h
  include/lldb/lldb-private-interfaces.h
  source/Core/PluginManager.cpp
  source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV1.cpp
  source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp
  source/Target/LanguageRuntime.cpp
  source/Target/ObjCLanguageRuntime.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D63181.204212.patch
Type: text/x-patch
Size: 9493 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20190612/a9803159/attachment-0001.bin>


More information about the lldb-commits mailing list