Commit Graph

8331 Commits

Author SHA1 Message Date
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
Greg Clayton b39751bc9f Patch from Todd Fiala for http://llvm.org/bugs/show_bug.cgi?id=17961
llvm-svn: 195500
2013-11-22 21:05:25 +00:00
Greg Clayton ec6829eac0 Patch from Todd Fiala: lldb will seg fault if for some reason there is no unwinder when StackFrameList::GetFramesUpTo() is called.
Mainly patched to stop LLDB from crashing. This can easily happen if you debug to a remote gdbserver that doesn't have any dynamic register info and you don't have a target definition file specified.

llvm-svn: 195499
2013-11-22 21:03:42 +00:00
Greg Clayton d4724cfdb1 Make sure the getopt variables are correctly initialized for any option parsing.
Added a new "--port-offset PORT" option to lldb-platform so it can be used with USB mux type scenarios.

llvm-svn: 195486
2013-11-22 18:55:04 +00:00
Greg Clayton 2b98c56996 Fixed functions to always reply to packets and added a port offset.
Fixed a bunch of issues with many functions that were added for the platform host IO calls where they might not reply to the packet if the packet was malformed.

Cleaned up error codes.

Added a port offset to allow for connections across a USB mux.

llvm-svn: 195485
2013-11-22 18:53:12 +00:00
Greg Clayton 3bd19fb07d Fix ePathTypeSupportExecutableDir for shallow bundle Darwin targets and add "host" logging for the different paths.
llvm-svn: 195484
2013-11-22 18:48:24 +00:00
Greg Clayton 8c8018d36f Only use a PTY master/slave when launching for local processes.
llvm-svn: 195483
2013-11-22 18:47:24 +00:00
Greg Clayton c029382690 Fix File::GetPermissions() to only return the permission bits.
llvm-svn: 195482
2013-11-22 18:46:55 +00:00
Greg Clayton 6d4130e7d9 Fix indentation.
llvm-svn: 195481
2013-11-22 18:46:16 +00:00
Ed Maste bf9b24edc3 Disable stop-hook test on FreeBSD as on Linux
It fails on the buildbot, so skip for now to reduce the noise.

llvm.org/pr15037

llvm-svn: 195459
2013-11-22 13:54:58 +00:00
Ed Maste 53ae4b1433 Remove decorators for llvm.org/pr17225
This issue is no longer reproducible, presumably due to changes in clang.

llvm-svn: 195458
2013-11-22 13:46:43 +00:00
Colin Riley 6c97042044 Fix for PECOFF GetArchitecture
0 as CPU subtype never matches anything (at least, it doesn't match x86_64 windows binaries, of which there are correct arch definitions for). It should be created with LLDB_INVALID_CPUTYPE. 

llvm-svn: 195435
2013-11-22 09:35:12 +00:00
Jim Ingham 1a7ee7044a #include <AvailabilityMacros.h> if you want to use them. This was causing us to skip
the code that should have set thread names on Mac OS X.

<rdar://problem/15517264>

llvm-svn: 195403
2013-11-22 00:51:36 +00:00
Enrico Granata de61cecd1c <rdar://problem/15530080>
Rework data formatters matching algorithm
What happens now is that, for each category, the FormatNavigator generates all possible matches, and checks them one by one
Since the possible matches do not actually depend on the category (whether a match is accepted or not does, but that check can be shifted at a more convenient time),
it is actually feasible to generate every possible match upfront and then let individual categories just scan through those

This commit changes things by introducing a notion of formatters match candidate, and shifting responsibility for generating all of them given a (ValueObject,DynamicValueType) pair
from the FormatNavigator back to the FormatManager
A list of these candidates is then passed down to each category for matching
Candidates also need to remember whether they were generated by stripping pointers, references, typedefs, since this is something that individual formatters can choose to reject
This check, however, is conveniently only done once a "textual" match has been found, so that the list of candidates is truly category-independent

While the performance benefit is small (mostly, due to caching), this is much cleaner from a design perspective

llvm-svn: 195395
2013-11-22 00:02:13 +00:00
Jason Molenda a69c1139e9 Tweak exports list so lldb will still build correctly when
init_lldb is absent (when doing a no-python build).

llvm-svn: 195377
2013-11-21 22:23:46 +00:00
Greg Clayton 904c145d4c Exit if launch doesn't succeed.
llvm-svn: 195371
2013-11-21 19:03:34 +00:00
Greg Clayton dd59dcb6d1 Added the ability to launch the program that was specified on the command line and have it waiting for a NativeProcessProtocol to attach.
llvm-svn: 195370
2013-11-21 18:58:35 +00:00
Greg Clayton be94a04055 Start the correct host abstraction of process and thread.
Added a new "Host/Debug.h" which contains the pure virtual class definitions for NativeProcessProtocol and NativeThreadProtocol. These classes are host layer classes that, over time, every host that supports debugging will implement once.

Then the new "lldb-gdbserver" binary in the tools directory will be able to make a remote debugging binary from these native classes, and we will also be able to have a new lldb_private::Process class that implements native debugging using these classes.

So as soon as linux and MacOSX switch over to using this layer, everyone will get native and remote debugging.

This check-in is primarily to get the needed code in so that poeple can start trying to implement the NativeProcessProtocol and NativeThreadProtocol and use it in the GDBRemoteCommunicationServer class to implement a GDB server for remote debugging.

llvm-svn: 195369
2013-11-21 18:39:32 +00:00
Ed Maste 5341404258 Update cmake for SBPlatform.cpp added in r195273
llvm-svn: 195362
2013-11-21 14:38:22 +00:00
Ed Maste f9c2c989de Annotate test that fails on the FreeBSD buildbot
llvm.org/pr17807

llvm-svn: 195361
2013-11-21 14:23:15 +00:00
Jason Molenda db2f51e5f1 Fixes to get the arm native debugserver building again.
Fix a small typeo in the i386/x86_64 debugserver plugins.

llvm-svn: 195308
2013-11-21 03:59:47 +00:00
Jason Molenda 4a4b5dcb7d sys/stat.h needed for mkdir, chmod, stat.
llvm-svn: 195305
2013-11-21 02:45:55 +00:00
Greg Clayton 29b8fc4da9 Added new options to lldb-platform:
--gdbserver-port PORT
    --min-gdbserver-port PORT
    --max-gdbserver-port PORT
    
The --gdbserver-port option can be specified multiple times to tell lldb-platform which ports it can use when launching child GDB server processes.
The --min-gdbserver-port and --max-gdbserver-port options allow a range of ports to be specified for use when launching child GDB server processes.

Fixed the code to manage these ports correctly in GDBRemoteCommunicationServer.

Also changed GDBRemoteCommunicationClient to not set a port when sending the "qLaunchGDBServer" packet so that the remote lldb-platform can decide which ports to use. If the lldb-platform was launched with no --gdbserver-port or --min-gdbserver-port/--max-gdbserver-port options, then port 0 is always used and a unix socket is used between the lldb-platform and child GDB server process to coordinate the use of valid port.

llvm-svn: 195300
2013-11-21 01:44:58 +00:00
Enrico Granata 5383e81a7f <rdar://problem/15449837>
Change the NSSet data formatter to not use the expression parser to produce synthetic children
In small-scale experimentation with lldb-perf, this improves our performance by around 25%

llvm-svn: 195294
2013-11-21 01:08:05 +00:00
Greg Clayton fbb7634934 Expose SBPlatform through the public API.
Example code:

remote_platform = lldb.SBPlatform("remote-macosx"); 
remote_platform.SetWorkingDirectory("/private/tmp")
debugger.SetSelectedPlatform(remote_platform)

connect_options = lldb.SBPlatformConnectOptions("connect://localhost:1111"); 
err = remote_platform.ConnectRemote(connect_options)
if err.Success():
    print >> result, 'Connected to remote platform:'
    print >> result, 'hostname: %s' % (remote_platform.GetHostname())
    src = lldb.SBFileSpec("/Applications/Xcode.app/Contents/SharedFrameworks/LLDB.framework", False)
    dst = lldb.SBFileSpec()
    # copy src to platform working directory since "dst" is empty
    err = remote_platform.Install(src, dst);
    if err.Success():
        print >> result, '%s installed successfully' % (src)
    else:
        print >> result, 'error: failed to install "%s": %s' % (src, err)


Implemented many calls needed in lldb-platform to be able to install a directory that contains symlinks, file and directories.

The remote lldb-platform can now launch GDB servers on the remote system so that remote debugging can be spawned through the remote platform when connected to a remote platform.

The API in SBPlatform is subject to change and will be getting many new functions.

llvm-svn: 195273
2013-11-20 21:07:01 +00:00
Colin Riley 61979ccad6 Fix MSVC build
The demangler added in r193708 from cxa_demangle.cpp uses language features which are not supported by the latest visual studio. In order to preserve the msvc build, this patch restores the previous (non)functionality in windows under msvc by disabling the demangler. 

llvm-svn: 195254
2013-11-20 15:19:08 +00:00
Colin Riley 4442546be9 Test commit. Capitalize 'os'.
llvm-svn: 195242
2013-11-20 12:35:52 +00:00
Jason Molenda 4ff132610a Flush the Process' cache of extended threads every time the
natural stop id is updated.
<rdar://problem/15496603> 

llvm-svn: 195177
2013-11-20 00:31:38 +00:00
Sean Callanan 51f3d07313 Updated build-llvm to use a more generic ioctl
to determine the number of available processors.

llvm-svn: 195172
2013-11-19 23:59:38 +00:00
Jason Molenda a6e9130d52 Add logging for the SB API which creates extended
threads.

Take a stab at fixing the too-soon freeing of the extended
backtrace thread list in Process.
<rdar://problem/15496603> 

llvm-svn: 195104
2013-11-19 05:44:41 +00:00
Jason Molenda 8ee9cb5891 Add a new SBThread::GetExtendedBacktraceOriginatingIndexID() method
(and same thing to Thread base class) which can be used when looking
at an ExtendedBacktrace thread; it will try to find the IndexID() of
the original thread that was executing this backtrace when it was
recorded.  If lldb can't find a record of that thread, it will return
the same value as IndexID() for the ExtendedBacktrace thread.

llvm-svn: 194912
2013-11-16 01:24:22 +00:00
Ed Maste 21ad67b4ef test: Remove annotation for now-fixed FreeBSD issue pr15302
The failure to demangle 'anonymous namespace' on FreeBSD is fixed (twice)

- the failure in FreeBSD's in-tree __cxa_demangle has been addressed

- FreeBSD now uses the copy of the demangler built into lldb, due to other
  remaining limitations in the in-tree __cxa_demangle

llvm.org/pr15302

llvm-svn: 194855
2013-11-15 21:33:30 +00:00
Ed Maste ddb573063d Remove FreeBSD test failure annotations for llvm.org/pr17213
This was a FreeBSD kernel issue, now fixed.

llvm-svn: 194842
2013-11-15 19:15:43 +00:00
Sylvestre Ledru f0f2d58086 Improve the set of the Python libraries during the cmake build.
Thanks to Kal Conley for the patch

llvm-svn: 194815
2013-11-15 14:15:10 +00:00
Sylvestre Ledru a25cf71894 Remove the hardcoded declaration to the Python include path. Thanks to Kal Conley for the patch
llvm-svn: 194804
2013-11-15 10:32:40 +00:00
Jason Molenda a7b5afa91b Commit a work-in-progress system runtime for Mac OS X which won't
do anything right now.  Add a few new methods to the Thread base
class which HistoryThread needs.  I think I updated all the 
CMakeLists files correctly for the new plugin.

llvm-svn: 194756
2013-11-15 00:17:32 +00:00
Ed Maste af12ff28a1 Remove annotations for pr17184 (now fixed)
This failure was due to a limitation in the FreeBSD kernel that has now been
addressed.  (llvm.org/pr17226 has the details.)

llvm-svn: 194731
2013-11-14 21:29:58 +00:00
Ed Maste 4ae8c9e507 Update failing FreeBSD test annotations (pr17932, pr17933)
After solving the issue in llvm.org/pr17226 these two tests still fail,
now for other reasons.

llvm-svn: 194729
2013-11-14 21:27:34 +00:00
Ed Maste 1e46620b4f Mark two FreeBSD tests failing due to llvm.org/pr15989
After solving llvm.org/pr17226 these two tests now fail for the same reason
they do on Linux.

llvm-svn: 194726
2013-11-14 20:25:29 +00:00
Greg Clayton 5d719f2744 Added documentation or the new QSaveRegisterState and QRestoreRegisterState packets.
llvm-svn: 194631
2013-11-13 23:55:36 +00:00
Greg Clayton 1d61d31a4d <rdar://problem/14814689>
Add a log message to the console that will display the error code when we fail to reply to a mach message.

llvm-svn: 194623
2013-11-13 23:33:41 +00:00
Greg Clayton f74cf86bc5 <rdar://problem/15172417>
Added two new GDB server packets to debugserver: "QSaveRegisterState" and "QRestoreRegiterState".

"QSaveRegisterState" makes the remote GDB server save all register values and it returns a save identifier as an unsigned integer. This packet can be used prior to running expressions to save all registers.

All registers can them we later restored with "QRestoreRegiterState:SAVEID" what SAVEID is the integer identifier that was returned from the call to QSaveRegisterState.

Cleaned up redundant code in lldb_private::Thread, lldb_private::ThreadPlanCallFunction.
Moved the lldb_private::Thread::RegisterCheckpoint into its own header file and it is now in the lldb_private namespace. Trimmed down the RegisterCheckpoint class to omit stuff that wasn't used (the stack ID).

Added a few new virtual methods to lldb_private::RegisterContext that allow subclasses to efficiently save/restore register states and changed the RegisterContextGDBRemote to take advantage of these new calls.

llvm-svn: 194621
2013-11-13 23:28:31 +00:00
Enrico Granata 8d81a843fa Minor improvement to the "memory find" command
Remove the --do-read option, and always provide a small dump of memory at each match spot
Add a --dump-offset (-o) option, to specify a byte offset from which to start dumping relative to the matching address

The real solution is to actually provide the format options found on "memory read" and use those as the key to actually printing memory upon each find
That, however, requires a little refactoring work, so put this in for now until I get a chance to do the required shuffling around of moving parts

llvm-svn: 194600
2013-11-13 20:08:30 +00:00
Greg Clayton 3ebae49748 Fixed printf warnings. The GetByteSize() results return uint64_t values, not size_t values.
llvm-svn: 194587
2013-11-13 18:01:16 +00:00
Enrico Granata 6e49c48f97 Small typos in previous commit
llvm-svn: 194546
2013-11-13 02:22:24 +00:00
Enrico Granata 534684372d <rdar://problem/14322677>
Implement a "memory find" command for LLDB

This is still fairly rough around the edges but works well enough for simple scenarios where a chunk of text or a number are to be found within a certain range of memory, as in
mem find `buffer` `buffer+0x1000` -s "me" -c 5 -r

llvm-svn: 194544
2013-11-13 02:18:44 +00:00
Jason Molenda 008c45f1a1 Change SBThread::GetExtendedBacktrace to
SBThread::GetExtendedBacktraceThread to make it more clear what is
being returned.

llvm-svn: 194531
2013-11-12 23:33:32 +00:00
Ed Maste 7b24e95e69 Log failure to restore thread state in ThreadPlanCallFunction::DoTakedown
In order to help track down llvm.org/pr17226.

llvm-svn: 194487
2013-11-12 16:47:08 +00:00
Alp Toker 93c9afc66e Future-proof version checking with MSVC_VERSION
This mirrors lld r194481

llvm-svn: 194483
2013-11-12 15:42:53 +00:00
Jason Molenda 750ea692e8 Add initial --extended / -e support to thread backtrace.
llvm-svn: 194455
2013-11-12 07:02:07 +00:00
Jason Molenda ee87e75090 Add object logging to HistoryThread. Call the DoDestroy() method from
the HistoryThread dtor.

llvm-svn: 194436
2013-11-12 00:09:58 +00:00
Ed Maste d23dcbfb53 Increase log detail for size mismatch in EntityVariable::Materialize
llvm-svn: 194413
2013-11-11 19:40:51 +00:00
Ed Maste eefd43f331 Fix header comment line length
llvm-svn: 194397
2013-11-11 18:30:28 +00:00
Ed Maste 2138d18a08 Add generic ARGn register IDs for FreeBSD and Linux x86
These were previously missing in g_register_infos_x86_64 and so arg
lookup failed on FreeBSD and Linux after r194035.

llvm-svn: 194392
2013-11-11 17:02:33 +00:00
Jason Molenda fa421639de Change lldb to build without the -fobjc-gc arg.
llvm-svn: 194371
2013-11-11 10:36:54 +00:00
Jason Molenda 864f1cc065 The Threads created when requesting extended backtraces need to be owned by
something; add a new ExtendedThreadList to Process where they can be retained
for the duration of a public stop.
<rdar://problem/15314068> 

llvm-svn: 194367
2013-11-11 05:20:44 +00:00
Jason Molenda 7a2f7904bf The Threads created when requesting extended backtraces need to be owned by
something; add a new ExtendedThreadList to Process where they can be retained
for the duration of a public stop.
<rdar://problem/15314068> 

llvm-svn: 194366
2013-11-11 05:19:34 +00:00
Peter Collingbourne 19676ac58f Fix CMake standalone build.
llvm-svn: 194363
2013-11-11 04:46:09 +00:00
Greg Clayton 854800287a Fixed up registers in debugserver.
- removed all gaps from the g/G packets
- optimized registers for x86_64 to not send/receive xmm0-xmm15 as well as ymm0-ymm15, now we only send ymm0-15 and xmm0-15 are now pseudo regs
- Fixed x86_64 floating point register gaps
- Fixed x86_64 so that xmm8-xmm15 don't overlap with ymm0-ymm3. This could lead to bad values showing in the debugger and was due to bad register info structure contents
- Fixed i386 so we only send ymm0-ymm7 and xmm0-xmm7 are now pseudo regs.
- Fixed ARM register definitions to not have any gaps
- Fixed it so value registers and invalidation registers are specified using register names which avoid games we had to play with register numbering in the ARM plugin.

llvm-svn: 194302
2013-11-09 00:33:46 +00:00
Greg Clayton b35db6399d Fixed the the breakpoint test case failures.
There were 6 on darwin. All of these were related to the recent changes for exec.

llvm-svn: 194298
2013-11-09 00:03:31 +00:00
Greg Clayton c28ce7828b Fixed a build warning for a missing switch case.
llvm-svn: 194295
2013-11-08 23:38:26 +00:00
Jason Molenda 02706c3216 Add History subclasses for Thread, Unwind, RegisterContext.
Still working out some of the details of these classes but 
I wanted to get the overall structure checked in.
<rdar://problem/15314068> 

llvm-svn: 194245
2013-11-08 04:59:54 +00:00
Sean Callanan a464f3d43a Changed the ABIs and ClangFunction to take a
llvm::ArrayRef of arguments rather than taking
a fixed number of possibly-NULL pointers to
arguments.

Also changed ClangFunction::GetThreadPlanToCallFunction
to take the address of the argument struct by value
instead of by reference, since it doesn't actually
modify the value passed into it.

llvm-svn: 194232
2013-11-08 01:14:26 +00:00
Jim Ingham 6fbc48bc42 This patch does a couple of things.
It completes the job of using EvaluateExpressionOptions consistently throughout
the inferior function calling mechanism in lldb begun in Greg's patch r194009. 

It removes a handful of alternate calls into the ClangUserExpression/ClangFunction/ThreadPlanCallFunction which
were there for convenience.  Using the EvaluateExpressionOptions removes the need for them.

Using that it gets the --debug option from Greg's patch to work cleanly.

It also adds another EvaluateExpressionOption to not trap exceptions when running expressions.  You shouldn't
use this option unless you KNOW your expression can't throw beyond itself.  This is:

<rdar://problem/15374885>

At present this is only available through the SB API's or python.

It fixes a bug where function calls would unset the ObjC & C++ exception breakpoints without checking whether
they were set by somebody else already.

llvm-svn: 194182
2013-11-07 00:11:47 +00:00
Sean Callanan 2a0e663fbd Spelling fix.
llvm-svn: 194163
2013-11-06 19:56:05 +00:00
Sean Callanan 5c19eac1c8 Added Iterable, a class that vends standard C++
iterators for LLDB's container data structures.
Iterable abstracts over the backing data structure,
ignoring keys for maps for example.  It also provides
locking as a service so that the code

for (ThreadSP thread_sp : process->Threads())
{
  // ... use thread_sp
}

takes the appropriate locks once, without having to
do anything else.

The salient advantages of this system are:

- Much simpler and idiomatic loop code
- Lock once instead of each time an element is fetched
- Less boilerplate to produce the iterators

The intent is that Iterable will replace Get...AtIndex
in most places, and that ForEach(), which solves the
same problem in a less-idiomatic way, be phased out in
favor of this approach.

I've added Iterables to ThreadList, TypeList, and
Process (which is really just forwarding to ThreadList).

llvm-svn: 194159
2013-11-06 19:28:40 +00:00
Jason Molenda 95d005c789 Rename extended backtrace methods to take out the "ThreadOrigin"
bit from the method names.
<rdar://problem/15314369> 

llvm-svn: 194122
2013-11-06 03:07:33 +00:00
Greg Clayton cae5652838 Improve lldb_private::Address to detect when section was deleted and not return bogus values for GetLoadAddress() and GetFileAddress().
llvm-svn: 194120
2013-11-06 02:29:13 +00:00
Jason Molenda 5dd4916f63 Add a new GetThreadOriginExtendedBacktrace method to the
SystemRuntime and SBThread classes.
<rdar://problem/15314369> 

llvm-svn: 194111
2013-11-06 00:04:44 +00:00
Greg Clayton 095eeaa025 <rdar://problem/15367122>
Fixed the test case for "test/functionalities/exec/TestExec.py" on Darwin.

The issue was breakpoints were persisting and causing problems. When we exec, we need to clear out the process and target and start fresh with nothing and let the breakpoints populate themselves again. This patch correctly clears out the breakpoints and also flushes the process so that the objects (process/thread/frame) give out valid information.

llvm-svn: 194106
2013-11-05 23:28:00 +00:00
Jim Ingham afbb0af827 Give a better error when the index argument for “frame select” can’t be parsed.
<rdar://problem/15390829>

llvm-svn: 194087
2013-11-05 18:25:23 +00:00
Jason Molenda 8c71337abc Add the GetNumThreadOriginExtendedBacktraceTypes and
GetThreadOriginExtendedBacktraceTypeAtIndex methods to
SBProcess.

Add documentation for the GetQueueName and GetQueueID methods
to SBThread.
<rdar://problem/15314369> 

llvm-svn: 194063
2013-11-05 11:00:35 +00:00
Jason Molenda b4db43fad6 Add a GetThreadOriginExtendedBacktraceTypes method to the
SystemRuntime class.
<rdar://problem/15314369> 

llvm-svn: 194045
2013-11-05 04:25:57 +00:00
Jason Molenda eef510667b Add a new system runtime plugin type - just the top level
class, not any actual plugin implementation yet.
<rdar://problem/15314068> 

llvm-svn: 194044
2013-11-05 03:57:19 +00:00
Greg Clayton bb3a9b74e7 Update ABISysV_x86_64.cpp to use more efficient register finding calls.
Instead of looking up registers by name, we use the generic ID when we can.

Also added code that creates an extra frame when running expressions by pushing the current PC and FP and then hooking up the FP backchain. This code is "#if 0" out for now until we can pair it with unwinder fixes.

llvm-svn: 194035
2013-11-05 01:24:05 +00:00
Jason Molenda 8065867ff7 Fix the architectural default unwind plan's settings for restoring
the stack pointer.

llvm-svn: 194029
2013-11-05 00:19:09 +00:00
Jason Molenda 00ec491fc6 Fix a bug in the x86_64 architectural default unwindplan
where it was using the wrong register numbering scheme
to express where the rbp could be retrieved from.

llvm-svn: 194023
2013-11-04 22:57:40 +00:00
Greg Clayton bc3122ead3 <rdar://problem/15367406>
Fixed a case where on darwin, after recent compiler changes a few months ago, we could not execute dlopen() in an expression, or use "process load".

The issue was some compiler option default values changed. We now override these settings to get the old behavior back.

llvm-svn: 194012
2013-11-04 19:50:49 +00:00
Greg Clayton 62afb9f663 Added a "--debug" option to the "expression" command.
Cleaned up ClangUserExpression::Evaluate() to have only one variant that takes a "const EvaluateExpressionOptions& options" instead of taking many arguments.

The "--debug" option is designed to allow you to debug your expression by stopping at the first instruction (it enables --ignore-breakpoints=true and --unwind-on-error=false) and allowing you to step through your JIT code. It needs to be more integrated with the thread plan, so I am checking this in so Jim Ingham can make it happen.

llvm-svn: 194009
2013-11-04 19:35:17 +00:00
Jason Molenda 99618476ad Add new ivars to StackFrame so it can represent a stack collected
at some point in the past.  We may have nothing more than a pc value
for this type of stack frame -- hopefully we'll have a pc and a
stop_id so we can track module loads and unloads over time and
symbolicate the pc at the correct point in time.

Also add a flag to indicate if the CFA for the frame is available
(a bit different from a CFA of LLDB_INVALID_ADDRESS) and also an
overall setting to indicate whether this is a history stack frame
or not.  A history stack frame may not have a CFA, it may not have
a register context, it may not have variables, it may not have a
frame pointer or a stack pointer.

<rdar://problem/15314068>

llvm-svn: 193987
2013-11-04 11:02:52 +00:00
Jason Molenda b57e4a1bc6 Roll back the changes I made in r193907 which created a new Frame
pure virtual base class and made StackFrame a subclass of that.  As
I started to build on top of that arrangement today, I found that it
wasn't working out like I intended.  Instead I'll try sticking with
the single StackFrame class -- there's too much code duplication to
make a more complicated class hierarchy sensible I think.

llvm-svn: 193983
2013-11-04 09:33:30 +00:00
Filip Pizlo 8677577395 It is no longer necessary to opt out of pretty stack traces.
llvm-svn: 193972
2013-11-04 02:25:07 +00:00
Jason Molenda f23bf7432c Add a new base class, Frame. It is a pure virtual function which
defines a protocol that all subclasses will implement.  StackFrame
is currently the only subclass and the methods that Frame vends are
nearly identical to StackFrame's old methods.

Update all callers to use Frame*/Frame& instead of pointers to
StackFrames.

This is almost entirely a mechanical change that touches a lot of
the code base so I'm committing it alone.  No new functionality is
added with this patch, no new subclasses of Frame exist yet.

I'll probably need to tweak some of the separation, possibly moving
some of StackFrame's methods up in to Frame, but this is a good
starting point.

<rdar://problem/15314068>

llvm-svn: 193907
2013-11-02 02:23:02 +00:00
Enrico Granata e397a94c5d <rdar://problem/15368142>
For this test case, one needs to get the name of the symbol since we don't have debug info to generate an SBFunction

llvm-svn: 193879
2013-11-01 18:48:03 +00:00
Enrico Granata e615d20041 Use 0x00... as the magic constant to write in st0. That should be reliably 0 regardless of OS/hardware
llvm-svn: 193877
2013-11-01 18:19:05 +00:00
Enrico Granata 4c379c2b8d Skip this test case pending figuring out why it fails
llvm-svn: 193844
2013-11-01 01:00:57 +00:00
Enrico Granata 03e474bcef This only fails on Darwin ; thanks Jim for pointing that out
llvm-svn: 193843
2013-11-01 00:57:53 +00:00
Sylvestre Ledru 779f921311 Fix the format warnings.
In almost all cases, the misuse is about "%lu" being used instead of the correct "%zu" (even though these are compatible on 64-bit platforms in practice). There are even a couple of cases where "%ld" (ie., signed int) is used instead of "%zu", and one where "%lu" is used instead of "%" PRIu64.

Fixes bug #17551.

Patch by "/dev/humancontroller"

llvm-svn: 193832
2013-10-31 23:55:19 +00:00
Enrico Granata 60bd35012a This test is expected to fail pending proper support
llvm-svn: 193831
2013-10-31 23:43:42 +00:00
Enrico Granata 3a48185f79 Thread::SetState() is not being called upon hitting the breakpoint
Given that, this test will never pass
Marking as expected failure pending a fix

llvm-svn: 193830
2013-10-31 23:36:47 +00:00
Enrico Granata 2dba1135db Fix this test to work with either st0 or stmm0
llvm-svn: 193829
2013-10-31 23:25:47 +00:00
Enrico Granata 667a911901 This test is failing because expressions involving dlopen() currently do not work
Mark it as expected to fail pending a fix

llvm-svn: 193828
2013-10-31 23:19:13 +00:00
Enrico Granata 7eeda58588 Fix this test to be consistent in whether a process will or will not be there
llvm-svn: 193827
2013-10-31 23:14:48 +00:00
Enrico Granata 7037b3f915 Another instance of the same test failing
llvm-svn: 193826
2013-10-31 23:07:41 +00:00
Enrico Granata 4510a159c2 Another instance of the same test failing
llvm-svn: 193825
2013-10-31 23:06:54 +00:00
Enrico Granata 4a2dc3b01b Mark this as an expected failure
llvm-svn: 193824
2013-10-31 23:05:35 +00:00
Enrico Granata c955ac3723 This test is currently expected to fail, mark it as such pending fixes
llvm-svn: 193822
2013-10-31 22:55:55 +00:00
Enrico Granata 0ede1094bf Workaround the DWARF info is anticipating the derived class assignment issue in this test case for now
llvm-svn: 193821
2013-10-31 22:49:31 +00:00
Enrico Granata fcf0c4e31a Further fixes to the dynamic type system prompted by ObjCDataFormatterTestCase.test_nserror_with_dsym_and_run_command
llvm-svn: 193818
2013-10-31 22:42:00 +00:00
Andrew Kaylor 70ce6d2e62 Marking dynamic value test as expected failure on Linux.
llvm-svn: 193809
2013-10-31 22:07:11 +00:00
Greg Clayton 49fd8de3c2 Fixed printf warnings.
llvm-svn: 193806
2013-10-31 21:38:47 +00:00
Enrico Granata 90a8db30de Renaming the setting to enable/disable automatic one-lining of summaries as auto-one-line-summaries
llvm-svn: 193801
2013-10-31 21:01:07 +00:00
Ed Maste 1c09d4a537 Migrate DWARFDebugLine to DWARFDataExtractor 64-bit DWARF support
llvm-svn: 193794
2013-10-31 19:51:53 +00:00
Andrew Kaylor 7268e6ef9d Fix dynamic value test to build correctly on Linux with C++11 features.
llvm-svn: 193793
2013-10-31 19:42:35 +00:00
Ed Maste d8f57278b8 Remove unused DWARFDebugLine length functions
llvm-svn: 193792
2013-10-31 19:31:16 +00:00
Enrico Granata d7373f69cf SBValue::GetValueAsUnsigned()/GetValueAsSigned() should not replicate the Scalar manipulation logic found in ValueObject, but rather just call down to it
llvm-svn: 193786
2013-10-31 18:57:50 +00:00
Greg Clayton a1e0318c42 Added more details on the exact version of the cxa_demangle.cpp file for the built in demangler. This will help us track when we need to update this file.
llvm-svn: 193784
2013-10-31 18:41:50 +00:00
Ed Maste 3606da2614 Use inlined demangler on FreeBSD
FreeBSD includes the elftoolchain project's demangler in the base system.
It does not handle some unusual mangled names, so use the inlined
libcxxabi one.

llvm-svn: 193776
2013-10-31 17:42:32 +00:00
Ed Maste fb15ba6879 Tls test fails on FreeBSD due to llvm.org/pr16696
(Threaded inferior debugging not yet available on FreeBSD.)

llvm-svn: 193771
2013-10-31 17:21:15 +00:00
Greg Clayton dc25a0bc64 <rdar://problem/14496092>
Fixes from code review by Jim Ingham that reinstate preferring an external vs non-external symbol when finding function addresses.

llvm-svn: 193761
2013-10-31 16:59:47 +00:00
Enrico Granata 686f3deb44 This checkin introduces the notion of hardcoded formatters, which LLDB can bind to a ValueObject internally depending on any criteria
User-vended by-type formatters still would prevail on these hardcoded ones

For the time being, while the infrastructure is there, no such formatters exist

This can be useful for cases such as expanding vtables for C++ class pointers, when there is no clear cut notion of a typename matching, and the feature is low-level enough that it makes sense for the debugger core to be vending it

llvm-svn: 193724
2013-10-30 23:46:27 +00:00
Greg Clayton f32db51c50 <rdar://problem/14496092>
Fixed the expression parser to be able to iterate across all function name matches that it finds when it is looking for the address of a function that the IR is looking for. Also taught it to deal with reexported symbols.

llvm-svn: 193716
2013-10-30 21:37:46 +00:00
Andrew Kaylor ba8ce0414e Removing expected failure decorator for a test that's passing.
llvm-svn: 193715
2013-10-30 21:05:36 +00:00
Greg Clayton 19c8e78b86 <rdar://problem/15201312>
Inlined a copy of cxa_demangle.cpp from:

http://llvm.org/svn/llvm-project/libcxxabi/trunk/src/cxa_demangle.cpp

For systems that don't have demangling built into the system, and for systems that don't want to use the version that is installed. Defining LLDB_USE_BUILTIN_DEMANGLER in your build system allows you to use the built in demangler. This setting is curently automatically enabled for Windows builds.

llvm-svn: 193708
2013-10-30 18:42:59 +00:00
Greg Clayton c1ae724757 Fixed a warning in PlatformiOSSimulator where GetSDKDirectory was hiding recently added virtual function. Renamed GetSDKDirectory to GetSDKsDirectory to fix the issue. GetSDKsDirectory is a better fit because it finds the directory that contains all SDKs, not the current one.
llvm-svn: 193707
2013-10-30 18:40:41 +00:00
Enrico Granata 5e1480c5dc <rdar://problem/13308704>
Fixing a problem where ValueObject::GetPointeeData() would not accept "partial" valid reads (i.e. asking for 10 items and getting only 5 back)
While suboptimal, this situation is not a flat-out failure and could well be caused by legit scenarios, such as hitting a page boundary

Among others, this allows data formatters to print char* buffers allocated under libgmalloc

llvm-svn: 193704
2013-10-30 17:52:44 +00:00
Enrico Granata 34b6671ca3 <rdar://problem/15143022>
CFNumberRef is toll-free bridged to NSNumber
We can use the same summary formatter for both types

llvm-svn: 193666
2013-10-30 00:17:52 +00:00
Enrico Granata 38c546320c <rdar://problem/15045059>
One of the things that dynamic typing affects is the count of children a type has
Clear out the flag that makes us blindly believe the children count when a dynamic type change is detected

llvm-svn: 193663
2013-10-30 00:04:29 +00:00
Enrico Granata 0947a6e93b <rdar://problem/15296388>
Fix a crasher that would occur if one tried to read memory as characters of some size != 1, e.g.
x -f c -s 10  buffer

This commit tries to do the right thing and uses the byte-size as the number of elements, unless both are specified and the number of elements is != 1
In this latter case (e.g. x -f c -s 10 -c 3  buffer) one could multiply the two and read 30 characters, but it seems a stretch in mind reading.

llvm-svn: 193659
2013-10-29 23:04:29 +00:00
Enrico Granata df7c7f99ba Fixing an issue in yesterday's dynamic type changes where we would not craft a valid SBType given debug information
Added a test case to help us detect regression in this realm

llvm-svn: 193631
2013-10-29 17:42:02 +00:00
Andrew Kaylor 2c206688db Fixing TestAnonymous to build dwarf where it says it will.
llvm-svn: 193628
2013-10-29 17:09:59 +00:00
Enrico Granata dc4db5a6eb <rdar://problem/15144376>
This commit reimplements the TypeImpl class (the class that backs SBType) in terms of a static,dynamic type pair

This is useful for those cases when the dynamic type of an ObjC variable can only be obtained in terms of an "hollow" type with no ivars
In that case, we could either go with the static type (+iVar information) or with the dynamic type (+inheritance chain)

With the new TypeImpl implementation, we try to combine these two sources of information in order to extract as much information as possible
This should improve the functionality of tools that are using the SBType API to do extensive dynamic type inspection

llvm-svn: 193564
2013-10-29 00:28:35 +00:00
Jim Ingham 4396b8e618 Change the default handling for SIGALRM and SIGCHLD to not notify.
<rdar://problem/15208799>

llvm-svn: 193530
2013-10-28 19:00:42 +00:00
Jason Molenda 6a8658ad61 Fix the signed-ness of a few log printf directives in Process::RunThreadPlan.
llvm-svn: 193488
2013-10-27 02:32:23 +00:00
Enrico Granata 553fad5c9a <rdar://problem/15319880>
Introduce a new boolean setting enable-auto-oneliner
This setting if set to false will force LLDB to not use the new compact one-line display

By default, one-line mode stays on, at least until we can be confident it works.
But now if it seriously impedes your workflow while it evolves/it works wonders but you still hate it, there's a way to turn it off

llvm-svn: 193450
2013-10-25 23:09:40 +00:00
Greg Clayton bac3ff1aa7 Update the key/value documentation for the qHostInfo packet.
llvm-svn: 193426
2013-10-25 18:22:24 +00:00
Greg Clayton 9ac6d2db73 <rdar://problem/15263540>
Added a new key that we understand for the "qHostInfo" packet: "default_packet_timeout:T;" where T is a default packet timeout in seconds.

This allows GDB servers with known slow packet response times to increase the default timeout to a value that makes sense for the connection.

llvm-svn: 193425
2013-10-25 18:13:17 +00:00
Ed Maste 9204e6d8f5 Update DWARFDebugPubnamesSet 64-bit DWARF to use new DWARFDataExtractor
llvm-svn: 193407
2013-10-25 13:18:17 +00:00
Greg Clayton 9b2349888f Added the ability to get the SDK path for a target using the platform plugins. If LLDB lives inside an Xcode.app bundle, it will select the SDK in the Xcode bundle, else it will use the currently selected Xcode.
Also added the DWARFDataExtractor classes to the Xcode project file.

llvm-svn: 193380
2013-10-24 22:54:08 +00:00
Ed Maste eeae72184b Introduce DWARFDataExtractor for 64-Bit DWARF parsing
Review: http://llvm-reviews.chandlerc.com/D2007
llvm-svn: 193368
2013-10-24 20:43:47 +00:00
Greg Clayton 4598907ff8 Fixed format strings as they still must specicy a '%' prior to using PRI*64 macros.
llvm-svn: 193260
2013-10-23 18:24:30 +00:00
Ed Maste 2ea0f2cdae 64-Bit DWARF support for .debug_aranges and .debug_pubnames
llvm-svn: 193250
2013-10-23 17:24:15 +00:00
Ed Maste 726a591482 Initial DWARF64 support for .debug_line
Some versions of the GNU MIPS toolchain generate 64-Bit DWARF (even though
it isn't really necessary).  This change adds support for the 64-Bit DWARF
format, but is not actually tested with >4GB of debug data.

Similar changes are in progress for llvm's version of DWARFDebugLine, in
review D1988.

llvm-svn: 193242
2013-10-23 14:18:41 +00:00
Enrico Granata c89e4ca3c1 One should actually not do one-line printing of nested aggregates even if they are not the base class
This check was overly strict. Relax it.
While one could conceivably want nested one-lining:
(Foo) aFoo = (x = 1, y = (t = 3, q = “Hello), z = 3.14)
the spirit of this feature is mostly to make *SMALL LINEAR* structs come out more compact.
Aggregates with children and no summary for now just disable the one-lining. Define a one-liner summary to override :)

llvm-svn: 193218
2013-10-23 01:34:31 +00:00
Wei Pan 133ac8714d LUI: Fix some issues causing crashes in the source view
llvm-svn: 193217
2013-10-23 01:18:21 +00:00
Enrico Granata 106260c574 Improvements to the ValueObjectPrinter to behave correctly in more dynamic value cases
llvm-svn: 193204
2013-10-22 22:42:14 +00:00
Sean Callanan 13b4ef2dba Simplified the code that materializes a variable,
obviating the need to create a new ValueObject.

llvm-svn: 193191
2013-10-22 20:01:17 +00:00
Deepak Panickal d66b50c96c Fixes to get LLDB building on Windows again.
llvm-svn: 193159
2013-10-22 12:27:43 +00:00
Jason Molenda 12075f71f9 Update ResolveFunctionPointers to build after the changes
of llvm r193091.  Thanks to Ed Maste for narrowing it down.

llvm-svn: 193140
2013-10-22 03:11:55 +00:00
Jason Molenda 5e873dbc40 Fix for a mistake spotted by Enrico with the SBThread::queue_id accessor.
llvm-svn: 193136
2013-10-22 01:37:18 +00:00
Jason Molenda 4fdb5863b9 Expose the Thread::GetQueueID() method through the SBThread API, similar to
the existing SBThread::GetQueueName() method.

llvm-svn: 193132
2013-10-21 23:52:54 +00:00
Greg Clayton d65ef14df3 Fixed breakpoints to be able to be set on eSymbolTypeReExported symbols and resolve to the correct function. This allows setting a breakpoint on "memset" for iOS simulator binaries and the correct breakpoint will be set on "__platform_memset".
llvm-svn: 193114
2013-10-21 20:04:47 +00:00
Greg Clayton 9191db47da <rdar://problem/14496092>
Fixed an issue with reexported symbols on MacOSX by adding support for symbols re-exporting symbols. There is now a new symbol type eSymbolTypeReExported which contains a new name for the re-exported symbol and the new shared library. These symbols are only used when a symbol is re-exported as a symbol under a different name.

Modified the expression parser to be able to deal with finding the re-exported symbols and track down the actual symbol it refers to.

llvm-svn: 193101
2013-10-21 18:40:51 +00:00
Enrico Granata aff6565f85 Get rid of the FooStructSynth, it was a testing thing I put in and forgot to remove
Hopefully nobody had a struct Foo in their app:-)

llvm-svn: 193092
2013-10-21 17:29:51 +00:00
Joerg Sonnenberger e77b0424fd Fix python-free build.
llvm-svn: 193053
2013-10-20 17:36:05 +00:00
Joerg Sonnenberger c5e53bd14a Make sure switch covers all values.
llvm-svn: 193052
2013-10-20 17:35:46 +00:00
Jim Ingham be40554915 ValueObject and SBValue's GetChildMemberWithName should look through anonymous structs
and unions the same way that C would.

<rdar://problem/11987906>

llvm-svn: 193016
2013-10-18 23:53:55 +00:00
Ed Maste f7920c8798 Fix build failure on FreeBSD/clang by using auto iterator type
llvm-svn: 192999
2013-10-18 20:32:25 +00:00
Ed Maste 68f517938a Add stub FreeBSD ProcessMonitor::ReadThreadPointer
llvm-svn: 192994
2013-10-18 19:16:44 +00:00
Enrico Granata fcb37ae365 <rdar://problem/15182550>
Removing Host/Atomic.h
This header file was not being copied as part of our public API headers and this in turn was causing any plugin to link against LLDB.framework, since SharingPtr.h depends on it

Out of several possible options to fix this issue, the cleanest one is to revert LLDB to use std::atomic<>, as we are a C++11 project and should take advantage of it

The original rationale for going from std::atomic to Host/Atomic.h was that MSVC++ fails to link in CLR mode when std::atomic is used
This is a very Visual Studio/.net specific issue, which hopefully will be fixed
Until them, to allow Windows development to proceed, we are going with a targeted solution where we #ifdef include the Windows specific calls, and let everyone else use the
proper atomic support, as should be

If there is an unavoidable need for a LLDB-specific atomic header, the right way to go at it would be to make an API/lldb-atomic.h header and #ifdef the Windows dependency there

The FormatManager should not need to conditionalize use of std::atomic<>, as other parts of the LLDB internals are successfully using atomic (Address and IRExecutionUnit), so this
Win-specific hack is limited to SharingPtr

llvm-svn: 192993
2013-10-18 18:57:49 +00:00
Jim Ingham 8ec10efc5d Mark the selected frame of the selected thread in backtraces.
<rdar://problem/15252474>

llvm-svn: 192989
2013-10-18 17:38:31 +00:00
Jim Ingham b1499243f3 Make sure the CallFunction Thread plans don't try to do DoTakedown if their thread
has gone  away by the time they get around to doing it.

<rdar://problem/15245544>

llvm-svn: 192987
2013-10-18 17:11:02 +00:00
Jim Ingham 5010b6972c BreakpointResolverFileRegex.cpp wandered from the lldb-core target to the LLDB.framework target.
Put it back where it belongs.

llvm-svn: 192986
2013-10-18 17:05:45 +00:00
Hafiz Abid Qadeer 85a4daf4f6 Adjust PC after hitting breakpoint on remote target.
This commit adds an example python file that can be used with 'target-definition-file' setting for Linux gdbserver.
This file has an extra key 'breakpoint-pc-offset' that LLDB uses to determine how much to change the PC
after hitting the breakpoint.

llvm-svn: 192962
2013-10-18 10:04:33 +00:00
Jason Molenda 3dc4f44e71 Move the code which translates a dispatch_qaddr into a
queue name out of ProcessGDBRemote and in to the Platform
plugin, specifically PlatformDarwin.

Also add a Platform method to translate a dispatch_quaddr
to a QueueID, and a Thread::GetQueueID().

I'll add an SBThread::GetQueueID() next.

llvm-svn: 192949
2013-10-18 05:55:24 +00:00
Richard Mitton 665068b379 Removed unnecessary call to OpenFirstAvailableMaster.
::Fork already does this internally, so this was simply leaking file handles.

This fixes the problem where the test suite would occasionally run out of file handles.

llvm-svn: 192929
2013-10-17 22:36:28 +00:00
Enrico Granata 52b4b6cddc This is the last piece of work for "formats in categories": we now cache formats as well as summaries and synthetics
llvm-svn: 192928
2013-10-17 22:27:19 +00:00
Richard Mitton 0a55835755 Added support for reading thread-local storage variables, as defined using the __thread modifier.
To make this work this patch extends LLDB to:

- Explicitly track the link_map address for each module. This is effectively the module handle, not sure why it wasn't already being stored off anywhere. As an extension later, it would be nice if someone were to add support for printing this as part of the modules list.

- Allow reading the per-thread data pointer via ptrace. I have added support for Linux here. I'll be happy to add support for FreeBSD once this is reviewed. OS X does not appear to have __thread variables, so maybe we don't need it there. Windows support should eventually be workable along the same lines.

- Make DWARF expressions track which module they originated from.

- Add support for the DW_OP_GNU_push_tls_address DWARF opcode, as generated by gcc and recent versions of clang. Earlier versions of clang (such as 3.2, which is default on Ubuntu right now) do not generate TLS debug info correctly so can not be supported here.

- Understand the format of the pthread DTV block. This is where it gets tricky. We have three basic options here:

  1) Call "dlinfo" or "__tls_get_addr" on the inferior and ask it directly. However this won't work on core dumps, and generally speaking it's not a good idea for the debugger to call functions itself, as it has the potential to not work depending on the state of the target.

  2) Use libthread_db. This is what GDB does. However this option requires having a version of libthread_db on the host cross-compiled for each potential target. This places a large burden on the user, and would make it very hard to cross-debug from Windows to Linux, for example. Trying to build a library intended exclusively for one OS on a different one is not pleasant. GDB sidesteps the problem and asks the user to figure it out.

  3) Parse the DTV structure ourselves. On initial inspection this seems to be a bad option, as the DTV structure (the format used by the runtime to manage TLS data) is not in fact a kernel data structure, it is implemented entirely in useerland in libc. Therefore the layout of it's fields are version and OS dependent, and are not standardized.

  However, it turns out not to be such a problem. All OSes use basically the same algorithm (a per-module lookup table) as detailed in Ulrich Drepper's TLS ELF ABI document, so we can easily write code to decode it ourselves. The only question therefore is the exact field layouts required. Happily, the implementors of libpthread expose the structure of the DTV via metadata exported as symbols from the .so itself, designed exactly for this kind of thing. So this patch simply reads that metadata in, and re-implements libthread_db's algorithm itself. We thereby get cross-platform TLS lookup without either requiring third-party libraries, while still being independent of the version of libpthread being used.

Test case included.

llvm-svn: 192922
2013-10-17 21:14:00 +00:00
Ed Maste a0191d1101 Fix building with ENABLE_DEBUG_PRINTF
Clang tells me that "token pasting of ',' and __VA_ARGS__ is a GNU
extension".  Also catch up with changes in function args.

llvm-svn: 192920
2013-10-17 20:42:56 +00:00
Ed Maste 4c24b1264a Whitespace: replace 4-space-tabs with spaces
llvm-svn: 192918
2013-10-17 20:13:14 +00:00
Richard Mitton ec8b282bde Rearranged linker flags for test suite.
Some linkers (GNU ld) are picky about library order, so if we import libraries as part of our LDFLAGS then that needs to come after any DYLIB_NAME which might require that library.

llvm-svn: 192917
2013-10-17 20:09:33 +00:00
Ed Maste 4a1c279795 Correct log message typo: ended ad -> ended at
llvm-svn: 192897
2013-10-17 14:03:07 +00:00
Ed Maste 737e92b036 Remove unused DWARFCompileUnit::Extract variant
llvm-svn: 192893
2013-10-17 13:23:03 +00:00
Greg Clayton 312bcbe8b4 <rdar://problem/14972424>
- Made the dynamic register context for the GDB remote plug-in inherit from the generic DynamicRegisterInfo to avoid code duplication
- Finished up the target definition python setting stuff.
- Added a new "slice" key/value pair that can specify that a register is part of another register:
    { 'name':'eax', 'set':0, 'bitsize':32, 'encoding':eEncodingUint, 'format':eFormatHex, 'slice': 'rax[31:0]' },
- Added a new "composite" key/value pair that can specify that a register is made up of two or more registers:
    { 'name':'d0', 'set':0, 'bitsize':64 , 'encoding':eEncodingIEEE754, 'format':eFormatFloat, 'composite': ['s1', 's0'] },
- Added a new "invalidate-regs" key/value pair for when a register is modified, it can invalidate other registers:
    { 'name':'cpsr', 'set':0, 'bitsize':32 , 'encoding':eEncodingUint, 'format':eFormatHex, 'invalidate-regs': ['r8', 'r9', 'r10', 'r11', 'r12', 'r13', 'r14', 'r15']},
    
This now completes the feature that allows a GDB remote target to completely describe itself.

llvm-svn: 192858
2013-10-17 01:10:23 +00:00
Greg Clayton 8afa543737 Fixed the MacOSX non "Debug" builds so that "lldb-platform" doesn't fail to link.
llvm-svn: 192857
2013-10-17 00:27:14 +00:00
Sean Callanan 074c314ea0 Added the Windows platform to our .xcodeproj,
and alphabetized the contents of
Source:Plugins:Platform.  This fixes the Mac
OS X build.

llvm-svn: 192833
2013-10-16 19:40:50 +00:00
Sriram Murali 1aeda01c44 lui: enable tab completion in command window
llvm-svn: 192814
2013-10-16 17:08:55 +00:00
Sriram Murali 8a0386654a prevent lui from crashing with small source files
llvm-svn: 192811
2013-10-16 16:48:43 +00:00
Ed Maste e5f2139f68 Fix FreeBSD build after r192714 (Windows command line driver)
llvm-svn: 192789
2013-10-16 13:20:01 +00:00
Sylvestre Ledru 7a05000f18 Unbreak the gcc build (complain about duplicate definition of Initialize/Terminate (done in the cpp code)
llvm-svn: 192780
2013-10-16 09:12:15 +00:00
Ben Langmuir 4a665f1105 A couple of small visual improvements for lui
Change titles to white rather than green text to improve readability on blue
background, and use erase() instead of clear() to reduce flicker in the source
window.

llvm-svn: 192768
2013-10-16 03:01:04 +00:00
Ben Langmuir a084b33fb8 lui: clean up breakpoint window, and allow multi-line list items
* Clean the SBBreakpoint: id = out of the output
* clamp output to window width (eventually we should be able to scroll
left/right)
* On 'tab', expand a breakpoint to show its locations
* Allow enter/space to toggle breakpoints

llvm-svn: 192766
2013-10-16 02:01:41 +00:00
Ben Langmuir ac20991f1d Add a ListWin to cui to show scrollabled lists
Author: Paul Redmond <paul.redmond@intel.com>
llvm-svn: 192765
2013-10-16 02:00:21 +00:00
Enrico Granata ce451cc300 <rdar://problem/15235492>
Extend DummySyntheticProvider to actually use debug-info vended children as the source of information
Make Python synthetic children either be valid, or fallback to the dummy, like their C++ counterparts

This allows LLDB to actually stop bailing out upon encountering an invalid synthetic children provider front-end, and still displaying the non synthetized ivar info

llvm-svn: 192741
2013-10-15 22:42:14 +00:00
Enrico Granata 7dc67a16a4 string.h and clang headers are apparently no longer necessary for SBType to compile
llvm-svn: 192725
2013-10-15 18:14:34 +00:00
Enrico Granata 0e6004b5c9 Unbreak the build on OSX by defining Initialize() and Terminate() for the Windows platform plugin
llvm-svn: 192724
2013-10-15 18:11:29 +00:00
Deepak Panickal 429222c1f6 Patch enabling lldb command line driver to run on windows.
CHANGES:
- Thread locking switched from pthreads to C++11 standard library.
- Abstracted platform specific header includes into 'platform.h'.
- Create editline emulator for windows.
- Emulated various platform dependant functions on windows.
TODO:
- User input currently handled by gets_s(), work started on better handler:
    see _WIP_INPUT_METHOD define blocks in 'ELWrapper.cpp'.
    Aim is to handle 'tab' auto completion on windows.
- Tidy up 'getopt.inc' from lldbHostCommon to serve as LLDB Drivers getopt windows implementation.

llvm-svn: 192714
2013-10-15 15:46:40 +00:00
Deepak Panickal e3eadf0f3b Update makefiles to build PlatformWindows
llvm-svn: 192702
2013-10-15 13:52:20 +00:00
Deepak Panickal a0154f98db Patch to add PlatformWindows, based on Carlo Kok's version from the Windows branch.
llvm-svn: 192693
2013-10-15 12:32:12 +00:00
Greg Clayton ef8180a3f6 <rdar://problem/14972424>
When debugging with the GDB remote in LLDB, LLDB uses special packets to discover the
registers on the remote server. When those packets aren't supported, LLDB doesn't
know what the registers look like. This checkin implements a setting that can be used
to specify a python file that contains the registers definitions. The setting is:

(lldb) settings set plugin.process.gdb-remote.target-definition-file /path/to/module.py

Inside module there should be a function:

def get_dynamic_setting(target, setting_name):

This dynamic setting function is handed the "target" which is a SBTarget, and the 
"setting_name", which is the name of the dynamic setting to retrieve. For the GDB
remote target definition the setting name is 'gdb-server-target-definition'. The
return value is a dictionary that follows the same format as the OperatingSystem
plugins follow. I have checked in an example file that implements the x86_64 GDB
register set for people to see:

    examples/python/x86_64_target_definition.py
    
This allows LLDB to debug to any archticture that is support and allows users to
define the registers contexts when the discovery packets (qRegisterInfo, qHostInfo)
are not supported by the remote GDB server.

A few benefits of doing this in Python:
1 - The dynamic register context was already supported in the OperatingSystem plug-in
2 - Register contexts can use all of the LLDB enumerations and definitions for things
    like lldb::Format, lldb::Encoding, generic register numbers, invalid registers 
    numbers, etc.
3 - The code that generates the register context can use the program to calculate the
    register context contents (like offsets, register numbers, and more)
4 - True dynamic detection could be used where variables and types could be read from 
    the target program itself in order to determine which registers are available since
    the target is passed into the python function.
    
This is designed to be used instead of XML since it is more dynamic and code flow and
functions can be used to make the dictionary.

llvm-svn: 192646
2013-10-15 00:14:28 +00:00
Enrico Granata c0f8ca0e74 Add the capability for LLDB to query an arbitrary Python module (passed in as a file path) for target-specific settings
This is implemented by means of a get_dynamic_setting(target, setting_name) function vended by the Python module, which can respond to arbitrary string names with dynamically constructed
settings objects (most likely, some of those that PythonDataObjects supports) for LLDB to parse

This needs to be hooked up to the debugger via some setting to allow users to specify which module will vend the information they want to supply

llvm-svn: 192628
2013-10-14 21:39:38 +00:00
Sylvestre Ledru 6e2c7cbb26 Revert my commit 191617. It added a clang warning (Thanks to Ed Maste). Add a comment
llvm-svn: 192595
2013-10-14 14:06:28 +00:00
Deepak Panickal 421e884b31 Remove added file for the test commit
llvm-svn: 192580
2013-10-14 10:12:30 +00:00
Deepak Panickal 531912d8e4 Test commit
llvm-svn: 192579
2013-10-14 10:07:04 +00:00
Andy Gibbs 7f14630f4a Suppress "using extended field designator is an extension" warning in use of offsetof.
llvm-svn: 192578
2013-10-14 10:00:11 +00:00
Carlo Kok 7438912fb8 Set the architecture from the remote executable when it's not set so the register info can be loaded properly (and thus the callstacks work)
llvm-svn: 192571
2013-10-14 07:09:13 +00:00
Jim Ingham 05d7084ce9 Report the summed hit count in the breakpoint line.
<rdar://problem/15183226>

llvm-svn: 192518
2013-10-12 00:40:02 +00:00
Sean Callanan 3d01e4cf87 Updated IRExecutionUnit to reflect changes in
RTDYLDMemoryManager.

llvm-svn: 192516
2013-10-11 23:49:55 +00:00
Enrico Granata 98f134835f <rdar://problem/15192088>
gdb-format a (as in p/a) would fail as it needed to set a byte size (unsurprisingly enough)
This should be acknowledged by the condition check and not cause a failure

llvm-svn: 192511
2013-10-11 22:09:26 +00:00
Greg Clayton 93e2861b81 <rdar://problem/15191078>
Fixed Module::ResolveSymbolContextForAddress() to be able to also look in the SymbolVendor's SymbolFile's ObjectFile for a more meaningful symbol when a symbol lookup finds a synthetic symbol from the main object file. This will help lookups on MacOSX as the main executable might be stripped, but the dSYM file always has a full symbol table.

llvm-svn: 192510
2013-10-11 22:03:48 +00:00
Greg Clayton eb023e75dc <rdar://problem/13635174>
Added a way to set hardware breakpoints from the "breakpoint set" command with the new "--hardware" option. Hardware breakpoints are not a request, they currently are a requirement. So when breakpoints are specified as hardware breakpoints, they might fail to be set when they are able to be resolved and should be used sparingly. This is currently hooked up for GDB remote debugging. 

Linux and FreeBSD should quickly enable this feature if possible, or return an error for any breakpoints that are hardware breakpoint sites in the "virtual Error Process::EnableBreakpointSite (BreakpointSite *bp_site);" function.

llvm-svn: 192491
2013-10-11 19:48:25 +00:00
Sean Callanan 8c46baca65 Implemented TruncInst in the IRInterpreter.
<rdar://problem/15188389>

llvm-svn: 192489
2013-10-11 19:45:00 +00:00
Richard Mitton 00dec20f7d This reverts r192484, which I really shouldn't have checked in. Apologies.
llvm-svn: 192488
2013-10-11 19:44:23 +00:00
Ed Maste 52b6e8dac0 Use existing llvm::RoundUpToAlignment in ELF note parsing
llvm-svn: 192486
2013-10-11 19:39:42 +00:00
Richard Mitton b5637b62f2 Fixed bad return code, which would cause invalid expressions to silently fail.
llvm-svn: 192484
2013-10-11 19:16:28 +00:00
Ed Maste 5480365b25 Simplify indirect rld_map for mips (rework r192408).
Just pass a Target* into ObjectFileELF::GetImageInfoAddress so that
it can do the extra dereference necessary on MIPS, instead of passing
a flag back to the caller.

Review: http://llvm-reviews.chandlerc.com/D1899
llvm-svn: 192469
2013-10-11 17:39:07 +00:00
Ed Maste 795d2b9f95 Expected FreeBSD failure due to pr 17430
llvm-svn: 192467
2013-10-11 17:24:16 +00:00
Daniel Malea e33c4ba05c Add LLVM license headers to lldb ui frontend
llvm-svn: 192466
2013-10-11 17:13:07 +00:00
Ed Maste 27738bec75 Eliminate integer sign comparison warning
llvm-svn: 192462
2013-10-11 16:30:20 +00:00
Jason Molenda 7b54a4cfeb Expand some embedded tab chars to spaces - no changes other than whitespace.
llvm-svn: 192420
2013-10-11 04:29:38 +00:00
Ed Maste 04a8bab047 Support mips shared object debug info
MIPS's .dyanamic section is read-only.  Instead of using DT_DEBUG for
the pointer to dyld information it uses a separate tag DT_MIPS_RLD_MAP
which points to storage in the read-write .rld_map section, which in
turn points to the dyld information.

Review: http://llvm-reviews.chandlerc.com/D1890
llvm-svn: 192408
2013-10-11 01:16:08 +00:00
Jason Molenda e65c0feb76 Document the QEnvironmentHexEncoded packet, and explain why it is
often preferable to use this instead of QEnvironment.

llvm-svn: 192400
2013-10-10 22:02:09 +00:00
Ed Maste d616c97a81 Update comment (MIPS also has 32-bit opcodes)
llvm-svn: 192388
2013-10-10 19:17:07 +00:00
Ed Maste 1b475f1691 Initial FreeBSD mips64 ProcessMonitor support
Committing early to ease tracking other ongoing POSIX changes.

Review: http://llvm-reviews.chandlerc.com/D1886
llvm-svn: 192387
2013-10-10 19:14:55 +00:00
Greg Clayton 896005804d <rdar://problem/14146606>
Fixed an issue where environment variables that contained special characters '$' and '#' would hose up the GDB server packet. We now use the QEnvironmentHexEncoded packet that has existed for a long time when we need to. Also added code that will stop sending the QEnvironmentHexEncoded and QEnvironment packets if they aren't supported.

llvm-svn: 192373
2013-10-10 17:53:50 +00:00
Greg Clayton dd88bfd092 Removed the -t options from linking flags to avoid having the linker print out all .o files it was linking with.
llvm-svn: 192372
2013-10-10 17:51:57 +00:00
Ed Maste bb59e049ba POSIX dyld: handle extra MIPS link map field
On at least FreeBSD and NetBSD there is an extra field in the dyld link
map struct.  I've left an assert for other OSes (i.e., Linux/mips) until
it's determined if they do the same.

llvm-svn: 192358
2013-10-10 16:09:31 +00:00
Ed Maste d8cc39e653 POSIX RegisterContext for mips64
Based on the POSIX x86_64 register context.  This is sufficient for opening
a mips64 (big endian) core file.  Subsequent changes will connect the
disassembler, dynamic loader support, ABI, etc.

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

(Missed "svn add" on this file in r192335)

llvm-svn: 192336
2013-10-10 01:04:21 +00:00
Ed Maste b73f844be3 POSIX RegisterContext for mips64
Based on the POSIX x86_64 register context.  This is sufficient for opening
a mips64 (big endian) core file.  Subsequent changes will connect the
disassembler, dynamic loader support, ABI, etc.

Review: http://llvm-reviews.chandlerc.com/D1873
llvm-svn: 192335
2013-10-10 00:59:47 +00:00
Sean Callanan 394e36dc81 Fixed a leak of ASTStructExtractors and also
made sure we don't keep around no-longer-valid
ASTTransformers.

<rdar://problem/15182379>

llvm-svn: 192333
2013-10-10 00:39:23 +00:00
Michael Sartain 762df1f139 Merge RegisterContextPOSIX_x86_64 and RegisterContextPOSIX_i386 into RegisterContextPOSIX_x86
llvm-svn: 192332
2013-10-10 00:16:10 +00:00
Sean Callanan 931a0def9e Implemented the reverse-lookup API in the AST
importer to avoid duplicate imports of anonymous
structs.

<rdar://problem/14421722>

llvm-svn: 192327
2013-10-09 22:33:34 +00:00
Daniel Malea 4c3261d1b3 Initial checkin of curses-based LLDB UI (lui)
LLDB (Terminal) User Interface
==============================
This directory contains the curses user interface for LLDB. To use it, ensure Python can find your lldb module. You may have to modify PYTHONPATH for that purpose:

$ export PYTHONPATH=/path/to/lldb/module

Then, run the lui.py. To load a core file:
$ ./lui.py --core core

To create a target from an executable:
$ ./lui.py /bin/echo "hello world"

To attach to a running process:
$ ./lui.py --attach <pid>


Known Issues
============
1. Resizing the terminal will most likely cause lui to crash.
2. Missing paging in command-window
3. Only minimal testing (on Ubuntu Linux x86_64)

Missing Features
================
- stdin/stdout/stderr windows
- memory window
- backtrace window
- threads window
- tab-completion
- syntax-highlighting (via pygments library)
- (local) variables window
- registers window
- disassembly window
- custom layout

llvm-svn: 192326
2013-10-09 22:11:30 +00:00
Ed Maste b0e33d4165 Fix endianness in ObjectFile::CopyData
ObjectFile::CopyData is used to copy a block of target memory to the
caller's buffer (e.g. for "memory read").  This should be a straight
memcpy, and not byte-swapped if the target and host have different
endianness.

Add a new DataExtractor::CopyData() method that performs this straight
copy and use it in ObjectFile::CopyData().

llvm-svn: 192323
2013-10-09 20:34:25 +00:00
Ed Maste 9715936d9e Add logging for POSIX DYLD failures
llvm-svn: 192322
2013-10-09 19:57:11 +00:00
Matt Kopec 718be877f8 Add exec support for Linux including common support for POSIX.
llvm-svn: 192319
2013-10-09 19:39:55 +00:00
Matt Kopec dc7c73c604 Add error checking to 'cmd' buffer as it may not be available (ie. in the case of exec).
llvm-svn: 192318
2013-10-09 19:23:34 +00:00
Ed Maste 63de98b0a0 Add missing space between words in comment
llvm-svn: 192307
2013-10-09 18:03:24 +00:00
Michael Sartain 15c07b90c0 Re-enable test_convenience_registers_16bit_with_process_attach test for Linux.
Remove 32-bit POSIX register hack in ConvertBetweenRegisterKinds.

llvm-svn: 192306
2013-10-09 17:44:52 +00:00
Daniel Malea 9e9919f043 Allow Process::WaitForProcessToStop to return immediately if process is already in the stopped state
- By default, the above function will wait for at least one event
- Set wait_always=false to make the function return immediately if the process is already stopped

llvm-svn: 192301
2013-10-09 16:56:28 +00:00
Ed Maste 76a3c33d41 Fix filenames in header comment blocks
llvm-svn: 192296
2013-10-09 14:18:45 +00:00
Jason Molenda a3a542ff21 Handle the case where completing variables in a frame
with no source-level debug information correctly.
<rdar://problem/15182936> 

llvm-svn: 192268
2013-10-09 02:39:26 +00:00
Sean Callanan c707f32fbe Fixed a bug where variables' byte sizes would not
respect their Clang types if the variables' values
were represented by DWARF constu values.

<rdar://problem/14636499>

llvm-svn: 192267
2013-10-09 02:32:37 +00:00
Sean Callanan 3e68903e58 Fixed a bug in the Materializer where we sent the
wrong information to ValueObjectConstResult.

<rdar://problem/15101795>

llvm-svn: 192264
2013-10-09 02:04:57 +00:00
Michael Sartain 704bf8912e Clean up RegisterContextPOSIX i386 code.
Use 32-bit register enums without gaps on 64-bit hosts.
Don't show 64-bit registers when debugging 32-bit targets.
Add psuedo gpr registers (ax, ah, al, etc.)
Add mmx registers.
Fix TestRegisters.py to not read ymm15 register on 32-bit targets.
Fill out and move gcc/dwarf/gdb register enums to RegisterContext_x86.h

llvm-svn: 192263
2013-10-09 01:28:57 +00:00