[Lldb-commits] [PATCH] D13334: Preliminary NetBSD support

Pavel Labath via lldb-commits lldb-commits at lists.llvm.org
Thu Oct 1 06:17:32 PDT 2015


labath added inline comments.

================
Comment at: source/Plugins/Platform/NetBSD/PlatformNetBSD.cpp:1
@@ +1,2 @@
+//===-- PlatformNetBSD.cpp -------------------------------------*- C++ -*-===//
+//
----------------
krytarowski wrote:
> labath wrote:
> > This platform code looks like it was copy-pasted from PlatformFreeBSD. Do you anticipate making significant changes here?
> > 
> > If not, it might be a good idea to share this code with FreeBSD in some way (in fact there is a comment here to make this share code with PlatformPOSIX). @emaste, what do you think about this?
> Yes... however I have bad experiences (mostly in Gnome) when we drag common code for rotted platforms like BSD4.4, BSD/OS and such in a single source tree paralyzing sane platform support.
So which one do you expect to rot first ?

Joke aside, I agree that this could be an issue, but I think if we put some thought into the design, we can limit the possible downsides of this approach. The other alternative, where we copy everything is not ideal either: we have had cases in the past, where we made a change in linux code, and then we needed to apply the exact same change in the freebsd version. So there is definitely some tradeoff to consider here...

In any case, I'm not trying to stop your changes because of this, but I think it's good to open this discussion in the early stages of the implementation... I don't know if you're aware but there are plans to move freebsd to the client-server model to follow linux, so if you make copies of the code, you may find out later that you may need to duplicate that work as well.


Repository:
  rL LLVM

http://reviews.llvm.org/D13334





More information about the lldb-commits mailing list