[PATCH] D42582: [lldb][PPC64] Fixed step-in stopping in the wrong line

Leandro Lupori via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Feb 26 07:47:04 PST 2018


luporl added inline comments.


================
Comment at: include/lldb/Core/Architecture.h:63
+  //------------------------------------------------------------------
+  virtual void AdjustBreakpointAddress(Symbol *func, Address &addr) const {}
+
----------------
labath wrote:
> It looks like symbol is always going to be non-null here, right? Can we make this a reference? maybe even a const reference?
Right, we can make this a const reference.


================
Comment at: source/Plugins/Architecture/PPC64/ArchitecturePPC64.cpp:57-60
+  // This code handles only ELF files
+  if (target->GetArchitecture().GetTriple().getObjectFormat() !=
+      llvm::Triple::ObjectFormatType::ELF)
+    return 0;
----------------
labath wrote:
> Should we move this check into the `Create` function? I know this plugin is kinda supposed to be OS-agnostic, but if we're going to be checking the object format anyway, we might as well do it early-on. We can revisit that once we have a non-elf customer who wants a ppc64 architecture plugin.
Yes, at least for now it would be better to do this check right at creation time.


https://reviews.llvm.org/D42582





More information about the llvm-commits mailing list