[lldb-dev] Unifying source/Host (Mac/Linux/BSD)
gclayton at apple.com
Tue Sep 7 10:19:52 PDT 2010
that patch sounds great, please feel free to commit it if you have commit access.
Anything that can help LLDB build on more platforms is a must have.
On Sep 4, 2010, at 4:09 PM, Jay L. T. Cornwall wrote:
> A couple of months ago LLDB had skeleton Linux support. The status of
> this port has degraded to unbuildable through flux in program interfaces
> and through changes to unnecessarily duplicated code.
> This affects two main areas: source/Host and source/Plugins/Process.
> To reverse this decline, and to begin extending support to the BSD
> family, I propose a restructuring of source/Host. It currently looks
> like this:
> Large pieces of code in Host.cpp/Host.mm were identical but have drifted
> with development on the Mac side. I propose:
> As much common code as possible is factored into Host.cpp, with Host.mm
> containing Obj C++ and cfcpp code. Preprocessor guards are used to
> insert platform-specific code into largely platform-independent
> functions. Factoring into API-specific directories (like POSIX, 4.4BSD,
> portable, etc.) became unwieldy when I tried it, to no real advantage.
> I have a patch which implements this (~160KB, mostly moving functions
> around, so I didn't attach it but see ) for Mac OS X, Linux and
> FreeBSD. This patch is a prerequisite for other patches that I'm working
> on to restore and improve cross-platform functionality. Together these
> build LLDB with very limited functionality on all platforms.
> Is this patch of interest, or would you be able to suggest a better way
> to begin tackling this problem?
>  http://www.jcornwall.me.uk/temp/lldb-host-unify.patch
> (requires manual SVN removal of dead files/directories if applied)
> Jay L. T. Cornwall
> lldb-dev mailing list
> lldb-dev at cs.uiuc.edu
More information about the lldb-dev