Commit Graph

8555 Commits

Author SHA1 Message Date
Jean-Daniel Dupas 36b5eea258 Fix UnwindAssembly memory leak by defining and using a shared UnwindAssemblySP type.
llvm-svn: 200725
2014-02-03 23:49:47 +00:00
Enrico Granata d8e4584cbd <rdar://problem/15154623>
Move a couple formatters from category AppKit to CoreFoundation

llvm-svn: 200713
2014-02-03 19:46:31 +00:00
Ed Maste cc8068f2ac Remove failure decorators for FreeBSD bug
The issue described in llvm.org/pr18065 is actually due to FreeBSD bug
theads/186309 [1], which is now fixed in FreeBSD SVN r261354 [2] and will
be merged to release branches shortly.

Diagnosed and fixed by John Wolfe.

[1] http://www.freebsd.org/cgi/query-pr.cgi?pr=186309
[2] http://svnweb.freebsd.org/base?view=revision&revision=261354

llvm-svn: 200648
2014-02-02 19:29:50 +00:00
Ed Maste 10c82017b6 Update header comment to match filename
llvm-svn: 200647
2014-02-02 19:25:11 +00:00
Ed Maste dbd5950b63 Use libc++ on FreeBSD as on Darwin
This could use some refinement still, but the previous behaviour of adding
-stdlib=libstc++ on FreeBSD w/ Clang is the least likely case to work.

llvm.org/pr17910

llvm-svn: 200646
2014-02-02 19:24:15 +00:00
Jean-Daniel Dupas 59999a32b3 Remove commented includes
llvm-svn: 200637
2014-02-02 14:06:07 +00:00
Todd Fiala 31cb474e2d Fix for failure to unwind Linux stack frames with call in final position.
Fixes http://llvm.org/bugs/show_bug.cgi?id=18656.

Note this exposes a failure on Linux of
TestInferiorAssert.test_inferior_asserting_disassemble, similar to how
it fails on FreeBSD. I'll file a bug for this next. We're now getting
another frame beyond where we used to prior to this fix, so the fix is
exposing failures in previosly not-reachable frames.

Much thanks to Jason Molenda, who had much to do with helping figure
out where unwinding was breaking.

llvm-svn: 200600
2014-02-01 00:48:34 +00:00
Deepak Panickal 914b8d989b Fixing the Windows build for the changes brought in from the iohandler merge.
llvm-svn: 200565
2014-01-31 18:48: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
Jim Ingham 4046a30c73 Check curr_thread is not empty before accessing it.
<rdar://problem/15953271>

llvm-svn: 200504
2014-01-31 01:01:23 +00:00
Greg Clayton 10c0ef7b8a Pressing ^D in a non-empty input terminates LLDB. This was due to the fact that we stack more than one editline instance on top of each other and we still expect CTRL+D to exit the editline instance, but it should only do so when the line is empty. Otherwise it should (and does) delete the character at the cursor.
<rdar://problem/15944703>

llvm-svn: 200489
2014-01-30 20:59:18 +00:00
Todd Fiala 3452df6723 Fixed b18655: cleaned up script interpreter file reference handling.
This change addresses shutdown crashes in the python lldb module when
the script interpreter was hanging on to saved file references after
leaving a session.  It also gets rid of extra references to the
stdin/stdout/stderr python file objects that are created when entering
the session.

This change also moves the bundled pyexpect 2.4 library to the front
of the python library path so that a python distribution default
pyexpect (2.3 in Ubuntu 12.04) is not picked up first.

llvm-svn: 200486
2014-01-30 20:19:22 +00:00
Greg Clayton 590426029b Missing files for previous checkin that fixed: "script help (lldb.SBThread)" output stops after 2048 bytes are printed.
<rdar://problem/15942977>

llvm-svn: 200478
2014-01-30 18:52:57 +00:00
Greg Clayton 31480e64ee "script help (lldb.SBThread)" output stops before all output is displayed. Fixed now.
<rdar://problem/15942977>

llvm-svn: 200476
2014-01-30 18:17:31 +00:00
Enrico Granata 1ba7305974 <rdar://problem/15936507>
PyTuple_SetItem steals a reference to the item it inserts in the tuple
This, plus the Py_XDECREF of the tuple a few lines below, causes our session dictionary to go away after the first time a SWIG layer function is called - with disastrous effects for the first subsequent attempt to use any functionality in ScriptInterpreterPython
This fixes it

llvm-svn: 200429
2014-01-29 23:18:58 +00:00
Greg Clayton 99dcbe1e50 Don't crash when trying to auto complete 'breakpoint set -n "_'
<rdar://problem/15921898>

llvm-svn: 200402
2014-01-29 18:25:07 +00:00
Greg Clayton 5fdb09bb76 Show help dialog the first time the "gui" is run to help users find their way.
llvm-svn: 200326
2014-01-28 18:41:35 +00:00
Greg Clayton c809cbcf4d Fixed a crasher when handling process events that is due to a translation from the public API to the private API.
llvm-svn: 200267
2014-01-28 00:36:31 +00:00
Todd Fiala b8b49ec92b Modified GDBProcessCommunicationServer to launch via the platform.
GDBProcessCommunicationServer now optionally takes a PlatformSP that
defaults to the default platform for the host.
GDBProcessCommunicationServer::LaunchProcess () now uses the platform
to launch the process.

lldb-gdbserver now takes an optional --platform={platform_plugin_name}
or -p {platform_plugin_name} command line option. If no platform is
specified, the default platform for the host is used; otherwise, if
the platform_plugin_name matches a registered platform plugin or
matches the default platform's name (which is not necessarily
registered by name in the case of 'host'), that platform is used. If
the platform name cannot be resolved, lldb-gdbserver exits after
printing all the available platform plugin names and the default
platform plugin name.

llvm-svn: 200266
2014-01-28 00:34:23 +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
Jason Molenda 89c37499dd Change DecodeProcessInfoResponse to set the ProcessInfo's architecture
if the remote stub provided enough information to identify it in the
qProcessInfo packet response.  (e.g. for an Apple device where we know 
it is Mach-O, the cpu type & cpu sub type).
<rdar://problem/15847901> 

llvm-svn: 200253
2014-01-27 22:23:20 +00:00
Enrico Granata 5000ee16f6 <rdar://problem/15776874>
ValueObjectPrinter could enter an infinite loop while trying to display an aptly formed ValueObject: a reference, with a child of some pointer type, such that the pointees chain ended up pointing back to some part of itself - a pointer to itself being the simplest such case

Fixed here by only setting a pointer depth when needed, and ensuring that we won't overflow and wrap the pointer depth when it's zero.

llvm-svn: 200247
2014-01-27 21:31:26 +00:00
Todd Fiala 9f37737311 convert gdb-remote 'A' launch to use LaunchProcess ()
This change modifies the 'A' command handler's launch code to launch
with LaunchProcess (). The net effect is that the default process
monitoring that LaunchProcess () adds will kick in, allowing the
GDBRemoteCommunicationServer to be able to reap processes started with
this facility correctly. Later, in the case of lldb-gdbserver, we'll
also have the proper process monitoring going on to really debug the
inferior process.

llvm-svn: 200246
2014-01-27 20:44:50 +00:00
Todd Fiala 1b0539c7f6 Fix group stop signal handling issue on Linux.
This patch addresses a bug where in a multi-threaded program a new
signal from the inferior may be received before all group-stop
messages from an earlier signal have been handled.

Patch by Andrew MacPherson

llvm-svn: 200226
2014-01-27 17:03:57 +00:00
Ed Maste 1e8f163709 Remove FIXME comments about tids on FreeBSD that no longer apply
Spotted by John Wolfe.

llvm-svn: 200092
2014-01-25 18:45:40 +00:00
Alp Toker 6a6ff05b57 Track clang changes from r200082
llvm-svn: 200085
2014-01-25 16:57:13 +00:00
Steve Pucci 5ae54ae6cd Support for debugging against a remote stock gdbserver.
There are a couple of pieces:
 * some lazy-evaluation members that store info listed in a qSupported response
 * new method SendPacketsAndConcatenateResponses which is used for
   fetching fixed-size objects from the remote gdbserver by using multiple
   packets if necessary (first use will be to fetch shared-library XML files).

llvm-svn: 200072
2014-01-25 05:46:51 +00:00
Jason Molenda bbef401896 Change DataExtractor's ReadInt* and ReadSwapInt* routines, as well as
GetU32 and GetU64, to use memcpy to copy bytes into a local buffer instead
of having a (uint64_t *) etc local variable, pointing to the address, and
dereferencing it.  If compiled on a CPU where data alignment is required 
(e.g. the LDM instruction on armv7) and we try to GetU64 out of a mmap'ed 
DWARF file, that 8 byte quantity may not be world aligned and the program
can get an unaligned memory access fault.

<rdar://problem/15849231> 

llvm-svn: 200069
2014-01-25 05:12:35 +00:00
Jason Molenda 4411528461 Note that qHostInfo prints the cputype and cpusubtype in base10;
qProcessInfo prints the cputype and cpusubtype in base16.

llvm-svn: 200068
2014-01-25 04:44:34 +00:00
Jason Molenda 6e20554ea8 Initialize the named_pipe_path in GDBRemoteCommunication::StartDebugserverProcess
right after the space for it is allocated on the stack, instead of trying
to initialize it in all the different places in this method.  It's too easy
for another uninitialized code path to sneak in as it is written right now.

llvm-svn: 200066
2014-01-25 03:57:13 +00:00
Todd Fiala 8ce3dee45f Fix crash on Linux if sem_wait() is interrupted.
Patch by Andrew MacPherson.

llvm-svn: 200049
2014-01-24 22:59:22 +00:00
Jason Molenda ffa674e6d7 Terminate an unused char* buffer correctly so we don't try to open
it later in GDBRemoteCommunication::StartDebugserverProcess and report
an error.
<rdar://problem/15820813> 

llvm-svn: 200047
2014-01-24 22:49:32 +00:00
Todd Fiala 3e92a2b013 Added reaper for commandline-launched processes.
GDBRemoteCommunicationServer::LaunchProcess () now uses the built-up
ProcessLaunchArgs rather than clearing and setting items from the
function arguments. I added setters for the arguments and launch
flags, which lldb-gdbserver uses for its specification of the
commandline-specified startup app (if one is specified).

LaunchProcess () also adds a new reaper monitor that it applies to
the launched process if no process monitor has already been applied.

This addresses an issue where the 'k' command would generate (possibly
false) warnings about not being able to positively state whether a
killed process actually terminated. GDBRemoteCommunicationServer now
definitely knows the disposition of its children.

llvm-svn: 199959
2014-01-24 00:52:53 +00:00
Greg Clayton 1e3be5ba2c Don't copy entire value into m_data unless we need to. If we did this and the entire variable failed to be read, we wouldn't be able to display any actual values that were in good memory. This will also make things more efficient by not have every struct/union/class/array copy its entire value into a ValueObject.m_data even though no one was using it.
llvm-svn: 199953
2014-01-23 22:55:05 +00:00
Greg Clayton bc8911807c Fixed a test suite exception that was cause by bad python (sys.unlink instead of os.unlink).
llvm-svn: 199952
2014-01-23 22:53:05 +00:00
Greg Clayton 146b7b1230 Updated to latest and greatest demangler sources.
<rdar://problem/15736085>

llvm-svn: 199946
2014-01-23 22:12:54 +00:00
Todd Fiala 403edc5c57 Move process launching into GDBRemoteCommunicationServer.
lldb-gdbserver was launching the commandline-specified launch process
directly, without GDBRemoteCommunicationServer knowing anything about
it.  As GDBRemoteCommunicationServer is the piece that manages and
knows about processes that the gdb remote protocol discusses with
the client end, it is important that it know about launched processes.

This change also implements the k gdb remote protocol message, having it
kill all known spawned processes when it is received.

(Note: in lldb-gdbserver, the spawned processes are not properly
monitored yet. The response to the k packet will complain that
spawned processes do not really appear to be getting killed even if
they are. This will get addressed soon.)

llvm-svn: 199945
2014-01-23 22:05:44 +00:00
Jim Ingham a786e53903 Don't need to figure out the frame's module if we don't have any libraries
in the step-avoid-libraries list.

llvm-svn: 199944
2014-01-23 21:57:53 +00:00
Jim Ingham 4da6206d75 Add a "step-avoid-libraries" setting to complement the "step-avoid-regexp" setting.
llvm-svn: 199943
2014-01-23 21:52:47 +00:00
Greg Clayton 1f4db7da8f Added the ability to get the type that a typedef points to via:
SBType SBType::GetTypedefedType();

Also added the ability to get a type by type ID from a SBModule:

SBType SBModule::GetTypeByID (lldb::user_id_t uid);

llvm-svn: 199939
2014-01-23 21:38:34 +00:00
Greg Clayton 09effdacda Added a new lldb command that can parse all struct and class types for one or more shared libraries.
llvm-svn: 199937
2014-01-23 21:26:30 +00:00
Todd Fiala 571768caa6 Candidate fix for bug 18592.
This reverts Host.cpp LaunchProcess spawn behavior on FreeBSD to be
like Linux (and unlike OS X) with regards to how default signal
handlers and setup on the spawned process. FreeBSD does not reset
default signal handlers on the spawned process after this change.

llvm-svn: 199908
2014-01-23 17:07:54 +00:00
Enrico Granata 90890bba04 If a user specifies a format option to frame variable or expression, that format should prevail over whatever format(s) a summary specifies
(see test case for an example)

llvm-svn: 199857
2014-01-23 01:21:18 +00:00
Todd Fiala 76747120ca Unify OS X/POSIX/Linux Host spawn support.
This fixes a bug under Linux where spawning a process via
Host::LaunchProcess was disabling all blockable signals on the
launched process.  This caused strange behavior when attempting
to kill the lldb-gdbserver process, as the child generally would
not die unless killed with a non-blockable signal (e.g. 'kill -9').

This change moves several functions out of macosx/Host.mm into
common/Host.cpp.  In addition, two functions that needed to work
across common/Host.cpp and macosx/Host.mm were moved into the Host.h
header file.

llvm-svn: 199856
2014-01-23 00:52:28 +00:00
Greg Clayton a86dc43371 Add support for Haswell on x86_64.
<rdar://problem/15312873>

llvm-svn: 199854
2014-01-22 23:42:03 +00:00
Todd Fiala 4bd862206a Add --lldb-command command-line option to lldb-gdbserver
lldb-gdbserver now takes zero or more --lldb-command {command} options
that get executed by the command interpreter prior to starting up
a child debuggee process.  The short form is -c {command}.  This is
similar to how lldb-platform works.

This command can be used to enable logging in more than just the
gdb-remote log channel.  Here is an example startup sequence that allows
logging of lldb host and process log categories to one file and
gdb-remote packets to another file:

lldb-gdbserver -c 'log enable -f lgs.log lldb process host' \
  -c 'log enable -f lgs_packets.log gdb-remote packets' \
  localhost:5432 ./some_exe

llvm-svn: 199761
2014-01-21 18:46:22 +00:00
Sean Callanan 4f2c198617 Better logging for the IRExecutionUnit so that
we can see exactly what data was put where.

llvm-svn: 199701
2014-01-21 00:54:48 +00:00
Alp Toker f747ff1f54 Build fix following clang r199686
llvm-svn: 199689
2014-01-20 21:14:57 +00:00
Ed Maste e108405aaf Relax alias test for failing command
The alias test "exprf x 1234" expands to "expr -f x 1234" and is
expected to fail: it ends up trying to evaluate the invalid expression

    void
    $__lldb_expr(void *$__lldb_arg)
    {
        -f x 1234;
    }

On FreeBSD LLDB ends up finding a static function f() in a math library,
and thus the error produced does not include "use of undeclared
identifier 'f'".

We will report failure to parse the expression in any case, so require
only that error message.

llvm-svn: 199623
2014-01-20 03:45:47 +00:00
Ed Maste c5efc526c8 Remove decorators for now-fixed pr18191
llvm-svn: 199557
2014-01-18 17:03:41 +00:00
Ed Maste f170add239 Add decorator for failing FreeBSD test
llvm-svn: 199551
2014-01-18 16:23:30 +00:00
Ed Maste c787822545 Add decorator for FreeBSD test failure pr18522
llvm-svn: 199550
2014-01-18 14:29:57 +00:00
Ed Maste e8b2ef56e1 Handle LLDB_LIB_DIR on FreeBSD as on Linux
Diagnosed and tested by Mike Ma.
http://llvm.org/pr18191

llvm-svn: 199549
2014-01-18 14:22:28 +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
Todd Fiala 5b9e5b5961 Fixed a piece of documentation on a setter from last check-in.
llvm-svn: 199540
2014-01-18 03:08:37 +00:00
Todd Fiala a9ddb0e14f Added distribution info to ArchSpec and qHostInfo message.
ArchSpec now contains an optional distribution_id, with getters and
setters. Host::GetArchitecture () sets it on non-Apple platforms using
Host::GetDistributionId (). The distribution_id is ignored during
ArchSpec comparisons.

The gdb remote qHostInfo message transmits it, if set, via the
distribution_id={id-value} key/value pair. Updated gdb remote docs to
reflect this change.

As before, GetDistributionId () returns nothing on non-Linux platforms
at this time. On Linux, it is returned only if the lsb_platform
command is installed (in /bin or /usr/bin), and only if the
distributor id key is returned by 'lsb_platform -i'. This id is
lowercased, and whitespace is replaced with underscores.

llvm-svn: 199539
2014-01-18 03:02:39 +00:00
Sean Callanan 6826d22784 Made sure that ValueObjectVariable actually
updates itself before it tries to set its own
data.  Otherwise it has no idea where to put the
data value.

<rdar://problem/15846476>

llvm-svn: 199533
2014-01-18 01:13:50 +00:00
Todd Fiala e28f1d7f07 Undo change to triple behavior from r199510.
The Linux distribution will be added to the ArchSpec class in an
upcoming change. This change only undoes the change to the triple. The
distribution retrieval logic and enabling of lldb-gdbserver for linux
x86_64 builds is still in place.

llvm-svn: 199520
2014-01-17 22:21:22 +00:00
Jason Molenda be1261a1ab Add -stdlib=c++ to the LDFLAGS when configuring llvm. The lldb
xcode project file sets the MACOSX_DEPLOYMENT_TARGET to 10.7.
llvm/configure (as of r199313) tries to compile a .cpp file which
includes <atomic> with -std=c++0x.  If the deployment target is set
to earlier than 10.9 and no C++ library is specified, clang will
error out at this point.

Fixes xcode building of lldb on Mac OS X.  If this change causes
problems for any of the other build workflows, please let me know
and I'll fix it.

llvm-svn: 199511
2014-01-17 20:59:32 +00:00
Todd Fiala f3d61de532 Enable Linux distribution in vendor portion of host triple.
This change does the following:

* enables building lldb-gdbserver on linux_x86-64 platforms.

  Note - it builds but it has several run-time issues where many gdb
  remote protocol features are not properly implemented yet. I'm
  working on these one at a time.

* lldb-gdbserver: does not enable the eLaunchFlagDebug launch flag on
  Linux. Currently the POSIX launch routine will assert if that flag
  is passed in, presumably because that launch mode is not yet
  available.  This prevents lldb-gdbserver from asserting the moment
  it launches the debuggee process.

* Adds ConstString& Host::GetDistributionId ()

  This method is defined to return an empty result on all platforms
  except for Linux.  On Linux, it makes one attempt to execute
  'lsb_release -i' (both /usr/bin/lsb_release, where it appears
  on ubuntu, and /bin/lsb_release, where it appears on fedora
  if the redhat-lsb package is installed).  If lsb_release is not
  found in either of those locations, or if 'lsb_release -i' does
  not return the first line starting with "Distributor ID:\t",
  then the distribution id is empty.  The method will lower-case
  the id and replace whitespace with underscores.

* Modify Host::GetArchitecture () so that linux replaces an unknown
  vendor portion with the results of GetDistributionId () if that
  is non-empty.  This shows up now in qHostInfo remote packet
  responses and on the lldb host side.  Tested with ubuntu and
  fedora (the latter both with the default of not having lsb_release
  installed, and with having lsb_release installed via the redhat-lsb
  package).

  Examples of triples on Linux after this change:

    # x86_64 Unbuntu 12.04 LTS:
    x86_64-ubuntu-linux-gnu

    # x86_64 Fedora 20 Desktop with redhat-lsb package installed
    x86_64-fedora-linux-gnu

    # x86_64 Fedora 20 Desktop without redhat-lsb-core installed
    # (i.e. no /bin/lsb_release available)
    # same as before the change
    x86_64--linux-gnu

  Note I intend to have Android respond with:

    {arch}-android-linux

  when I get to implementing Android lldb-gdbserver support.

llvm-svn: 199510
2014-01-17 20:18:59 +00:00
Jim Ingham 6f78f3869d The default timeout for EvaluateExpressionOptions is not 0, so if no timeout is provided, we have to set the option timeout to 0 by hand.
<rdar://problem/15846781>

llvm-svn: 199509
2014-01-17 20:09:23 +00:00
Steve Pucci 7489cc98f7 Fix gcc warnings about casting away constness
llvm-svn: 199506
2014-01-17 18:29:08 +00:00
Steve Pucci aa71cd8d26 Avoid the gcc warning -Wno-non-template-friend
To avoid this warning, friend declarations inside template classes
must be declared as templates:
http://stackoverflow.com/questions/4039817/friend-declaration-declares-a-non-template-function

llvm-svn: 199505
2014-01-17 18:25:25 +00:00
Steve Pucci fc99572540 Rename Platform::GetFile (3-arg version) to GetFileWithUUID
This rename was suggested by gclayton as a way to silence gcc
warnings; the warning is emitted when there is an overloaded function
in a base class (Platform) for which a derived class redefines one of
the overloads but not the other (because doing so hides the other
overload from users of the derived class).  By giving the two methods
different names, the situation is avoided.

llvm-svn: 199504
2014-01-17 18:18:31 +00:00
Ed Maste 21afbe034e Correct logic checking for the first stop ID
llvm-svn: 199503
2014-01-17 17:31:06 +00:00
Ed Maste cbcf8ac51a Undo r199448, already implemented in r199426
llvm-svn: 199449
2014-01-17 00:53:01 +00:00
Ed Maste 1318b854a4 Link thread-specific breakpoint test against libpthread
llvm-svn: 199448
2014-01-17 00:48:11 +00:00
Steve Pucci 5ec012d4de Test new committer permission with one-line trailing whitespace removal.
llvm-svn: 199432
2014-01-16 22:18:14 +00:00
Todd Fiala a475693947 Fix bug in Linux remote dynamic loader setup and fix test.
Part 1 changes PlatformLinux::CreateInstance to always create with
is_host=false; that method is only used as the plug-in creator method
associated with the remote-linux platform plugin, and should therefore
always be remote.

Part 1 patch by Steve Pucci.

Part 2: fix a test break on linux.

In test/functionalities/thread/thread_specific_break, when using gcc,
either C99 mode would need to be enabled, or the code would need to
change.  I changed a couple loop variable definitions to conform
to pre-C99 to simplify testing the fix.  The second issue was
the necessity to include -lpthread as a linker option in the Makefile.

Any issues with that part are due to me (Todd Fiala).

llvm-svn: 199426
2014-01-16 21:22:11 +00:00
Sean Callanan 79fde96b6a Fixed some API drift by making "used" attributes
in a better way.

llvm-svn: 199408
2014-01-16 18:47:07 +00:00
Greg Clayton baf2c2211d If a library has no N_FUN symbols we don't succeed in finding resolver symbols, now we do.
<rdar://problem/15831334>

llvm-svn: 199345
2014-01-16 01:48:44 +00:00
Greg Clayton d81088c540 Make sure we correctly merge all N_FUN symbols with non-stab entries even if there are multiple symbols with the same name.
<rdar://problem/15831292>

llvm-svn: 199344
2014-01-16 01:38:29 +00:00
Jim Ingham 39fdae7f6a Fix a bug where if we stop but nobody says there was a reason for the stop, we would return
control to the user anyway.  This was put in to handle monitors that would say there was no
stop reason when you first attached to them.  But it broke the case where you hit a thread specific
breakpoint on many threads, but NOT the one specified in the breakpoint.  I work around this
by only doing the junky override when the StopID is 0 - i.e. on first attach.

This commit also adds a test for thread specific breakpoints.

llvm-svn: 199290
2014-01-15 03:32:42 +00:00
Jim Ingham a8b99ca4bb Add a little more logging to the StopInfoBreakpoint::PerformAction.
llvm-svn: 199289
2014-01-15 03:30:04 +00:00
Jim Ingham 4746a90d66 Change the name of the test class for this test (was copy/paste value...)
llvm-svn: 199251
2014-01-14 19:48:23 +00:00
Jim Ingham 0f7e294d65 Remove a compilation warning in the test case main.c file.
llvm-svn: 199243
2014-01-14 18:46:15 +00:00
Jason Molenda 303eb178a9 Fix typeo on memory read command example.
llvm-svn: 199228
2014-01-14 17:41:13 +00:00
Deepak Panickal 263fde068f Fix return type for Windows
llvm-svn: 199202
2014-01-14 11:34:44 +00:00
Sean Callanan 22ac610c4f Harden the Materializer logic against types that
don't know their bit alignment.

llvm-svn: 199173
2014-01-14 01:14:40 +00:00
Jim Ingham fc4a4e4e51 This is a macosx specific test case for stepping & setting breakpoints on indirect
and re-exported symbols.  I don't know if Linux has the latter, if it does, we could
probably make this a generic test.  Somebody who knows how to make these gadgets on 
Linux can maybe take a look...

llvm-svn: 199134
2014-01-13 20:44:26 +00:00
Deepak Panickal b36da43dc3 Fixed the Visual Studio Windows build
llvm-svn: 199111
2014-01-13 14:55:15 +00:00
Ed Maste 9344787636 Avoid LLDB crash upon DW_OP_deref* with empty stack
As done in other DW_OP_* cases, return an error if the stack is empty
rather than eventually crashing elsewhere.  Encountered on big-endian
MIPS, where LLVM bugs currently result in invalid .debug_loc data.

llvm-svn: 199110
2014-01-13 14:53:09 +00:00
Jim Ingham 55d3a0c3d4 Sometimes the trampoline refers directly to the indirect symbol. Handle that too.
llvm-svn: 198990
2014-01-11 01:21:50 +00:00
Greg Clayton fd6e4b91b7 Make sure to cleanup the "dwarf-lookups.txt" log file.
llvm-svn: 198984
2014-01-11 00:54:56 +00:00
Greg Clayton c26e63e986 We are doing spurious name lookups when running expressions in objective C methods.
<rdar://problem/15797390>

This new test case will detect this and make sure we don't regress on global name lookups that search all DWARF for everything when we don't need to.

llvm-svn: 198982
2014-01-11 00:29:50 +00:00
Jason Molenda 7f6d84b9c1 Add the offset for cfa+offset log messages in the unwind channel, to aid in debugging.
llvm-svn: 198977
2014-01-10 23:53:32 +00:00
Jim Ingham 1460e4bf0e Get the breakpoint setting, and the Mac OS X DYLD trampolines and expression evaluator to handle Indirect
symbols correctly.  There were a couple of pieces to this.

1) When a breakpoint location finds itself pointing to an Indirect symbol, when the site for it is created
   it needs to resolve the symbol and actually set the site at its target.
2) Not all breakpoints want to do this (i.e. a straight address breakpoint should always set itself on the
   specified address, so somem machinery was needed to specify that.
3) I added some info to the break list output for indirect symbols so you could see what was happening. 
   Also I made it clear when we re-route through re-exported symbols.
4) I moved ResolveIndirectFunction from ProcessPosix to Process since it works the exact same way on Mac OS X
   and the other posix systems.  If we find a platform that doesn't do it this way, they can override the
   call in Process.
5) Fixed one bug in RunThreadPlan, if you were trying to run a thread plan after a "running" event had
   been broadcast, the event coalescing would cause you to miss the ThreadPlan running event.  So I added
   a way to override the coalescing.
6) Made DynamicLoaderMacOSXDYLD::GetStepThroughTrampolinePlan handle Indirect & Re-exported symbols.

<rdar://problem/15280639>

llvm-svn: 198976
2014-01-10 23:46:59 +00:00
Filipe Cabecinhas 199e9233f8 Fix CMake build of debugserver on Mac OS X.
llvm-svn: 198970
2014-01-10 23:06:17 +00:00
Jim Ingham c46e479d12 Make SymbolContexts iterable with the C++11 for (a : b) syntax using Sean’s AdaptedIterable.
llvm-svn: 198968
2014-01-10 22:57:01 +00:00
Jim Ingham ea3ac27029 The actual indirect symbol is not the one at the address of the Trie entry marked with the EXPORT_SYMBOL_FLAGS_STUB_AND_RESOLVER, it is given in the address in the “other” field in that entry.
llvm-svn: 198967
2014-01-10 22:55:37 +00:00
Greg Clayton fda4fab505 Revert to getting a random port and sending that down to debugserver for iOS. The sandboxing is not letting debugserver reverse connect back to lldb.
<rdar://problem/15789865>

llvm-svn: 198963
2014-01-10 22:24:11 +00:00
Greg Clayton 9485dcfb1a Fixed the assertion test case.
llvm-svn: 198962
2014-01-10 22:22:44 +00:00
Greg Clayton 14aa26bbb5 Fixed the connect remote test.
llvm-svn: 198961
2014-01-10 22:21:12 +00:00
Jason Molenda 5f36c4beec Update the lldb version number in the xcode project files from 310.99.0 to 320.99.0.
llvm-svn: 198917
2014-01-10 06:12:10 +00:00
Greg Clayton 99e384c85f Fixed an issue with the byte order of ports in KDP packets.
I previously fixed a bug in the SocketAddress class where SocketAddress::GetPort() wasn't using ntohs() on the port number in the structures.

After fixing this, it broke places where we weren't using ntohs() and htons() correctly.

<rdar://problem/15767514>

llvm-svn: 198902
2014-01-10 00:31:10 +00:00
Jim Ingham a78f365b40 Document unsetting environment variables in the lldb/gdb cheat sheet.
llvm-svn: 198881
2014-01-09 19:30:11 +00:00
Enrico Granata d9bd4ae77b Patch by Ari Grant
"Open LLDB and run:
(lldb) script print lldb.debugger.GetInputFileHandle()

This puts the debugger into a catatonic state and all interactions seem
to enter a black hole. The reason is that executing this commnand
actually *CLOSES* the input file handle and so all input is dropped on
the floor. Oof!

The fix is simple: flush a descriptor, instead of closing it, when
transferring ownership."

llvm-svn: 198835
2014-01-09 02:28:25 +00:00
Jason Molenda 25f3961caf Roll back r198729; it seems to be causing two testsuite failures if llvm is built with asserts -
210: test_with_dsym_and_run_command (Test-rdar-10642615.Radar10642615DataFormatterTestCase)
     Test data formatter commands. ... Assertion failed: (isa<X>(Val) && "cast<Ty>() argument of incompatible type!"), function cast, file llvm/include/llvm/Support/Casting.h, line 239.

     226: test_with_dsym_and_run_command (Test-rdar-13338477.Radar13338477DataFormatterTestCase)
         Test that LLDB handles the clang typeclass Paren correctly. ... Assertion failed: (isa<X>(Val) && "cast<Ty>() argument of incompatible type!"), function cast, file llvm/include/llvm/Support/Casting.h, line 239.

llvm-svn: 198811
2014-01-09 00:02:17 +00:00
Jason Molenda 491caa14d5 Roll back my change to r198729; I'm going to revert it entirely.
llvm-svn: 198810
2014-01-09 00:00:53 +00:00
Jason Molenda 5005de4bac Revert the vector part of Enrico's change in r198729;
it is causing an llvm assert when run against
test/functionalities/data-formatter/rdar-10642615,

Assertion failed: (isa<X>(Val) && "cast<Ty>() argument of incompatible type!"), function cast, file llvm/include/llvm/Support/Casting.h, line 239.

llvm-svn: 198809
2014-01-08 23:35:54 +00:00
Greg Clayton 76af996df8 Only check os version for POSIX_SPAWN_CLOEXEC_DEFAULT on desktop builds of LLDB.
llvm-svn: 198800
2014-01-08 22:12:52 +00:00
Greg Clayton 2210624d86 Fixed a kernel panic that would occur if you debug anything on MacOSX 10.7 or earlier due to the use of the POSIX_SPAWN_CLOEXEC_DEFAULT attribute flag that closes all file descriptors on exec. We now dyamically detect the OS version and do the right thing.
llvm-svn: 198776
2014-01-08 18:02:51 +00:00
Todd Fiala 1a63440953 Fixes a bug preventing reading of the python register file.
This change fixes a bug recently introduced in ProcessGDBRemote that
prevented the Python register definition file from getting loaded when
the qRegisterInfo0 response returned $00#.

Patch by Steve Pucci.

llvm-svn: 198742
2014-01-08 07:52:40 +00:00
Enrico Granata ddc793674f Undo test
llvm-svn: 198733
2014-01-08 03:20:06 +00:00
Enrico Granata a048917363 Test
llvm-svn: 198732
2014-01-08 03:19:56 +00:00
Enrico Granata 29726a94ce Alignment fix
llvm-svn: 198731
2014-01-08 03:14:18 +00:00
Enrico Granata af76481caf <rdar://problem/15453076>
When determining the type of array members, do not see-through typedefs
For instance, in BOOL arr[4], we want the elements to be typed as BOOL, not signed char

llvm-svn: 198729
2014-01-08 03:02:33 +00:00
Enrico Granata 6b6ea7ac17 __CFString should also format as an NSString
llvm-svn: 198727
2014-01-08 02:34:42 +00:00
Enrico Granata 0dba9b33f0 New and improved data formatter for std::shared_ptr<> and std::weak_ptr<>
llvm-svn: 198724
2014-01-08 01:36:59 +00:00
Sean Callanan 65b320f783 Fixed a bug where the expression parser doesn't
materialize a variable in a register correctly
if the variable is a pointer.  This fixes a
regression introduced by my commit of Oct. 22nd
(r193191).

llvm-svn: 198718
2014-01-07 23:15:26 +00:00
Greg Clayton 3d5bb3266f Fixed an issue when attaching to a process without specifying a file where we wouldn't set the dyld gdb image notifier breakpoint correctly.
<rdar://problem/15720040>

llvm-svn: 198717
2014-01-07 23:15:02 +00:00
Greg Clayton 966c6f6ddf Fixed issues with ptr_refs:
- If there is only 1 frame ptr_refs now works (fixed issue with stack detection)
- Fixed test for result now that it isn't a pointer anymore

llvm-svn: 198712
2014-01-07 21:55:00 +00:00
Jason Molenda 5a87c0fb37 Update the checks in EmulateInstructionARM::GetFramePointerRegisterNumber
and EmulateInstructionARM::GetFramePointerDWARFRegisterNumber to recognize
the Apple arm convention (of using r7 for the frame pointer, regardless of
thumb or arm) even if the OS does not match Darwin/MacOSX/iOS.  Also 
corrects the behavior for thumb code on non-Apple platforms.
<rdar://problem/14661537> 

llvm-svn: 198648
2014-01-06 23:39:35 +00:00
Todd Fiala fb10118bfa Fix lldb build break due to TypedefNameDecl member signature change.
Patch by Steve Pucci.

llvm-svn: 198635
2014-01-06 20:25:42 +00:00
Jason Molenda 83f1149b30 Use Address::SetLoadAddress() instead of SectionLoadList::ResolveLoadAddress().
The former will set the Address object's offset to the load address value if
it is not present in any section; the latter will only set the Address object
if the load addr is contained in one of its sections.
<rdar://problem/15135987> 

llvm-svn: 198469
2014-01-04 01:37:52 +00:00
Jason Molenda 4b79247750 Don't enforce ABI stack alignment rules on the sigtramp frame --
its stack frame is a constructed, fake thing that may not conform
correctly to these rules.  This fixes a problem where lldb couldn't
backtrace past an asynchronous signal handler (_sigtramp) frame on
a stack on Mac OS X.
<rdar://problem/15035673> 

llvm-svn: 198450
2014-01-03 22:06:25 +00:00
Jason Molenda 1b101ef364 Fix a mistake in the last change I made to ProcessMachCore.cpp.
<rdar://problem/15745397> 

llvm-svn: 198447
2014-01-03 20:46:16 +00:00
Jean-Daniel Dupas de5094ba00 Fix a couple of memory leaks.
llvm-svn: 198178
2013-12-29 20:18:15 +00:00
Jean-Daniel Dupas c6f26f8542 Stop leaking MCRegisterInfo.
llvm-svn: 198177
2013-12-29 20:17:26 +00:00
Enrico Granata 30f287fde5 Add a new way to bind a format to a type: by enum type
The "type format add" command gets a new flag --type (-t). If you pass -t <sometype>, upon fetching the value for an object of your type,
LLDB will display it as-if it was of enumeration type <sometype>
This is useful in cases of non-contiguous enums where there are empty gaps of unspecified values, and as such one cannot type their variables as the enum type,
but users would still like to see them as-if they were of the enum type (e.g. DWARF field types with their user-reserved ranges)

The SB API has also been improved to handle both types of formats, and a test case is added

llvm-svn: 198105
2013-12-28 08:44:02 +00:00
Enrico Granata cb0c85e166 Fix sidebar links
llvm-svn: 198039
2013-12-26 07:23:52 +00:00
Enrico Granata 0e0e9f531f Adding a document that describes the architecture of data formatters. Suggestions and ideas for improvements most welcome
llvm-svn: 198038
2013-12-26 07:21:41 +00:00
Jason Molenda 703a45616c Add a new setting (currently fixed) for how to
interpret core files that contain both a user
process dyld and a kernel executable in them.
Fix an additional method that needs to be 
adjusted depending on this preference as well.
<rdar://problem/15721409> 

llvm-svn: 197931
2013-12-24 02:57:50 +00:00
Jean-Daniel Dupas 9c517c0dd9 Remove wait_for_launch parameter from DoAttachToProcessWithName(). This parameter is redundant as this information is already provided by the ProcessAttachInfo parameter.
CC: lldb-commits

Differential Revision: http://llvm-reviews.chandlerc.com/D2463

llvm-svn: 197923
2013-12-23 22:32:54 +00:00
Ed Maste 4d31d5499f Add decorator for GDB connect test failing on FreeBSD
llvm.org/pr18313

llvm-svn: 197910
2013-12-23 15:22:07 +00:00
Enrico Granata 4939b98a2c Centralize the code for GetValueAsCString() in TypeFormatImpl (the implementing class of "type format ...")
TypeFormatImpl used to just wrap a Format (and Flags for matching), and then ValueObject itself would do the printing deed
With this checkin, the responsibility of generating a value string is centralized in the data formatter (as it should, and already is for summaries) 

This change is good practice per se, and should also enable us to extend the type format mechanism in a cleaner way

llvm-svn: 197874
2013-12-22 09:24:22 +00:00
Enrico Granata 16f35ea9bb <rdar://problem/14822563> - Do not attempt to use a null VariableList or crashes will ensue
llvm-svn: 197862
2013-12-21 08:44:28 +00:00
Enrico Granata 0c0f9dcd91 Add a new-line
llvm-svn: 197860
2013-12-21 08:24:28 +00:00
Enrico Granata 922dd82e09 The one-line printing facility is used by StringSummaryFormat, but that's no reason to have it be part of the public interface of ValueObjectPrinter
That's what friendship is for

llvm-svn: 197859
2013-12-21 08:19:44 +00:00
Enrico Granata 473316f4ea There is no need to use the expression parser to generate true and false - writing in a buffer is good enough
llvm-svn: 197858
2013-12-21 08:09:49 +00:00
Jason Molenda c62bd7bd24 Any time ProcessGDBRemote tries to get the remote's ProcessArchitecture,
it needs to fall back to using the HostArchitecture if a valid one is not
returned.  When doing low-level system debugging we may not have a process
(or the remote stub may not support the qProcessInfo packet) in which case
we should fall back to the architecture we determined via qHostInfo.
<rdar://problem/15713180> 

llvm-svn: 197857
2013-12-21 05:20:36 +00:00
Sean Callanan fd1ca95331 Harden the Objective-C runtime against weird method
signatures.

<rdar://problem/15631996>

llvm-svn: 197843
2013-12-20 23:07:12 +00:00
Sean Callanan 439dcae4a2 Updated our IR processing to reflect best practices
for making pointer-valued constants.

llvm-svn: 197829
2013-12-20 19:55:02 +00:00
Enrico Granata cbbaf7585f All data formatters come in "match exact" and "match regex" styles
This refactoring makes it less error-prone to define formatter types with the correct match schemes

llvm-svn: 197800
2013-12-20 11:32:26 +00:00
Enrico Granata b72a501d86 FormatNavigator has long stopped navigating anything - the generation of possible formatters matches is now done elsewhere
So, rename the class for what it truly is: a FormattersContainer
Also do a bunch of related text substitutions in the interest of overall naming clarity

llvm-svn: 197795
2013-12-20 09:38:13 +00:00
Sean Callanan f4c0a221bc Fixed the AST importer to ensure that base classes
of Objective-C classes are completed, and that
variables of Objective-C types have their types
completed when the variables are reported.

This fixes a long-standing issue where ivars did
not show up correctly on 32-bit OS X.

<rdar://problem/12184093> 

llvm-svn: 197775
2013-12-20 04:09:05 +00:00
Sean Callanan 090e11975d Adjust to the new way LLVM emits modules: it doesn't
specify a pointer size until code gen.  So we just
make all our pointer-sized integer literals 64-bit.
That doesn't seem to hurt anything.

llvm-svn: 197774
2013-12-20 04:07:43 +00:00
Jason Molenda 3d21975a44 Partially revert a patch from Ashok Thirumurthi in r191430.
The original code was not completely correct, but a form of
this check is necessary to avoid an infinite recursion on
some unwind cases where a function unwinds to itself with the
same CFA.  Ashok thought the recursion would be caught in
RegisterContextLLDB but this one isn't - we still need it here.
<rdar://problem/15664282> 

llvm-svn: 197761
2013-12-20 01:05:11 +00:00
Jason Molenda 91e428bc90 Revert one part of Ashok Thirumurthi's patch from September 16, r190812.
In those set of patches, Ashok changed Module::ResolveSymbolContextForAddress 
so that if it failed to find a symbol for a pc, it could back up
the pc value by 1 and re-search for a symbol.

His change to RegisterContextLLDB.cpp partially duplicates that
behavior but it also removes the separate case where we find a
Symbol for the pc address but it's the wrong symbol -- we need to
handle this as well as the lookup-by-pc-finds-no-symbol case.

The most obvious fallout from this regression was that lldb on
Mac OS X couldn't backtrace past __assert_rtn() which tail-calls 
abort().  e.g.

(lldb) bt
* thread #1: tid = 0x5d6ea1, 0x00007fff8ee80866 libsystem_kernel.dylib`__pthread_kill + 10, queue = 'com.apple.main-thread', stop reason = signal SIGABRT
  * frame #0: 0x00007fff8ee80866 libsystem_kernel.dylib`__pthread_kill + 10
    frame #1: 0x00007fff8eb5835c libsystem_pthread.dylib`pthread_kill + 92
    frame #2: 0x00007fff8852ab1a libsystem_c.dylib`abort + 125
    frame #3: 0x00007fff884f49bf libsystem_c.dylib`__assert_rtn + 321
    frame #4: 0x0000000100000f2c a.out`main + 124

(lldb) dis -c 3 -s 0x7fff884f49b3
libsystem_c.dylib`__assert_rtn + 309:
   0x7fff884f49b3:  movq   %rax, -0x11b96242(%rip)   ; gCRAnnotations + 8
   0x7fff884f49ba:  callq  0x7fff8854fd2c            ; symbol stub for: abort

libsystem_c.dylib`basename:
   0x7fff884f49bf:  pushq  %rbp
(lldb) 

in this case, __assert_rtn() is immediately followed by basename() and 
the changes in r190812 didn't back up the pc value to get the correct
function name / unwind info.

<rdar://problem/15367233> 

llvm-svn: 197655
2013-12-19 04:32:42 +00:00
Han Ming Ong 4b5a63cd54 <rdar://problem/15639995>
Allow the root XPC launcher to launch any target as root.

llvm-svn: 197634
2013-12-19 00:35:40 +00:00
Jason Molenda 23f2fcaed8 Fix return type of ReadLibdispatchOffsetsAddress.
llvm-svn: 197632
2013-12-19 00:10:23 +00:00
Jason Molenda 4a5ec88f0d Fix std::string initialization in Queue ctor.
<rdar://problem/15694319> 

llvm-svn: 197631
2013-12-19 00:09:13 +00:00
Jason Molenda 64de91522f Code reorganization in PlatformDarwin for how the libdispatch
offsets structure is read & saved in the platform object -- soon
we'll be getting more than the queue name offset out of this
structure so we'll need to reuse the information in other methods.

llvm-svn: 197620
2013-12-18 22:52:34 +00:00
Ed Maste 48f986faee Workaround QEMU GDB server issue.
During testing I observed QEMU send "$T02thread:01;#04" upon connection,
before any command from LLDB.  This change from gclayton accepts (and
discards) a packet immediately after sending the initial ack, to flush
the GDB remote pipeline.

llvm-svn: 197579
2013-12-18 15:31:45 +00:00
Greg Clayton 6b32f1ec18 <rdar://problem/15668743>
Fixed a crasher that would only occur if Xcode attaches to a remote process first, then launches. 

llvm-svn: 197546
2013-12-18 02:06:45 +00:00
Jason Molenda eadd2cb459 When ProcessMachCore::DoLoadCore() finds *BOTH* a user process dyld and a mach kernel
binary, change to prefer the mach kernel binary by default.

llvm-svn: 197545
2013-12-18 01:56:30 +00:00
Jim Ingham a6195b732d Fix a bug introduced in asynchronous packet sends. We were not setting the packet result, and so
it looked like the async packet send always failed.

<rdar://problem/15657157>

llvm-svn: 197543
2013-12-18 01:24:33 +00:00
Jason Molenda b97f44d9ef Fix how Queue/QueueItem weak pointers are initialized in the ctors.
llvm-svn: 197541
2013-12-18 00:58:23 +00:00
Greg Clayton 2553e49a5d Added missing header files to the Xcode project.
llvm-svn: 197527
2013-12-17 21:42:58 +00:00
Todd Fiala 3d782a5410 Test commit: added comment to tools makefile.
Comment indicates where linux x86_64 lldb-gdbserver
will soon be added to Makefile builds.

llvm-svn: 197318
2013-12-14 07:21:51 +00:00
Jason Molenda c8064ac626 Move the ivars / logic of SBQueue into a QueueImpl class and
change SBQueue to have a shared pointer to its corresponding
QueueImpl object for binary compatibility.
<rdar://problem/15657926> 

llvm-svn: 197300
2013-12-14 01:14:45 +00:00
Greg Clayton c694751a06 Correctly set the working directory when launching processes for both local and remote targets.
llvm-svn: 197266
2013-12-13 19:18:59 +00:00
Greg Clayton 8e9026eee2 Remove #include "lldb/Core/Address.h" from SBQueueItem.h.
llvm-svn: 197265
2013-12-13 19:16:52 +00:00
Greg Clayton 67690bb098 There can be no #includes of and internal headers in lldb::SB* classes, only "lldb/API/SB*" and "lldb/lldb*" headers.
llvm-svn: 197264
2013-12-13 19:14:12 +00:00
Greg Clayton b09c5384b0 Centralized the launching of a process into Target::Launch()
While investigating test suite failures when running the test suite remotely, I noticed we had 3 copies of code that launched a process:
1 - in "process launch" command 
2 - SBTarget::Launch() with args
3 - SBTarget::Launch() with SBLaunchInfo

"process launch" was launching through the platform if it was supported (this is needed for remote debugging) and the 2 and 3 were not.

Now all code is in one place.

llvm-svn: 197247
2013-12-13 17:20:18 +00:00
Sylvestre Ledru a4cc7dec70 Fixes an issue where a signum => name mapping function has multiple case statements that define to the same integral value on my Linux (Ubuntu 12.04, x86_64). It's for SIGIO and SIGPOLL.
In the case that they are both defined the same.
Patch by Todd Fiala (but typos are mine)

llvm-svn: 197221
2013-12-13 09:51:39 +00:00
Greg Clayton d3b16b3c03 Fixed the size of the malloc buffer to match the size of the string that is memcpy'ed so we don't crash in a fiery ball of death when running the test suite on darwin.
llvm-svn: 197200
2013-12-13 02:02:44 +00:00
Greg Clayton 25eec2cc75 Fix to only update the offset for concrete registers (ones that don't have 'slice' or 'composite' key/value pairs).
llvm-svn: 197191
2013-12-13 00:35:21 +00:00
Jason Molenda 5e8dce4dbf Add new Queue, QueueItem, Queuelist, SBQueue, SBQueueItem classes to represent
libdispatch aka Grand Central Dispatch (GCD) queues.  Still fleshing out the
documentation and testing of these but the overall API is settling down so it's
a good time to check it in.
<rdar://problem/15600370> 

llvm-svn: 197190
2013-12-13 00:29:16 +00:00
Greg Clayton 5d9cd184e6 Remove stuff from debugserver Xcode project that didn't belong.
llvm-svn: 197188
2013-12-12 23:45:07 +00:00
Han Ming Ong 3a7c3d1bf8 <rdar://problem/15639995>
debugserver's launch info was cleared unnecessarily. It has important user ID set. Reviewed by Greg Clayton.

llvm-svn: 197182
2013-12-12 22:14:52 +00:00
Ed Maste ccc2ebcc83 test: Skip failure on FreeBSD from test infrastructure issue
test_convenience_registers_16bit_with_process_attach fails due to
pr18200.  The test has a @expectedFailureFreeBSD decorator, but it
appears this does not catch a RuntimError exception raised in the test
infrastructure, so the test still reports failure.  For now just skip
it.

llvm-svn: 197174
2013-12-12 20:26:08 +00:00
Jean-Daniel Dupas 13698b2714 Don't try to guess sys header conditions, and simply check if each signal is defined.
CC: lldb-commits

Differential Revision: http://llvm-reviews.chandlerc.com/D2394

llvm-svn: 197173
2013-12-12 18:12:16 +00:00
Greg Clayton b73a31efe6 Pickup fixes for demangling crashers.
<rdar://problem/15600471>

llvm-svn: 197171
2013-12-12 17:39:39 +00:00
Sylvestre Ledru 6215685ab9 sin_len is not available in the structure sockaddr_in under GNU/Linux. Fix the build failure. Patch by Todd Fiala (and many other who proposed similar patches)
llvm-svn: 197155
2013-12-12 13:45:47 +00:00
Jean-Daniel Dupas b2065ecdd6 Remove useless includes
llvm-svn: 197147
2013-12-12 11:52:05 +00:00
Greg Clayton 4705f8d842 LLDB can crash if given DWARF debug info for a class that has a base class which isn't a complete definition.
<rdar://problem/15594781>

We need to not crash at any cost. We currently detect if any base classes are forward declarations, emit an error string that directs the use to file a compiler bug, and continues by completing the class with no contents. This avoids a clang crash that would usually follow when we call setBase().

llvm-svn: 197108
2013-12-12 01:54:04 +00:00
Enrico Granata 601ec50ac9 Actually initialize the magic pointer to NULL safely
llvm-svn: 197107
2013-12-12 01:47:35 +00:00
Enrico Granata 739050236e Having binary files in a repository is not a good thing
With this checkin, we use the installed clang compiler to build crashinfo.so from crashinfo.c upon every test suite execution
We also try to cleanup after ourselves, which of course will only work if the test suite does not actually crash

llvm-svn: 197106
2013-12-12 01:42:17 +00:00
Enrico Granata 2c3f140551 <rdar://problem/15640353>
Add an hook for the test suite into the OSX-only CrashReporter "App-specific info"

This allows the test suite to set the crash info to the name and file location of every test as the test gets executed
If the test suite crashes, the crash log will then report which test is the culprit, even when not using verbose mode

This only works on OSX, and defaults to not doing anything on other platforms, but OS/platform-specific invocations
can be devised by each individual platform

llvm-svn: 197095
2013-12-12 00:02:05 +00:00
Greg Clayton 78f4d95d09 Fixed parsing the DW_TAG_member children for structs, unions and classes to not alway treat every member as a bitfield.
The previous fix for bitfields made us always search for anonymous bitfields regardless of the member (bitfield or normal field).

llvm-svn: 197088
2013-12-11 23:10:39 +00:00
Greg Clayton 7cff313335 Make this test an expected fail on darwin until we can fix this bug.
llvm-svn: 197087
2013-12-11 23:08:25 +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
Ed Maste 30df85e67f Fix Linux by partially reverting 196787
llvm-svn: 197065
2013-12-11 20:43:27 +00:00
Greg Clayton 4570d3eba0 Massive test suite cleanup to stop everyone from manually having to compute "mydir" inside each test case.
This has led to many test suite failures because of copy and paste where new test cases were based off of other test cases and the "mydir" variable wasn't updated.

Now you can call your superclasses "compute_mydir()" function with "__file__" as the sole argument and the relative path will be computed for you. 

llvm-svn: 196985
2013-12-10 23:19:29 +00:00
Greg Clayton eeb15653c6 Fix the test suite after the changes made in revision 196616 exposed issues in the test suite.
We must make sure that all ValueObject objects always contain a valid target.

llvm-svn: 196983
2013-12-10 23:16:40 +00:00
Greg Clayton d30ed41c13 Revert change I didn't mean to check in.
llvm-svn: 196956
2013-12-10 19:44:41 +00:00
Greg Clayton c93068b54f Add the "--unix-socket" opton back as it was being used.
<rdar://problem/15622900>

llvm-svn: 196952
2013-12-10 19:36:45 +00:00
Greg Clayton 765d2e234c Fix autocompletion for multi-word commands.
<rdar://problem/14183288>

llvm-svn: 196949
2013-12-10 19:14:04 +00:00
Ed Maste 8f46ed79bd test: Skip register test hanging on FreeBSD buildbot
llvm-svn: 196941
2013-12-10 18:35:19 +00:00
Sylvestre Ledru a7830a47f1 As consistency, invoke python with /usr/bin/env (like it is done in the rest of the file). Thanks to Xavier De Gaye for the patch
llvm-svn: 196933
2013-12-10 16:51:35 +00:00
Ed Maste 0508125cd4 test: FreeBSD calls the 64-bit x86 platform amd64
Also add decorator for an issue that this uncovered: llvm.org/pr18200

llvm-svn: 196920
2013-12-10 14:25:28 +00:00
Ed Maste 687a0c043a test: Fix match string to work with st0 or stmm0
llvm-svn: 196919
2013-12-10 14:20:50 +00:00
Jean-Daniel Dupas 7782de923e Remove 'const' constraint on ProcessLaunchInfo parameter in Process::DoLaunch().
This 'const' is not required and prevent us to defer the launch to the Host layer.

llvm-svn: 196837
2013-12-09 22:52:50 +00:00
Ed Maste 8958af36c1 Fix Linux build after r196787
Patch from Xavier de Gaye

llvm-svn: 196830
2013-12-09 22:34:49 +00:00
Ed Maste 90359963ab Handle endianness in the Opcode class
Previously, an opcode set via SetOpcode32 (for example) was later
extracted via GetData() as a byte sequence in host order rather than
target order.

Review: http://llvm-reviews.chandlerc.com/D1838
llvm-svn: 196808
2013-12-09 19:45:33 +00:00
Jean-Daniel Dupas e5f4780d9b Replace 'mkdir' shell invocation by native function call.
Summary: Now that Host provide a MakeDirectory function, we can use it instead of relying on command line tool to create a directory.

CC: lldb-commits

Differential Revision: http://llvm-reviews.chandlerc.com/D2356

llvm-svn: 196801
2013-12-09 19:16:14 +00:00
Jean-Daniel Dupas 59ceb0440e Update cmake build instruction to compile LLVM in C++11 mode
Thanks to Xavier de Gaye for the pointer.

llvm-svn: 196794
2013-12-09 18:13:47 +00:00
Ed Maste 1d981a9606 test: Update decorators for FreeBSD failures with threaded inferior support
llvm.org/pr18190
llvm.org/pr18191

llvm-svn: 196792
2013-12-09 17:27:18 +00:00
Ed Maste 10565b61d5 FreeBSD and NetBSD have sa_len in struct sockaddr
llvm-svn: 196790
2013-12-09 16:07:11 +00:00
Ed Maste 7fd845cc9d Threaded inferior support for FreeBSD
Modelled in part on GDBRemoteCommunicationClient.

Review: http://llvm-reviews.chandlerc.com/D2267
llvm-svn: 196787
2013-12-09 15:51:17 +00:00
Ed Maste f369dba051 test: Add annotation for FreeBSD failures w/ threaded inferiors
llvm.org/pr17944
llvm.org/pr17946

llvm-svn: 196786
2013-12-09 15:25:37 +00:00
Ed Maste a4786e0d92 Add decorator for FreeBSD watchpoint failure
llvm.org/pr16706

llvm-svn: 196781
2013-12-09 14:24:09 +00:00
Ed Maste 991fe6c701 Fix Debian GNU/kFreeBSD build
Use the same LaunchProcessPosixSpawn as on FreeBSD and Linux.

llvm-svn: 196742
2013-12-09 01:35:42 +00:00
Jim Ingham b44af8ff25 If the StepThrough plan makes it back to the frame in which it started, it should say
it succeeded, since the plan that was using it can figure out what to do from there.
It should only say it failed if it truely went off into the weeds.

<rdar://problem/15597807>

llvm-svn: 196631
2013-12-07 01:17:30 +00:00
Jean-Daniel Dupas 870c011de5 Replace the last auto_ptr by unique_ptr
llvm-svn: 196625
2013-12-06 23:38:05 +00:00
Sylvestre Ledru c061cceed2 Fixed Makefile-based install to place python packages in the LLDB install tree.
Failure to install python packages now fails the make install.
This patch properly handles the optional DESTDIR variable.

Patch by Todd Fiala

llvm-svn: 196624
2013-12-06 23:16:23 +00:00
Jim Ingham 793d8d9c00 Do a little more prevention against SBValues getting used after the world has been torn down around them.
llvm-svn: 196616
2013-12-06 22:21:04 +00:00
Greg Clayton fb6621ef4b Add a setting to allow users to enable expressions that crash LLDB to show up in crash logs.
<rdar://problem/11549320> 

llvm-svn: 196613
2013-12-06 21:59:52 +00:00
Greg Clayton 3dedae12b5 Fixed the GDBRemoteCommuncation to return a new GDBRemoteCommuncation::PacketResult enum for all packet sends/receives.
<rdar://problem/15600045>

Due to other recent changes, all connections to GDB servers that didn't support the "QStartNoAckMode" packet would cause us to fail to attach to the remote GDB server.

The problem was that SendPacket* and WaitForResponse* packets would return a size_t indicating the number of bytes sent/received. The other issue was WaitForResponse* packets would strip the leading '$' and the trailing "#CC" (checksum) bytes, so the unimplemented response packet of "$#00" would get stripped and the WaitForResponse* packets would return 0.

These new error codes give us flexibility to to more intelligent things in response to what is returned. 

llvm-svn: 196610
2013-12-06 21:45:27 +00:00
Greg Clayton d629980ab3 Replace all in_port_t with uint16_t to avoid compilation issues on different systems.
llvm-svn: 196586
2013-12-06 17:46:35 +00:00
Jean-Daniel Dupas 3cfa8e217e Typo in comments
llvm-svn: 196577
2013-12-06 09:35:53 +00:00
Jean-Daniel Dupas 89d910c397 Tell CMake about the SystemRuntime plugin.
This fixes CMake build on Darwin.

llvm-svn: 196575
2013-12-06 09:32:46 +00:00
Arnaud A. de Grandmaison 223bda22f4 Tell CMake about recently added SectionLoadHistory.cpp
llvm-svn: 196566
2013-12-06 08:49:14 +00:00
Greg Clayton d5944cd118 For logical backtrace work, lldb needs to track Module unloads etc & symoblicate an address based on a point in time
<rdar://problem/15314403> 

This patch adds a new lldb_private::SectionLoadHistory class that tracks what shared libraries were loaded given a process stop ID. This allows us to keep a history of the sections that were loaded for a time T. Many items in history objects will rely upon the process stop ID in the future.

llvm-svn: 196557
2013-12-06 01:12:00 +00:00
Greg Clayton 00fe87b488 Modified local spawning in debugserver processes to use a new --reverse-connect option so that debugserver actually connects back to LLDB instead of LLDB connecting to debugserver.
This gets rid of our hacky "get_random_port()" which would grab a random port and tell debugserver to open that port. Now LLDB creates, binds, listens and accepts a connection by binding to port zero and sending the correctly bound port down as the host:port to connect back to.

Fixed the "ConnectionFileDescriptor" to be able to correctly listen for connections from a specified host, localhost, or any host. Prior to this fix "listen://" only accepted the following format:

listen://<port>

But now it can accept:

listen://<port>         // Listen for connection from localhost on port <port>
listen://<host>:<port>  // Listen for connection from <host> and <port>    
listen://*:<port>       // Listen for connection from any host on port <port>

llvm-svn: 196547
2013-12-05 22:58:22 +00:00
Greg Clayton 1251456028 Added two new test case decorator functions: @skipIfRemote and @skipIfRemoteDueToDeadlock.
@skipIfRemote is used to decorate test cases that don't make sense to run remotely.

@skipIfRemoteDueToDeadlock indicates these tests need to be looked at and currently deadlock the running of the test suite when run on remote systems. These issues should be fixed soon.

llvm-svn: 196543
2013-12-05 22:22:32 +00:00
Jean-Daniel Dupas 0fefa67606 Extends StringExtractorGDBRemote to support debugger packets.
CC: lldb-commits

Differential Revision: http://llvm-reviews.chandlerc.com/D2337

llvm-svn: 196525
2013-12-05 19:25:45 +00:00
Sylvestre Ledru 13b0fba48b Revert: "Patch from Todd Fiala that install the lldb.py module in the prefix directory and also makes install fail if the prefix directory can't be accessed"
Does not respect the prefix

llvm-svn: 196499
2013-12-05 12:51:47 +00:00
Sylvestre Ledru 34efb6aee1 Fix the build failure of lldb wrt clang recent change. Patch by Todd Fiala
llvm-svn: 196483
2013-12-05 07:55:40 +00:00
Enrico Granata 315133710d Provide an easy way for synthetic child provider front ends to declare themselves “invalid”
This is not being used yet, and in practice, more refactoring would be required to make this fully practical
In practice, the way this should work is that CalculateNumChildren(), GetChildAtIndex(), GetIndexOfChildWithName() and MightHaveChildren() should all default to failure values when m_valid == false. Update() should be the only function actually setting/clearing the flag upon inspecting the backend ValueObject, if it determines it to be in an incongruent state
Given refactoring of the FrontEnd APIs, this work could be automatically performed without the individual providers having to replicate this logic
The way this works now is that each front end picks one or more “key ivars” and keys off those to detect invalidity
This is a baby step 0 to a better world

llvm-svn: 196452
2013-12-05 01:25:20 +00:00
Greg Clayton 8fbbb5b421 Patch from Todd Fiala that install the lldb.py module in the prefix directory and also makes install fail if the prefix directory can't be accessed
llvm-svn: 196413
2013-12-04 21:27:40 +00:00
Greg Clayton dbf0457a7b Allow the hostname to be specified when asking a platform to launch another debugserver in case you want to change it.
The GDB server remote platform how has the debugserver that are launched on iOS devices to use localhost due to the use of a USB mux.

llvm-svn: 196405
2013-12-04 19:40:33 +00:00
Greg Clayton c8b38d3389 Enable POSIX_SPAWN_CLOEXEC_DEFAULT (a darwin specific flag) when available when using posix_spawn to spawn processes to close all file handles.
llvm-svn: 196404
2013-12-04 19:38:57 +00:00
Greg Clayton 7749514293 Remove log line that was left in accidentally.
llvm-svn: 196403
2013-12-04 19:37:53 +00:00
Greg Clayton 91a9b247d4 Switch local launching of debugserver over to always use a FIFO in order to handshake with the launched debugserver.
This helps ensure that the launched debugserver is ready and listening for a connection. Prior to this we had a race condition.

Consolidate the launching of debugserver into a single place: a static function in GDBRemoteCommunication.

llvm-svn: 196401
2013-12-04 19:19:12 +00:00
Greg Clayton c6931fcf49 Added a new directory type for the "bool Host::GetLLDBPath (PathType path_type, FileSpec &file_spec)" function: ePathTypeLLDBTempSystemDir
This will get the temporary directory on the current system.

Removed a call to tmpnam() and replaced it with a call to mktemp() using a template that will be in the temp directory.

llvm-svn: 196397
2013-12-04 18:53:50 +00:00
Ed Maste ea66007938 Correct header guard #endif comments
llvm-svn: 196381
2013-12-04 13:41:18 +00:00
Jason Molenda 135e55f8f3 Fix log message for new invalidation checks in PlanValidAtAddress().
Thanks to Ed and Greg for catching the incorrect logging statements.

llvm-svn: 196322
2013-12-03 21:59:39 +00:00
Greg Clayton 2ec3db36f5 Updated the build settings for lldb-platform and lldb-gdbserver to include libxml2.
llvm-svn: 196320
2013-12-03 21:12:28 +00:00
Greg Clayton fd9acf6a48 Fix test to compile and run on iOS.
llvm-svn: 196313
2013-12-03 20:55:25 +00:00
Greg Clayton fa3082e728 Fixed up the framework includes to all be done in the extra linker options. We had a mix where some were being included via Xcode GUI and some were done in the extra linker flags.
llvm-svn: 196309
2013-12-03 19:41:45 +00:00
Greg Clayton aec167d79e Remove print statement when successfully setting the platform's working directory.
llvm-svn: 196308
2013-12-03 19:22:45 +00:00
Greg Clayton c6b26f0545 <rdar://problem/15566148>
Fix use of std::lower_bound to check for equality if a match is found to ensure we don't return the next breakpoint with an ID greater than the break_id that was asked for.

llvm-svn: 196298
2013-12-03 17:50:20 +00:00
Jason Molenda 977a191e5d #include <Python.h>, not <Python/Python.h>. The latter results in
the build being broken for people using the public Mac OS X 10.9 SDK, 
which does not have the Python framework any longer.  The Xcode project
file already sets the -I and -L flags correctly so that <Python.h> and
-lpython will work correctly with the system's installed Python.

llvm-svn: 196259
2013-12-03 09:01:57 +00:00
Jason Molenda 61cd0729bb Build up UnwindPlan::PlanValidAtAddress to recognize some general
indications that the UnwindPlan is invalid -- for instance, a
complete lack of rows, or a row that fails to define a register to
base the CFA off of.
<rdar://problem/15246247> 

llvm-svn: 196201
2013-12-03 04:46:27 +00:00
Jim Ingham 177553e4c0 Remove the bad assumption that breakpoint locations won't get deleted in BreakpointLocationList::FindByID.
<rdar://problem/15566148>

llvm-svn: 196197
2013-12-03 02:31:17 +00:00
Enrico Granata d28f5a54d9 A few more details on the DataVisualization class in our architectural doc. It is in dire need of expansion, but this is a start at least.
llvm-svn: 196176
2013-12-03 00:30:22 +00:00
Ed Maste 0471dcd274 Fix build on FreeBSD after r196141
This should probably be replaced with build infrastructure support for
a platform-specific canonical Python include path, but for now it should
restore the FreeBSD buildbot.

llvm-svn: 196167
2013-12-02 22:54:15 +00:00
Ed Maste f44e3cd7f1 Ensure parsed debug arange data is sorted
llvm.org/pr18114

llvm-svn: 196146
2013-12-02 20:16:30 +00:00
Greg Clayton 5fb8f79738 Fixed internal code to not link against and code from "lldb/API/*".
lldb_private::Debugger was #including some "lldb/API" header files which causes tools (lldb-platform and lldb-gdbserver) that link against the internals only (no API layer) to fail to link depending on which calls were being used.

Also fixed the current working directory so that it gets set correctly for remote test suite runs. Now the remote working directory is set to: "ARCH/TESTNUM/..." where ARCH is the current architecture name and "TESTNUM" is the current test number. 

Fixed the "lldb-platform" and "lldb-gdbserver" to not warn about mismatched visibility settings by having each have their own exports file which contains nothing. This forces all symbols to not be exported, and also quiets the linker warnings.

llvm-svn: 196141
2013-12-02 19:35:49 +00:00
Jean-Daniel Dupas 48a6060c2c Request for review: Fix build-llvm.pl
Summary:
- Stop to try to rebuild llvm on each invocation by removing the invalid library entry libLLVMArchive.a which no longer exists.
- Remove the useless ranlib invocation. "libtools -static" automatically takes care of the archive table of content.

CC: lldb-commits

Differential Revision: http://llvm-reviews.chandlerc.com/D2296

llvm-svn: 196128
2013-12-02 18:32:35 +00:00
Ed Maste c113ff8cba elf: Move elf note parsing to ObjectFileELF.cpp
Separate ELF note implementations were introduced for core files and
GNU build-id.  Move the more general one from elf-core to ObjectFileELF
and use it for build-id as well.

Review: http://llvm-reviews.chandlerc.com/D1902
llvm-svn: 196125
2013-12-02 17:49:13 +00:00
Ed Maste 094e1653cb test: Decorators for pr17910
A number of tests fail to build on FreeBSD because the test build script
defaults to libstdc++ for clang.  On FreeBSD the libstdc++ is rather old
and libc++ should be used instead.

(These tests previously had an @expectedFailureFreeBSD decorator for
pr16696, the umbrella PR for the lack of threaded inferior support on
FreeBSD.  The work to add that support will be committed soon.)

llvm-svn: 196101
2013-12-02 14:26:57 +00:00
Sylvestre Ledru 3b5b16cdff Also silent -Wno-cast-qual in the SWIG Python wrapper. Remove a huge number of warnings
llvm-svn: 195930
2013-11-28 18:11:34 +00:00
Colin Riley 909bb7a3f4 Fix MSVC build
Added _WIN32 guards to new platform features. Using correct SetErrorStringWithFormat within Host when LLDB_DISABLE_POSIX is defined. Also fixed an if defined block.

llvm-svn: 195766
2013-11-26 15:10:46 +00:00
Ed Maste 0d092a446b Add decorator for FreeBSD failing test due to pr18061
The test code locks mutexes from one thread and unlocks them from a
different one, which is not valid (it's either undefined behaviour or is
required to return an error).

See http://pubs.opengroup.org/onlinepubs/9699919799/functions/pthread_mutex_lock.html

llvm-svn: 195707
2013-11-26 01:11:14 +00:00
Ed Maste 82a0005b21 Fix compile warnings
llvm-svn: 195685
2013-11-25 21:15:53 +00:00
Ed Maste 426285bfad Remove unused variable
llvm-svn: 195683
2013-11-25 20:48:07 +00:00
Ed Maste ac7270b56b Correct a standalone debug file path
For a file /bin/ls with a .gnu_debuglink entry of "ls.debug" the path
should be /usr/lib/debug/bin/ls.debug, not /usr/lib/debug/bin/ls.

ref: https://sourceware.org/gdb/onlinedocs/gdb/Separate-Debug-Files.html

llvm.org/pr17903
http://llvm-reviews.chandlerc.com/D2169

llvm-svn: 195681
2013-11-25 20:33:56 +00:00
Ed Maste 3fe7186a1b Remove redundant assignment
llvm-svn: 195664
2013-11-25 17:16:34 +00:00
Ed Maste a2b2465e45 test: Fix punctuation in exceptions for log env vars
The Exception text was missing a closing parenthesis, and for consistency
with other Exceptions it should not end with a period.

llvm-svn: 195659
2013-11-25 16:57:16 +00:00
Ed Maste 6cf5b8f18c Fix issue from r166732 found by Andrew Kaylor
From Jim Ingham's email:
  It does look like ThreadPlanStepInRange test is some kind of thinko.
  In practice, in this case it is probably safe to run only one thread
  when doing the "step through" since that generally involved running
  from a shared library stub to its target.  That could deadlock if the
  dynamic loader has to fix up the symbol, and another thread is in the
  middle of doing that.  But that doesn't seem to be very common, or at
  least the code is clearly wrong but I haven't had any reports of this
  causing deadlocks...

llvm-svn: 195657
2013-11-25 16:36:47 +00:00
Ed Maste 502f9020a7 PT_CONTINUE and PT_STEP are process-scope on FreeBSD
Although ptrace() can be passed a PID or TID for PT_CONTINUE and PT_STEP,
the kernel operates on all threads in the process in both cases.  (See
the FOREACH_THREAD_IN_PROC in FreeBSD's sys_process.c:kern_ptrace.)

Make this clear by using the PID from the ProcessMonitor instance.

llvm-svn: 195656
2013-11-25 16:31:23 +00:00
Ed Maste 07b8d259dd test: Add decorator for FreeBSD watchpoint failure
Watchpoints have not yet been implemented for FreeBSD.
llvm.org/pr16706

llvm-svn: 195649
2013-11-25 15:38:26 +00:00
Jason Molenda 906f329724 Change lldb from building against a Python framework out of
the installed SDK to using the current OS installed headers/libraries.
This change is to address the removal of the Python framework
from the Mac OS X 10.9 (Mavericks) SDK, and is the recommended
workaround via https://developer.apple.com/library/mac/technotes/tn2328/_index.html

llvm-svn: 195557
2013-11-23 20:07:29 +00:00
Jason Molenda 612cb6ef2b Add --enable-cxx11 to llvm builds. As of r195239, SmallPtrSet.h /
SmallPtrSet.cpp use different methods if SmallPtrSet.h is included
in C++11 mode.  Building llvm in C++03 mode and lldb in C++11 mode
resulted in a link-time failure with the C++11-mode-specific method
not being found in the llvm build.

llvm-svn: 195544
2013-11-23 04:59:07 +00:00
Greg Clayton 5c6eab21eb Removed printf and puts calls that were left in accidentally.
llvm-svn: 195542
2013-11-23 02:01:06 +00:00
Greg Clayton fb90931b60 Improved platform support.
Improved the detection of a valid GDB server where we actually can connect to a socket, but then it doesn't read or write anything (which happens with some USB mux software).

Host::MakeDirectory() now can make as many intermediate directories as needed.

The testsuite now has very initial support for remote test suite running. When running on a remote platform, the setUp function for the test will make a new directory and select it as the working directory on the remote host. 

Added a common function that can be used to create the short option string for getopt_long calls.

llvm-svn: 195541
2013-11-23 01:58:15 +00:00
Greg Clayton 833d1295f9 <rdar://problem/15540233>
SBPlatform.h was missing from built LLDB.framework, now it is fixed.

llvm-svn: 195517
2013-11-22 23:32:57 +00:00