Commit Graph

83 Commits

Author SHA1 Message Date
Justin Hibbits db39cdfbb7 Fix some bugs from D5988
Summary:
Ed Maste found some problems with the commit in D5988.  Address most of these.
While here, also add floating point return handling.  This doesn't handle
128-bit long double yet.  Since I don't have any system that uses it, I don't
currently have plans to implement it.

Reviewers: emaste

Reviewed By: emaste

Subscribers: emaste, lldb-commits

Differential Revision: http://reviews.llvm.org/D6049

llvm-svn: 220963
2014-10-31 15:57:52 +00:00
Justin Hibbits 6256a0ea8f First cut of PowerPC(64) support in LLDB.
Summary:
This adds preliminary support for PowerPC/PowerPC64, for FreeBSD.  There are
some issues still:

 * Breakpoints don't work well on powerpc64.
 * Shared libraries don't yet get loaded for a 32-bit process on powerpc64 host.
 * Backtraces don't work.  This is due to PowerPC ABI using a backchain pointer
   in memory, instead of a dedicated frame pointer register for the backchain.
 * Breakpoints on functions without debug info may not work correctly for 32-bit
   powerpc.

Reviewers: emaste, tfiala, jingham, clayborg

Reviewed By: clayborg

Subscribers: emaste, lldb-commits

Differential Revision: http://reviews.llvm.org/D5988

llvm-svn: 220944
2014-10-31 02:34:28 +00:00
Eric Christopher e709821359 Fix the build after the recent plugin additions for
AddressSanitizer by adding dependencies and definitions.

llvm-svn: 219554
2014-10-11 00:38:55 +00:00
Saleem Abdulrasool 73cdaed9a8 build: attempt to fix the buildbots
Linking Release+Asserts executable lldb-gdbserver (without symbols)
liblldb.so: undefined reference to `lldb_private::MemoryHistoryASan::Initialize()'
liblldb.so: undefined reference to `lldb_private::MemoryHistoryASan::Terminate()'
liblldb.so: undefined reference to `vtable for lldb_private::TypeValidatorImpl_CXX'
liblldb.so: undefined reference to `lldb_private::TypeValidatorImpl::TypeValidatorImpl(lldb_private::TypeValidatorImpl::Flags const&)'

liblldb.so underlinked to lldbPluginMemoryHistoryASan.a when building with the
make based build system (as opposed to CMake).

llvm-svn: 217360
2014-09-08 04:53:03 +00:00
Eric Christopher d650b82b22 The original jit no longer exists in llvm, remove from dependencies.
PR20864

llvm-svn: 217301
2014-09-06 02:03:06 +00:00
Zachary Turner 76eddae8dd Still trying to fix the Make build. Link lldbHostPosix to liblldb
llvm-svn: 215788
2014-08-15 23:27:37 +00:00
Zachary Turner d867520d0b Revert "Fix the build broken as a result of deleting jit from LLVM."
jit was re-added back to LLVM, so now we require to link against it
again.  Should it get removed again, then revert this revert.

llvm-svn: 215170
2014-08-07 23:26:01 +00:00
Zachary Turner c349434010 Fix the build broken as a result of deleting jit from LLVM.
llvm-svn: 215119
2014-08-07 16:50:45 +00:00
Deepak Panickal 5780657be8 Update CMakeLists.txt and Makefiles for building/linking the Hexagon ABI and Dynamic Loader
llvm-svn: 213568
2014-07-21 17:24:05 +00:00
Zachary Turner 0152e73a73 Fix build broken as a result of r213171.
r213171 renames the 'clangRewriteCore' library to 'clangRewrite'.
This change simply updates the makefiles to reference the correct
library name.

llvm-svn: 213181
2014-07-16 18:53:18 +00:00
Todd Fiala cfee963282 Add kalimba as a platform.
This change comprises of additions and some minor changes in order that
"kalimba" is listed as a supported platform and that debugging any
kalimbas results in PlatformKalimba being associated with the target.

The changes are as follows:

* The PlatformKalimba implementation itself
* A tweak to ArchSpec
* .note parsing for Kalimba in ObjectFileELF.cpp
* Plugin registration
* Makefile additions

Change by Matthew Gardiner

Minor tweak for cmake and Xcode by Todd Fiala

Tested:
Ubuntu 14.04 x86_64, clang 3.5-built lldb, all tests pass.
MacOSX 10.9.4, Xcode 6.0 Beta 1-built lldb, all tests pass.

llvm-svn: 213158
2014-07-16 15:03:10 +00:00
Greg Clayton 48672afb66 Patch from Keno Fischer to enable JITLoaderGDB with mach-o file support.
The patch is as is with the functionality left disabled for apple vendors because of performance regressions. If this is enabled it ends up searching for symbols in all shared libraries that are loadeded.

llvm-svn: 211638
2014-06-24 22:22:43 +00:00
Dmitri Gribenko e601d78f94 Attempt to fix the build
It looks like on 18th April clang added dependency from clangCodeGen.a to
LLVMProfileData.a and since then lldb have problem with linking to
clangCodeGen.a due to missing symbols.

This adds LLVMProfileData.a to USEDLIBS to fix that problem.

Patch by Robert Matusewicz.

llvm-svn: 207216
2014-04-25 09:49:32 +00:00
Jason Molenda a332978b2a lldb arm64 import.
These changes were written by Greg Clayton, Jim Ingham, Jason Molenda.

It builds cleanly against TOT llvm with xcodebuild.  I updated the
cmake files by visual inspection but did not try a build.  I haven't
built these sources on any non-Mac platforms - I don't think this
patch adds any code that requires darwin, but please let me know if
I missed something.

In debugserver, MachProcess.cpp and MachTask.cpp were renamed to
MachProcess.mm and MachTask.mm as they picked up some new Objective-C
code needed to launch processes when running on iOS.

llvm-svn: 205113
2014-03-29 18:54:20 +00:00
Ed Maste b9fe0dd781 Add ObjectFileJIT library
llvm-svn: 204698
2014-03-25 02:03:28 +00:00
Hafiz Abid Qadeer 42dde32433 Use --whole-archive linker option for minw too.
It is already used for Linux and FreeBSD. 

llvm-svn: 204603
2014-03-24 13:44:52 +00:00
Hafiz Abid Qadeer 2a40c1ee24 Removed a redundant entry.
Revision 203667 has already added lldbHostWindows.a
to USEDLIBS. Revision 203785 just ended up adding a redundant entry.

llvm-svn: 204601
2014-03-24 13:05:09 +00:00
Hafiz Abid Qadeer 2f45b7c492 Add some missing libraries for mingw.
Similar functionality already exist on the cmake side.

llvm-svn: 203785
2014-03-13 11:12:05 +00:00
Virgile Bello 3e699d419e Moved various RegisterContext files from Process/POSIX to Process/Utility for easier sharing.
Fix Windows build by adding JITLoaderGDB and ProcessElfCore.
RegisterContext: fixes for Windows build: sizeof(GPR::register) didn't work, switched to sizeof(((GPR*)NULL)->register).

llvm-svn: 203667
2014-03-12 16:04:29 +00:00
Ed Maste 32aa12b86c Build JITLoader on FreeBSD also
llvm-svn: 202980
2014-03-05 13:57:24 +00:00
Andrew MacPherson 17220c1886 Add support for JIT debugging on Linux using the GDB JIT interface. Patch written with Keno Fischer.
llvm-svn: 202956
2014-03-05 10:12:43 +00:00
Todd Fiala 620ea83926 Fixed configure-based build on OS X.
This change adds a missing include path to the
ObjC LanguageRuntime path to the MacOSX SystemRuntime
plugin's Makefile.

It also adds the panel and curses library to the liblldb
shared library linkage step.

Changes by Jevin Sweval with a minor tweak.

llvm-svn: 202547
2014-02-28 21:55:46 +00:00
Ed Maste 829839259a Add libs needed by iohandler merge to Makefile for FreeBSD
Copied from the Linux case added in r200263.  Discovered by the FreeBSD
buildbot - I tested the branch with cmake.

llvm-svn: 200548
2014-01-31 14:30:11 +00:00
Greg Clayton 44d937820b Merging the iohandler branch back into main.
The many many benefits include:
1 - Input/Output/Error streams are now handled as real streams not a push style input
2 - auto completion in python embedded interpreter
3 - multi-line input for "script" and "expression" commands now allow you to edit previous/next lines using up and down arrow keys and this makes multi-line input actually a viable thing to use
4 - it is now possible to use curses to drive LLDB (please try the "gui" command)

We will need to deal with and fix any buildbot failures and tests and arise now that input/output and error are correctly hooked up in all cases.

llvm-svn: 200263
2014-01-27 23:43:24 +00:00
Todd Fiala 5000e28a5e Make lldb build with Makefiles on OS X.
This change does the following:

* Adds Makefile build scripts to debug server.

* Fixes a few small mistakes in the other makefiles.

* Modifies generate-vers.pl slightly to also work for debugserver.

* Changes the OS X, non-framework python search path from libdir to
  libdir/python2.X/site-packages where it is installed by the build
  system (also where it is installed on other operating systems).

Patch by Keno Fischer.

llvm-svn: 199543
2014-01-18 08:05:32 +00:00
Sylvestre Ledru 7746736ece Bug #18214 - Adds LLVMObjCARCOpts.a to Makefile linkage for liblldb.
Patch by Todd Fiala

llvm-svn: 197078
2013-12-11 21:55:00 +00:00
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