Commit Graph

694 Commits

Author SHA1 Message Date
Jason Molenda 4f57d6abbe Update xcode project file for addition/removals in r233083 and r233114.
llvm-svn: 233167
2015-03-25 03:26:02 +00:00
Oleksiy Vyalov 05a55de3ba Move ADB communications to AdbClient class - to make it accessible by other components.
http://reviews.llvm.org/D8535

llvm-svn: 233021
2015-03-23 21:03:02 +00:00
Zachary Turner 3a00691f3d Move LLDB initialization/shutdown to Initialization.
This creates a new top-level folder called Initialization which
is intended to hold code specific to LLDB system initialization.
Currently this holds the Initialize() and Terminate() functions,
as well as the fatal error handler.

This provides a means to break the massive dependency cycle which
is caused by the fact that Debugger depends on Initialize and
Terminate which then depends on the entire LLDB project.  With
this structure, it will be possible for applications to invoke
lldb_private::Initialize() directly, and have that invoke
Debugger::Initialize.

llvm-svn: 232768
2015-03-19 22:00:21 +00:00
Zachary Turner 5023257f23 Move some functions from source/lldb.cpp to Utility.
Specifically, there were some functions for converting enums
to strings and a function for matching a string using a specific
matching algorithm.  This moves those functions to more appropriate
headers in lldb/Utility and updates references to include the
new headers.

llvm-svn: 232673
2015-03-18 21:31:45 +00:00
Enrico Granata c457132ede Fix the Xcode build after the MIPS64 changes
llvm-svn: 232655
2015-03-18 18:42:41 +00:00
Zachary Turner 3294de270e Move lldb-log.cpp to core/Logging.cpp
So that we don't have to update every single #include in the entire
codebase to #include this new header (which used to get included by
lldb-private-log.h, we automatically #include "Logging.h" from
within "Log.h".

llvm-svn: 232653
2015-03-18 18:20:42 +00:00
Oleksiy Vyalov 63acdfdeb2 Add Utility/ModuleCache class and integrate it with PlatformGDBRemoteServer - in order to allow modules caching from remote targets.
http://reviews.llvm.org/D8037

llvm-svn: 231734
2015-03-10 01:15:28 +00:00
Enrico Granata 0ddbf3633c Provide synthetic children for some vector types
Unlike GDB, we tackle the problem of representing vector types in different styles by having a synthetic child provider that recognizes the format you're trying to apply to the variable, and coming up with the right type and number of child values to match that format

This makes for a more compact representation and less visual noise

Fixes rdar://5429347

llvm-svn: 231449
2015-03-06 03:32:20 +00:00
Jason Molenda 07e51cc72d Bump major vers # in xcode project file from 330 to 340.
llvm-svn: 231441
2015-03-06 00:45:01 +00:00
Enrico Granata 53ed89c6da Introduce lldbassert(x)
We would like it if LLDB never crashed, especially if we never caused LLDB to crash
On the other hand, having assertions can sometimes be useful

lldbassert(x) is the best of both worlds:
- in debug builds, it turns into a regular assert, which is fine because we don't mind debug LLDB to crash on development machines
- in non-debug builds, it emits a message formatted just like assert(x) would, but then instead of crashing, it dumps a backtrace, suggests filing a bug, and keeps running

llvm-svn: 231310
2015-03-04 22:59:20 +00:00
Greg Clayton 688a3005cf Fixed Xcode project after recent changes:
"After recent changes, some code has become redundant. This revision tries to remove
the un-used code and tidy up the rest.

Following 4 files have been removed. I have updated CMake files and checked that it builds
fine on Linux and Windows. Can somebody update the xcode related file accordingly?

tools/lldb-mi/MICmnStreamStdinLinux.cpp
tools/lldb-mi/MICmnStreamStdinLinux.h
tools/lldb-mi/MICmnStreamStdinWindows.cpp
tools/lldb-mi/MICmnStreamStdinWindows.h"

llvm-svn: 230401
2015-02-24 23:50:21 +00:00
Jason Molenda 3f804513e7 Move the copy phases for the xpcservices bundles from the "LLDB"
target to the "desktop" target.  They aren't used for iOS builds.

llvm-svn: 230302
2015-02-24 03:21:38 +00:00
Greg Clayton c32f3faae9 Add missing Xcode project files for MICmdCmdSymbol.cpp and MICmdCmdSymbol.h.
llvm-svn: 230110
2015-02-21 00:57:59 +00:00
Enrico Granata 8fdf78594e Add an OptionValueLanguage class
llvm-svn: 230046
2015-02-20 19:46:30 +00:00
Oleksiy Vyalov 7a9e76216b Introduce FileSystem::CalculateMD5AsString that supports any platform and make existing FileSystem::CalculateMD5 to use it.
http://reviews.llvm.org/D7771

llvm-svn: 230036
2015-02-20 18:34:03 +00:00
Tamas Berghammer c2c3d7185d Merge lldb-platform and lldb-gdbserver into a single binary
This commit merges lldb-platform and lldb-gdbserver into a single binary
of the same size as each of the previous individual binaries. Execution
mode is controlled by the first argument being either platform or
gdbserver.

Patch from: flackr <flackr@google.com>

Differential revision: http://reviews.llvm.org/D7545

llvm-svn: 229683
2015-02-18 15:39:41 +00:00
Zachary Turner 51f96eeb24 Revert "Revert "I had recently added a new SBFrame::GetVariables() overload with yet another bool argument""
Reverting this commit led to other failures which I did not see at
first.  This turned out to be an easy problem to fix, so I added
SBVariablesOptions.cpp to the CMakeLists.txt.  In the future please
try to make sure new files are added to CMake.

llvm-svn: 229516
2015-02-17 17:55:50 +00:00
Zachary Turner b3b8922cad Revert "I had recently added a new SBFrame::GetVariables() overload with yet another bool argument"
This reverts commit r228975.  It was causing link errors
on the Windows bots, since last Thursday.

http://lab.llvm.org:8011/builders/lldb-x86-win7-msvc/builds/725

Conflicts:
	lldb.xcodeproj/project.pbxproj

llvm-svn: 229514
2015-02-17 17:42:05 +00:00
Oleksiy Vyalov 71d08b3f2d Extract SBAttachInfo into own set of files - SBAttachInfo.h, SBAttachInfo.cpp and SBAttachInfo.i.
llvm-svn: 229346
2015-02-16 00:04:19 +00:00
Enrico Granata e0d951db44 I had recently added a new SBFrame::GetVariables() overload with yet another bool argument
We talked about it internally - and came to the conclusion that it's time to have an options class

This commit adds an SBVariablesOptions class and goes through all the required dance

llvm-svn: 228975
2015-02-12 23:09:17 +00:00
Tamas Berghammer 00e305d281 Create new platform: remote-android
* Create new platform plugin for lldb
* Create HostInfo class for android
* Create ProcessLauncher for android

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

llvm-svn: 228943
2015-02-12 18:13:44 +00:00
Tamas Berghammer e13c2731ba Separate monolithic GDBRemoteCommunicationServer class into 4 part
GDBRemoteCommunicationServer: Basic packet handling, handler registration
LLDBCommonPacketHandler: Common packet handling for lldb-platform and lldb-gdbserver
LLDBPlatformPacketHandler: lldb-platform specific packet handling
LLGSPacketHandler: lldb-gdbserver specific packet handling

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

llvm-svn: 228823
2015-02-11 10:29:30 +00:00
Enrico Granata bb557065f6 Add an LLDB summary for CMTime. Fixes rdar://15370376
llvm-svn: 228759
2015-02-10 23:02:25 +00:00
Enrico Granata 89fdc9a61e Add a JSON producer to LLDB - this is a set of classes that encapsulate JSON objects and allow you to write them to a Stream for subsequent processing
Using this JSON producer, write a little tool that expands its own command-line arguments and dumps them to stdout as a JSON array

llvm-svn: 228636
2015-02-10 00:30:07 +00:00
Oleksiy Vyalov 1ef7b2c897 Extend SBPlatform with capability to launch/terminate a process remotely. Integrate this change into test framework in order to spawn processes on a remote target.
http://reviews.llvm.org/D7263

llvm-svn: 228230
2015-02-04 23:19:15 +00:00
Greg Clayton 79ede57194 Remove changes I accidentally checked in with my previous commit.
llvm-svn: 228210
2015-02-04 22:02:49 +00:00
Greg Clayton 554f68d385 Get rid of Debugger::FormatPrompt() and replace it with the new FormatEntity class.
Why? Debugger::FormatPrompt() would run through the format prompt every time and parse it and emit it piece by piece. It also did formatting differently depending on which key/value pair it was parsing. 

The new code improves on this with the following features:
1 - Allow format strings to be parsed into a FormatEntity::Entry which can contain multiple child FormatEntity::Entry objects. This FormatEntity::Entry is a parsed version of what was previously always done in Debugger::FormatPrompt() so it is more efficient to emit formatted strings using the new parsed FormatEntity::Entry.
2 - Allows errors in format strings to be shown immediately when setting the settings (frame-format, thread-format, disassembly-format
3 - Allows auto completion by implementing a new OptionValueFormatEntity and switching frame-format, thread-format, and disassembly-format settings over to using it.
4 - The FormatEntity::Entry for each of the frame-format, thread-format, disassembly-format settings only replaces the old one if the format parses correctly
5 - Combines all consecutive string values together for efficient output. This means all "${ansi.*}" keys and all desensitized characters like "\n" "\t" "\0721" "\x23" will get combined with their previous strings
6 - ${*.script:} (like "${var.script:mymodule.my_var_function}") have all been switched over to use ${script.*:} "${script.var:mymodule.my_var_function}") to make the format easier to parse as I don't believe anyone was using these format string power user features.
7 - All key values pairs are defined in simple C arrays of entries so it is much easier to add new entries.

These changes pave the way for subsequent modifications where we can modify formats to do more (like control the width of value strings can do more and add more functionality more easily like string formatting to control the width, printf formats and more).

llvm-svn: 228207
2015-02-04 22:00:53 +00:00
Chaoren Lin 2fe1d0abc2 Moving header files from source/Host/common to proper location.
llvm-svn: 227929
2015-02-03 01:51:38 +00:00
Chaoren Lin 56f981bfce Added remote-build.py and wired it into Xcode for Linux and MacOSX+Linux builds.
llvm-svn: 227908
2015-02-03 01:50:39 +00:00
Jim Ingham 0895e3406c Remove the "/" from the end of rpath paths. Having it there causes the
paths we get from dladdr to have "//" in it internally, and while that is
formally correct it is just asking for somebody to misparse it... 

llvm-svn: 226886
2015-01-23 00:39:13 +00:00
Oleksiy Vyalov 49b71c609c Make OSX test run firewall friendly.
http://reviews.llvm.org/D7115

llvm-svn: 226856
2015-01-22 20:03:21 +00:00
Jason Molenda d50c398c69 Add Utility/UriParser.cpp to the lldb-core target so xcode builds
work again.

llvm-svn: 226752
2015-01-22 00:39:36 +00:00
Greg Clayton 87e36a7a08 Update the deployment target on MacOSX to be 10.8. The change is mainly to get the REG_ENHANCED stuff in regex.h and shouldn't affect other targets.
llvm-svn: 226607
2015-01-20 20:45:49 +00:00
Greg Clayton ee3626ec16 Added an Xcode target so we build the "lldb-mi" executable as part of the "desktop" and "desktop no xpc" targets.
Include paths were switched to be user include paths, if this breaks the linux build we will need to fix the Makefiles/cmake stuff.

<rdar://problem/19198581> 

llvm-svn: 226530
2015-01-20 00:04:26 +00:00
Vince Harron 5275aaa0cc Moved Args::StringToXIntYZ to StringConvert::ToXIntYZ
The refactor was motivated by some comments that Greg made
http://reviews.llvm.org/D6918

and also to break a dependency cascade that caused functions linking
in string->int conversion functions to pull in most of lldb

llvm-svn: 226199
2015-01-15 20:08:35 +00:00
Oleksiy Vyalov d5f8b6a6ca Extend PipePosix with support for named pipes/timeout-based IO and integrate it with GDBRemoteCommunication / lldb-gdbserver.
http://reviews.llvm.org/D6954

llvm-svn: 225849
2015-01-13 23:19:40 +00:00
Oleksiy Vyalov 1777c12206 Fix XCode build on OSX - add OptionValueChar.cpp
http://reviews.llvm.org/D6941

llvm-svn: 225733
2015-01-12 23:50:51 +00:00
Jason Molenda a05677126d Hoist the RegisterNumber class out of RegisterContextLLDB and make
it more generally available. 

Add checks to UnwindAssembly_x86::AugmentUnwindPlanFromCallSite() so
that it won't try to augment an UnwindPlan that already describes
the function epilogue.

Add a test case for backtracing out of _sigtramp on Darwin systems.
This could probably be adapted to test the same thing on linux/bsd but 
the function names of sigtramp and kill are probably platform
specific and I'm not sure what they should be.

llvm-svn: 225578
2015-01-10 04:01:03 +00:00
Vince Harron 3218c0fb94 Adds UriParser::Parse and unit tests
This can be used to parse URIs passed to 'platform connect'

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

llvm-svn: 225317
2015-01-06 23:38:24 +00:00
Zachary Turner 0b9d3eefdb Enhance the Pipe interface for better portability.
This patch makes a number of improvements to the Pipe interface.

1) An interface (PipeBase) is provided which exposes pure virtual
   methods for any implementation of Pipe to override.  While not
   strictly necessary, this helps catch errors where the interfaces
   are out of sync.

2) All methods return lldb_private::Error instead of returning bool
   or void.  This allows richer error information to be propagated
   up to LLDB.

3) A new ReadWithTimeout() method is exposed in the base class and
   implemented on Windows.

4) Support for both named and anonymous pipes is exposed through the
   base interface and implemented on Windows.  For creating a new
   pipe, both named and anonymous pipes are supported, and for
   opening an existing pipe, only named pipes are supported.

New methods described in points #3 and #4 are stubbed out on posix,
but fully implemented on Windows.  These should be implemented by
someone on the linux / mac / bsd side.

Reviewed by: Greg Clayton, Oleksiy Vyalov
Differential Revision: http://reviews.llvm.org/D6686

llvm-svn: 224442
2014-12-17 18:02:19 +00:00
Jim Ingham 5e09c8c32c Add the ability to tag one or more breakpoints with a name. These
names can then be used in place of breakpoint id's or breakpoint id 
ranges in all the commands that operate on breakpoints.

<rdar://problem/10103959>

llvm-svn: 224392
2014-12-16 23:40:14 +00:00
Jason Molenda e589e7e336 The lldb unwinder can now use the unwind information from the compact-unwind
section for x86_64 and i386 targets on Darwin systems.  Currently only the
compact unwind encoding for normal frame-using functions is supported but it
will be easy handle frameless functions when I have a bit more free time to
test it.  The LSDA and personality routines for functions are also retrieved
correctly for functions from the compact unwind section.

This new code is very fresh -- it passes the lldb testsuite and I've done
by-hand inspection of many functions and am getting correct behavior for all
of them.  There may need to be some bug fixing over the next couple weeks as
I exercise and test it further.  But I think it's fine right now so I'm
committing it.

<rdar://problem/13220837> 

llvm-svn: 223625
2014-12-08 03:09:00 +00:00
Sean Callanan 9998acd004 This is the meat of the code to add Clang modules
support to LLDB.  It includes the following:

- Changed DeclVendor to TypeVendor.
- Made the ObjCLanguageRuntime provide a DeclVendor
  rather than a TypeVendor.
- Changed the consumers of TypeVendors to use
  DeclVendors instead.
- Provided a few convenience functions on
  ClangASTContext to make that easier.

llvm-svn: 223433
2014-12-05 01:21:59 +00:00
Enrico Granata e2068207be The register keyword is deprecated in C++11, so clang complains strongly about swig generating register declarations. Abuse the preprocessor to define the keyword away
llvm-svn: 223084
2014-12-01 22:51:03 +00:00
Greg Clayton e3a73eb30f Fix the iOS build after recent inherited OTHER_LDFLAGS.
llvm-svn: 221797
2014-11-12 18:05:32 +00:00
Jason Molenda 968abb448a Update xcode project file to build new ppc files.
llvm-svn: 220947
2014-10-31 03:39:11 +00:00
Enrico Granata ca6c8ee23b Start adopting the StringPrinter API. The StringPrinter API is the new blessed way of printing strings that supports escaping non-printables, and has better handling of different UTF encodings
llvm-svn: 220894
2014-10-30 01:45:39 +00:00
Greg Clayton dc574df04f Make sure OTHER_CFLAGS and OTHER_LDFLAGS are inherited from the Xcode project so you can easily add to the flags of all targets.
llvm-svn: 220720
2014-10-27 21:14:34 +00:00
Enrico Granata e85fe3a4d1 Reorganize some of the data formatters code to simplify CXXFormattersFunction.h. Also, add a synthetic child provider for libc++'s version of std::initializer_list<T>
llvm-svn: 220421
2014-10-22 20:34:38 +00:00
Jason Molenda ecafcb867a Xcode recommended these changes to the project file. It recommended
a number of warnings to be enabled.  The one making the most noise
across the code base right now is CLANG_WARN_UNREACHABLE_CODE = YES.

llvm-svn: 219910
2014-10-16 08:04:28 +00:00