[Lldb-commits] REVIEW: Compile and sign debugserver binary using the Makefiles

Filipe Cabecinhas filcab at gmail.com
Fri Apr 5 12:38:18 PDT 2013

Hi Charles,

On Thu, Apr 4, 2013 at 8:19 PM, Charles Davis <cdavis5x at gmail.com> wrote:

> On Apr 4, 2013, at 3:34 PM, Filipe Cabecinhas wrote:
> Hi all,
> I've changed the Makefiles around to compile the debugserver binary using
> them.
> So did I ;).
> I moved debugserver.cpp and debugserver-entitlements.plist from source/...
> onto driver/...
> I think this is a good idea. Wish I'd thought of that...
I couldn't see any other way to do it with llvm's Makefile build system.

Later on, maybe we can make this a normal LLDB library, and/or split it
> into several different libraries.
There's lots of abstracting to do, there. debugserver.cpp and the whole DNB
layer pretty much scream “Mac OS X only” (Mach stuff + BSD stuff).

The best plan would be to make a new, plugin based, lldb-server (or
something), in the regular LLDB sources, and create a binary like lldb,
with some plugins hard-coded depending on compile-time feature detection.
Greg Clayton has mentioned that in the mailing list, but it will take time.
I suppose people will want to do that when they want to enable lldb remote
debugging on Linux/FreeBSD/whatever, for example.

Since we need to rewrite debugserver, we might as well abstract it and make
it plugin-based. ;-)

> I fixed the references I could find for those two files in the Xcode
> project file (both on the project files and on the entitlements for
> debugserver on iOS).
> I brought in generate-vers.pl from lldb/scripts to create
> debugserver_vers.c for Mac OS X (we could in the future abstract the script
> and keep only one copy, or use the same version numbering as clang and
> lldb-linux).
> IMO, unless we're being built Apple-style (i.e. with the Xcode project),
> we really should use the same versioning scheme as Clang and LLDB on Linux.
> But that's just my opinion.
That could be, but I prefer to have the version numbers done in the same
way. Either we also change lldb's version number stuff (it's also using
generate-vers.pl on Mac OS X + Makefiles), or we keep the script on both.

I don't mind getting rid of the script and just use the same versioning
scheme as on Linux, but that would make different code execute depending on
the build system, which I'm not very fond of seeing.

I also added Makefiles for the subdirectories under debugserver/source, of
> course.
> Apple folks: Could you check out the xcodeproj files and confirm that
> everything is okay with you?
> Linux/FreeBSD/others: Please test it to see what changes may be needed to
> not break the build. I'm thinking about only including debugserver in DIRS
> if uname -s is Darwin.
> That's what I did in mine.
> Hang on, maybe I can see about putting our patches together. Mine has some
> other stuff (e.g. dependency tracking for the MIG source, universal build
> support) that yours doesn't have.
Please send me the patches, then. I will incorporate before committing.
About the dependency tracking: I added the DNBConfig.h dependency, now.



> Chip
> <lldb-makefiles.patch>_______________________________________________
> lldb-commits mailing list
> lldb-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/lldb-commits
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20130405/cc5a6041/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: lldb-makefiles.patch
Type: application/octet-stream
Size: 151352 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20130405/cc5a6041/attachment.obj>

More information about the lldb-commits mailing list