Commit Graph

107 Commits

Author SHA1 Message Date
Deepak Panickal e3eadf0f3b Update makefiles to build PlatformWindows
llvm-svn: 192702
2013-10-15 13:52:20 +00:00
Daniel Malea e0f8f574c7 merge lldb-platform-work branch (and assorted fixes) into trunk
Summary:
    This merge brings in the improved 'platform' command that knows how to
    interface with remote machines; that is, query OS/kernel information, push
    and pull files, run shell commands, etc... and implementation for the new
    communication packets that back that interface, at least on Darwin based
    operating systems via the POSIXPlatform class. Linux support is coming soon.

    Verified the test suite runs cleanly on Linux (x86_64), build OK on Mac OS
    X Mountain Lion.

    Additional improvements (not in the source SVN branch 'lldb-platform-work'):
    - cmake build scripts for lldb-platform
    - cleanup test suite
    - documentation stub for qPlatform_RunCommand
    - use log class instead of printf() directly
    - reverted work-in-progress-looking changes from test/types/TestAbstract.py that work towards running the test suite remotely.
    - add new logging category 'platform'

    Reviewers: Matt Kopec, Greg Clayton

    Review: http://llvm-reviews.chandlerc.com/D1493

llvm-svn: 189295
2013-08-26 23:57:52 +00:00
Virgile Bello b2f1fb2943 MingW compilation (windows). Includes various refactoring to improve portability.
llvm-svn: 189107
2013-08-23 12:44:05 +00:00
Ashok Thirumurthi 4f01ff8bfe Re-introduces ELF core file support for Linux x86-64
Usage: 'lldb a.out -c core'.
  TODO: FreeBSD support.
  TODO: Support for AVX registers.
  TODO: Refactor so that RegisterContextCore* don't inherit from classes that use ProcessMonitor
  to fix the build on OS/X.

llvm-svn: 186516
2013-07-17 16:06:12 +00:00
Greg Clayton 3deb0e7ca5 Revert the ELF core file support until a few things can be worked out:
RegisterContextCoreLinux_x86_64 inherits from RegisterContextLinux_x86_64 which inherits from RegisterContext_x86_64 which uses has:

   ProcessMonitor &GetMonitor();

This register context used by the core file can't use this since the process plug-in will be ProcessElfCore and the implementation of GetMonitor() does:

ProcessMonitor &
RegisterContext_x86_64::GetMonitor()
{
   ProcessSP base = CalculateProcess();
   ProcessPOSIX *process = static_cast<ProcessPOSIX*>(base.get());
   return process->GetMonitor();
}

ProcessELFCore doesn't, nor should it inherit from ProcessPOSIX and any call to GetMonitor() will fail for ELF core files.

Suggested cleanups:
- Make a register context class that is a base class that doesn't have any reading smarts, then make one that uses ProcessPOSIX and the has the GetMonitor() call, and one that gets its data straight from the core file. 

llvm-svn: 186223
2013-07-12 22:52:22 +00:00
Ashok Thirumurthi c037383aff Introduces core file support for Linux x86-64 using 'lldb a.out -c core'.
TODO: Support for RegisterContext_x86_64::ReadFPR.

Patch by Samuel Jacob!

llvm-svn: 186207
2013-07-12 21:25:02 +00:00
Michael Sartain a7499c9830 Split symbol support for ELF and Linux.
llvm-svn: 185366
2013-07-01 19:45:50 +00:00
Sylvestre Ledru 594058394e Following the modification introduced in llvm by commit 185311
The build system is currently miss-identifying GNU/kFreeBSD as FreeBSD.
This kind of simplification is sometimes useful, but in general it's not correct. 

As GNU/kFreeBSD is an hybrid system, for kernel-related issues we want to match the
build definitions used for FreeBSD, whereas for userland-related issues we want to
match the definitions used for other systems with Glibc.

The current modification adjusts the build system so that they can be distinguished,
and explicitly adds GNU/kFreeBSD to the build checks in which it belongs.

Fixes bug #16446.

Patch by Robert Millan in the context of Debian.

llvm-svn: 185313
2013-07-01 08:21:36 +00:00
Rafael Espindola 7a35f4b1e3 Fix autohell build.
llvm-svn: 184018
2013-06-14 23:00:27 +00:00
Greg Clayton 9826c3f33d Allow LLDB to be built on a system with an installed gcc/g++ that isn't the default. I recently installed gcc-4.7/g++-4.7 on Ubuntu and tried to build by specifying:
CC=gcc-4.7 CXX=g++-4.7

as configure and make args, but it didn't work when being run with makefiles. This patch fixes that.

llvm-svn: 182158
2013-05-17 20:56:55 +00:00
Sylvestre Ledru 02240c5c02 Under GNU/Linux, do not build lldbPluginDynamicLoaderDarwinKernel.a. It was breaking the build
llvm-svn: 181695
2013-05-13 10:18:51 +00:00
Sylvestre Ledru 5b5a6e0162 Fixed the build to reflect the removal of OperatingSystem/Darwin-Kernel in r180993.
llvm-svn: 181024
2013-05-03 15:28:03 +00:00
Daniel Malea da0a326702 Fix makefile build by linking needed library 'irreader'
llvm-svn: 178251
2013-03-28 17:08:09 +00:00
Filipe Cabecinhas 8bc6534701 Continuing the fix for the r173732 fix. Now lldb gets built with Makefiles (Darwin).
llvm-svn: 173864
2013-01-30 00:28:58 +00:00
Sylvestre Ledru 7f6a520b2c Under GNU/Linux & HURD, add a soname to the liblldb shared library.
llvm-svn: 172728
2013-01-17 16:59:32 +00:00
Daniel Malea 48b917bceb Enable RTTI for liblldbCore.a when GCC is the compiler
- gcc does not like -fno-rtti mixed with dynamic_cast<> (in cxa_demangle.cpp)

llvm-svn: 169767
2012-12-10 21:05:57 +00:00
Filipe Cabecinhas 6fd25ac3e2 Use libxml2 on Mac OS X.
llvm-svn: 167179
2012-10-31 23:02:00 +00:00
Jason Molenda 31a6961c13 Patch submitted by Dan Malea -- I introduced a dependency between
ProcessGDBRemote and DynamicLoaderDarwinKernel and a patch was needed
to get this building on Linux.  Thanks!

llvm-svn: 165193
2012-10-04 02:16:06 +00:00
Filipe Cabecinhas df461db533 Patch by Matt, to get lldb to build with the updated llvm+clang versions (via Makefiles).
llvm-svn: 164703
2012-09-26 16:27:06 +00:00
Filipe Cabecinhas c44306f7f3 Fixes by Daniel Malea.
llvm-svn: 162756
2012-08-28 13:59:38 +00:00
Filipe Cabecinhas fefeba65f0 Continue the work started by Dragos' Makefile patch (LLVMLibsOptions usage)
Also replace hard-coded paths with a variable.
Fixed a comment.
Included missing dependencies on Mac OS X (lldbPluginDynamicLoaderPOSIX.a
is a common dependency).
We can't use EXPORTED_SYMBOL_FILE on Darwin right now, don't pass it to
the linker just yet.

llvm-svn: 157618
2012-05-29 13:41:50 +00:00
Bill Wendling de59fb02b9 Add Security framework to the list of frameworks needed for linking.
llvm-svn: 154085
2012-04-05 06:20:13 +00:00
Benjamin Kramer e6afc77a1b Makefile build: clang now depends on libclangEdit.
llvm-svn: 152710
2012-03-14 11:03:46 +00:00
Greg Clayton 352c2e07fd Fix the linux build now that we link against the Linux and FreeBSD platforms.
llvm-svn: 151642
2012-02-28 18:25:00 +00:00
Johnny Chen 45178a264d Makefiles for new mach-core directory.
Patch from dawn@burble.org!

llvm-svn: 151375
2012-02-24 18:02:59 +00:00
Johnny Chen 30213ffc28 This patch combines common code from Linux and FreeBSD into
a new POSIX platform.  It also contains fixes for 64bit FreeBSD.

The patch is based on changes by Mark Peek <mp@FreeBSD.org> and
"K. Macy" <kmacy@freebsd.org> in their github repo located at
https://github.com/fbsd/lldb.

llvm-svn: 147609
2012-01-05 19:17:38 +00:00
Peter Collingbourne dd3e9ccd04 libEnhancedDisassembly.a is gone from recent LLVM.
llvm-svn: 146148
2011-12-08 10:43:04 +00:00
Daniel Dunbar 8d365a1749 build: liblldb now depends on the linker library
llvm-svn: 143466
2011-11-01 17:32:01 +00:00
Daniel Dunbar 3257a7714d build: Build in the Darwin-Kernel OperatingSystem plugin.
llvm-svn: 143389
2011-10-31 22:51:11 +00:00
Daniel Dunbar f9031c4ff5 build: Fix Makefiles on Darwin to link proper dynamic loader plugin.
llvm-svn: 143388
2011-10-31 22:51:08 +00:00
Daniel Dunbar d56f63f06c build: Fix Darwin linker flags which weren't properly passed (and aren't valid).
llvm-svn: 143377
2011-10-31 22:50:30 +00:00
Daniel Dunbar e6fb049d3d build: Fixup Darwin process plugin build for Makefiles.
llvm-svn: 143376
2011-10-31 22:50:27 +00:00
Greg Clayton f324a89c25 Patch from Dragos Tatulea to re-enable the PECOFF object file parser for all
builds on all systems.

llvm-svn: 141677
2011-10-11 16:42:21 +00:00
Johnny Chen 6d1010cb5c Patch by Filipe to build lldb usng 'make'!
llvm-svn: 138403
2011-08-23 22:36:23 +00:00
Johnny Chen 8f3d8384be Patch by David Forsythe to build lldb on FreeBSD!
I did not take the patch for ClangExpressionParser.cpp since there was a
recent change by Peter for the same line.  Feel free to disagree. :-)

Reference:
----------------------------------------------------------------------
r136580 | pcc | 2011-07-30 15:42:24 -0700 (Sat, 30 Jul 2011) | 3 lines

Add reloc arg to standard JIT createJIT()

Fixes non-__APPLE__ build.  Patch by Matt Johnson!
----------------------------------------------------------------------

Also, I ignore the part of the patch to remove the RegisterContextDarwin*.h/.cpp.

llvm-svn: 136720
2011-08-02 20:52:42 +00:00
Charles Davis 1a4f5123dd Link in the MCJIT. Fixes makefile build.
llvm-svn: 131949
2011-05-24 01:54:03 +00:00
Charles Davis 48abe3ee0c Add the LanguageRuntime plugins to liblldb. Fixes link errors for me; if this
breaks it for you (or if the LanguageRuntime plugins break the build on your
machine), please let me know and I'll revert.

Also, link to CoreServices and Carbon on Mac. Yep, LLDB needs these ancient
frameworks.

llvm-svn: 131707
2011-05-19 23:53:23 +00:00
Johnny Chen c569c1651d python-config in Makefiles
Replace python static settings of compiler flags with invocation of
python-config.

Signed-off-by: Johnny Chen <johnny.chen@apple.com>
llvm-svn: 131697
2011-05-19 23:09:48 +00:00
Peter Collingbourne 1b27dac253 Build and initialise the Darwin ABI plugins on all platforms
llvm-svn: 131661
2011-05-19 18:32:34 +00:00
Peter Collingbourne 34ed48001d Link to LLVM instrumentation lib
llvm-svn: 131651
2011-05-19 17:35:01 +00:00
Peter Collingbourne 5e494f4fe9 Add UnwindAssembly plugins to makefile build
llvm-svn: 131650
2011-05-19 17:34:58 +00:00
Stephen Wilson d5adc9185c Add makefile support for the ARM instruction emulation plugin.
llvm-svn: 129119
2011-04-08 02:01:35 +00:00
Stephen Wilson 63f37bba1a Add PlatformGDBServer and ProcessGDBRemote to the build system.
llvm-svn: 128312
2011-03-26 00:32:59 +00:00
Stephen Wilson 3e2a18f61e linux: add Host/linux subdirectory
Start putting linux specific host code in its own directory.  For now, just
implement Host::GetOSVersion.

llvm-svn: 128133
2011-03-23 01:58:26 +00:00
Stephen Wilson 1636265248 Add Makefile support for the Platform plugins.
This patch supports building the Linux platform plugin, and should also support
the MacOSX plugin as well (the MacOSX side has not been tested, unfortunately).
A small typo was corrected in lldb.cpp to initialize the new platform code on
Linux.

llvm-svn: 127393
2011-03-10 03:08:28 +00:00
Stephen Wilson 8f0daa28d4 Add Makefile support for the new DynamicLoaderStatic plugin.
llvm-svn: 127215
2011-03-08 03:57:00 +00:00
Greg Clayton 8a9ef34039 Python override patch from Jai Menon.
llvm-svn: 124929
2011-02-05 02:32:19 +00:00
Stephen Wilson f3e78a3040 Simple makefile fixups.
With the current target revision of Clang libclangChecker no longer exists and
is not needed.  Update the include path so we can get at ARM_DWARF_Registers.h
and friends.

llvm-svn: 124240
2011-01-25 23:03:42 +00:00
Stephen Wilson 2103e25e19 Initial support for a DynamicLoader plugin on Linux.
This patch is enough to have shared objects recognized by LLDB.  We can handle
position independent executables.  We can handle dynamically loaded modules
brought in via dlopen.

The DYLDRendezvous class provides an interface to a structure present in the
address space of ELF-based processes.  This structure provides the address of a
function which is called by the linker each time a shared object is loaded and
unloaded (thus a breakpoint at that address will let LLDB intercept such
events), a list of entries describing the currently loaded shared objects, plus
a few other things.

On Linux, processes are brought up with an auxiliary vector on the stack.  One
element in this vector contains the (possibly dynamic) entry address of the
process.  One does not need to walk the stack to find this information as it is
also available under /proc/<pid>/auxv.  The new AuxVector class provides a
convenient read-only view of this auxiliary vector information.  We use the
dynamic entry address and the address as specified in the object file to compute
the actual load address of the inferior image.  This strategy works for both
normal executables and PIE's.

llvm-svn: 123592
2011-01-16 19:45:39 +00:00
Stephen Wilson 842a9bac48 Makefile updates.
Update lib/Makefile to use current LLVM and Clang components and add the
PluginUtility library to the build.

llvm-svn: 122975
2011-01-06 22:11:47 +00:00
Greg Clayton 2bddd3442f Patch from Jay Cornwall that modifies the LLDB "Host" layer to reuse more
code between linux, darwin and BSD.

llvm-svn: 113263
2010-09-07 20:11:56 +00:00
Stephen Wilson f921790e6e Missed an aspect of the previous makefile patch.
Thanks again to William Lynch!

llvm-svn: 109328
2010-07-24 05:18:16 +00:00
Stephen Wilson 4ec3fb9353 Fix makefiles to build properly on Darwin.
Patch by William Lynch!

llvm-svn: 109327
2010-07-24 04:10:59 +00:00
Stephen Wilson e6f9f66b39 Add a new Process plugin for Linux.
This component is still at an early stage, but allows for simple
breakpoint/step-over operations and basic process control.

The makefiles are set up to build the plugin under Linux only.

llvm-svn: 109318
2010-07-24 02:19:04 +00:00
Greg Clayton c8e11e17aa Patch from Jean-Daniel Dupas:
Makefile patch to explicitly use PROJ_SRC_DIR when required. It fixes 
        build when obj dir is not source dir. 

I also fixed a build warning in ClangResultSynthesizer.cpp.

llvm-svn: 108210
2010-07-12 23:14:00 +00:00
Eli Friedman 098039e4f0 Make current Makefiles work on Linux (at least, they work for me). Please
tell me if this breaks anything.

llvm-svn: 108025
2010-07-09 22:11:43 +00:00
Greg Clayton c982c768d2 Merged Eli Friedman's linux build changes where he added Makefile files that
enabled LLVM make style building and made this compile LLDB on Mac OS X. We
can now iterate on this to make the build work on both linux and macosx.

llvm-svn: 108009
2010-07-09 20:39:50 +00:00