Commit Graph

5347 Commits

Author SHA1 Message Date
Jason Molenda f8310d40c8 Include string.h for memset() prototype. Thanks Dmitri.
llvm-svn: 205115
2014-03-29 19:29:04 +00:00
Jason Molenda a332978b2a lldb arm64 import.
These changes were written by Greg Clayton, Jim Ingham, Jason Molenda.

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

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

llvm-svn: 205113
2014-03-29 18:54:20 +00:00
Jim Ingham 914f4e7092 Add the ability from the SB API's to set the "one thread" timeout
for expression evaluations that try one and then all threads.

<rdar://problem/15598528>

llvm-svn: 205060
2014-03-28 21:58:28 +00:00
Jim Ingham 6c8824d216 Wait for the reply from the 'D' detach packet before tearing down the debugger. Avoids a race
condition where we could end up killing debugserver (and thus the target) before it had a chance
to detach.
Also fix debugserver to send the OK AFTER it detaches to avoid the same race condition.

<rdar://problem/16202713>

llvm-svn: 205043
2014-03-28 20:00:07 +00:00
Greg Clayton 241de26bdf Add the "lldb_complete" .editrc command back in case veteran users of LLDB had .editrc key mappings in their ~/.editrc.
<rdar://problem/16279283>

llvm-svn: 204870
2014-03-26 22:48:57 +00:00
Greg Clayton bc711e0575 Fixed a crasher when using 1 character type names in “type summary”, “type synthetic” and “type filter”.
Also fixed a missing return when making python summary functions on the fly.

<rdar://problem/16265491>

llvm-svn: 204867
2014-03-26 22:35:52 +00:00
Sean Callanan c4ca2c1d60 Made the Materializer not write back variables
if they didn't change, just like it does for
registers.  This makes life easier for kernel
debugging and any other situation where values
are read-only.

<rdar://problem/16367795>

llvm-svn: 204764
2014-03-25 22:30:19 +00:00
Enrico Granata 894f735953 <rdar://problem/14862302>
For small structs, the frame format now prints them as one-liners
This follows the same definition that frame variable does for deciding what a "small struct" is, and as such should be fairly consistent with the variable display in general

llvm-svn: 204762
2014-03-25 22:03:52 +00:00
Andrew MacPherson 6ef17b96aa Make ProcessLinux return true for DetachRequiresHalt() because PTRACE_DETACH requires this.
llvm-svn: 204759
2014-03-25 21:40:04 +00:00
Enrico Granata afcbdb1570 <rdar://problem/14515139>
Add a GetFoundationVersion() to AppleObjCRuntime
This API is used to return and cache the major version of Foundation.framework, which is potentially a useful piece of data to key off of to enable or disable certain ObjC related behaviors (especially in data formatters)

llvm-svn: 204756
2014-03-25 20:53:33 +00:00
Andrew MacPherson c3826b5ba6 Move calls to DisableAllBreakpointSites() and m_thread_list.DiscardThreadPlans() into base Process::Destroy() instead of in subclass DoDestroy() methods.
llvm-svn: 204752
2014-03-25 19:59:36 +00:00
Sean Callanan 9287289d66 Added a missing "break" to avoid falling through
when other cases get added.

llvm-svn: 204751
2014-03-25 19:47:07 +00:00
Sean Callanan 576a4374b7 Fixed the IRInterpreter to ignore call instructions
that call debug-information intrinsics.

llvm-svn: 204750
2014-03-25 19:33:15 +00:00
Todd Fiala 4339f3a434 Improve Elf object file UUID calculation performance.
This change makes significant improvements in the performance of
calculating a UUID within ObjectFileELF, and handles both running
processes and core files correctly. This does lazy evaluation of
UUID generation and caches the result when calculated.

Change by Piotr Rak.

llvm-svn: 204749
2014-03-25 19:29:09 +00:00
Greg Clayton fc03f8fcb6 A fix for: http://llvm.org/bugs/show_bug.cgi?id=19241
When there was no process, the expression options were set to not ignore breakpoints. This causes debug info to be generated and causes errors when evaluating simple expressions.

llvm-svn: 204745
2014-03-25 18:47:07 +00:00
Ed Maste b9fe0dd781 Add ObjectFileJIT library
llvm-svn: 204698
2014-03-25 02:03:28 +00:00
Jim Ingham 2f2c876e4f Make "disassemble -a" work when the target is not running yet. It will dump all the functions matching that address, just like "disassemble -n" does before running.
<rdar://problem/16406570>

llvm-svn: 204689
2014-03-25 00:15:47 +00:00
Greg Clayton 6f228bf965 Add ObjectFile/JIT to the makefile.
llvm-svn: 204685
2014-03-24 23:30:43 +00:00
Greg Clayton 8541258b4e Make cmake build the new ObjectFileJIT.
llvm-svn: 204683
2014-03-24 23:11:37 +00:00
Greg Clayton 23f8c95a44 JITed functions can now have debug info and be debugged with debug and source info:
(lldb) b puts
(lldb) expr -g -i0 -- (int)puts("hello")

First we will stop at the entry point of the expression before it runs, then we can step over a few times and hit the breakpoint in "puts", then we can continue and finishing stepping and fininsh the expression.

Main features:
- New ObjectFileJIT class that can be easily created for JIT functions
- debug info can now be enabled when parsing expressions
- source for any function that is run throught the JIT is now saved in LLDB process specific temp directory and cleaned up on exit
- "expr -g --" allows you to single step through your expression function with source code

<rdar://problem/16382881>

llvm-svn: 204682
2014-03-24 23:10:19 +00:00
Greg Clayton baf6e8e4b1 Include <mutex> for std::once.
llvm-svn: 204632
2014-03-24 18:08:18 +00:00
Hafiz Abid Qadeer b768fe5ea1 Renamed a struct from i386 to i386_.
It is to avoid build error when gcc defines i386.

llvm-svn: 204628
2014-03-24 17:33:09 +00:00
Greg Clayton 1d77a8203b Modified patch from Piotr Rak that makes GetSharedModuleList() more thread safe and also fixed a missed member initialization on the copy contractor and also makes the assignment operator safer.
llvm-svn: 204622
2014-03-24 16:50:33 +00:00
Arnaud A. de Grandmaison 62e5f4de3d Cleanup some dead assignements reported by scan-build
No functionnal change.

llvm-svn: 204545
2014-03-22 20:23:26 +00:00
Jim Ingham 7dabe1a1b6 If a single step ends on a breakpoint, it should be reported as a breakpoint hit
even though the underlying exception is a trace exception.

<rdar://problem/15243355>

llvm-svn: 204534
2014-03-22 00:44:41 +00:00
Andrew MacPherson ea77a5528d Suppress SIGSTOP under Linux and don't explicitly call SetResumeSignal() in POSIXThread, instead just let StopInfo handle it.
llvm-svn: 204504
2014-03-21 19:08:37 +00:00
Hafiz Abid Qadeer 8455c44e6c Don't build LLDBWrapPython.cpp for mingw.
Previous check relied on -DLLDB_DISABLE_PYTHON which was not valid as
it is defined in the top level LLDB Makefile which is included after the check.
If this check is moved after the inclusion of top level Makefile then 
BUILT_SOURCES is not properly handled. So I am using the scheme present
in the Host/Makefile.

llvm-svn: 204459
2014-03-21 12:53:28 +00:00
Greg Clayton 56b26a5707 Fixed case typo.
llvm-svn: 204402
2014-03-20 21:45:00 +00:00
Greg Clayton 906e9acf91 Switch over to use the ArchSpec::GetMachine() instead of ArchSpec::GetCore() to keep the code more portable as we add new core types to ArchSpec.
llvm-svn: 204400
2014-03-20 21:31:55 +00:00
Greg Clayton f587f8ec9a Add support for dumping DW_LNE_set_discriminator line table extended entries.
llvm-svn: 204369
2014-03-20 18:31:11 +00:00
Ed Maste d494b29596 Quiet Clang warning about signed/unsigned comparison
llvm-svn: 204360
2014-03-20 17:34:26 +00:00
Jim Ingham e1c34bf380 Guard against reading from host address of 0 in getting the data from a Value.
llvm-svn: 204359
2014-03-20 17:13:28 +00:00
Hafiz Abid Qadeer 10511b2a73 Change the type in va_arg call from char to int.
It is supposed to take fully promoted types.

llvm-svn: 204336
2014-03-20 11:24:44 +00:00
Saleem Abdulrasool a68f7b67f1 cleanup unreferenced functions
This is a mechanical cleanup of unused functions.  In the case where the
functions are referenced (in comment form), I've simply commented out the
functions.  A second pass to clean that up is warranted.

The functions which are otherwise unused have been removed.  Some of these were
introduced in the initial commit and not in use prior to that point!

NFC

llvm-svn: 204310
2014-03-20 06:08:36 +00:00
Saleem Abdulrasool 2643b9053e Core: preprocess out TestPromptFormats
TestPromptFormats appears as though it may be a useful unit test.
Unfortunately, there is no invocation mechanism in place right now.  It is
unclear how to add a unit test for this scenario to the existing tests.  It
would be ideal to remove this entirely, but I am hopeful that this can/will be
pulled out into a test still since it uses a user accessible interface.

llvm-svn: 204309
2014-03-20 06:08:21 +00:00
Enrico Granata fcd974a1ed rdar://16361422
Add NSMutableData to the list of types that the NSData formatter knows to represent

llvm-svn: 204289
2014-03-20 01:15:44 +00:00
Greg Clayton ec99086718 Change the backtrace view into a process tree view where you can expand the process, its threads and see all frames under each thread.
llvm-svn: 204251
2014-03-19 16:22:48 +00:00
Ed Maste a09ed03ce1 Fix expression parsing (on FreeBSD, at least)
This reverts part of r204112 (Expression: cleanup unused include).
It looks like MCJIT.h is required to force MCJIT to be linked.

llvm-svn: 204170
2014-03-18 18:55:06 +00:00
Saleem Abdulrasool 47a35dfd7c Expression: cleanup unused include
The standard JIT has been discarded in favour of MCJIT.  USE_STANDARD_JIT is no
longer defined.  Furthermore, the execution engine is now built in
IRExecutionUnit.  Simply remove inclusion of both JIT headers.

llvm-svn: 204112
2014-03-18 04:43:53 +00:00
Saleem Abdulrasool 44edda0af7 create constants for multichar constants
Multichar constants are not portable as the byte order is undefined.  Use a
constant value instead.  This avoids a warning when compiling with gcc 4.8+
(-Wmultichar) and makes the code more portable.

llvm-svn: 204110
2014-03-18 04:43:47 +00:00
Jim Ingham 0eed738008 Get "ThreadPlanShouldStopHere" to handle auto-stepping through line number 0 code.
llvm-svn: 204087
2014-03-17 23:03:34 +00:00
Ed Maste 263c9280b3 Correct copy-and-pasted comments for DetachOperation
llvm-svn: 204064
2014-03-17 17:45:53 +00:00
Ed Maste b3a5333b07 Update copy-and-pasted log message
llvm-svn: 204057
2014-03-17 17:05:22 +00:00
Greg Clayton 26c1fe3568 Parse DW_AT_ranges for compile units on Darwin when .debug_aranges is not available for the current compile unit.
<rdar://problem/16321434> 

llvm-svn: 203985
2014-03-14 23:36:38 +00:00
Saleem Abdulrasool eb4592b18d build: fix libxml2 detection via CMake
libxml2's include path was unconditionally set to /usr/include/libxml2.  This
would work previously, however, Mavericks removed the /usr/include directory.
Since LLDB already requires clang, which via LLVM's build infrastructure
searches for libxml2, we have a proper include path for libxml2.  If
LIBXML2_FOUND is set, do not touch the libxml2 search path.  Instead, allow the
clang's definition to propagate throughout the LLVM build.  Otherwise, switch to
find_package(LibXml2) as clang does.  This will ensure that the correct path is
used for libxml2 irrespective of the platform.

Furthermore, treat libxml2 as a system provided library.  It is not part of the
LLVM source base so it is of little value to enable all warnings on its headers.
This unifies the treatment of libxml2 across clang and LLDB.

llvm-svn: 203955
2014-03-14 18:23:07 +00:00
Greg Clayton 05da458caf One more time. Multi-line expressions when there is no valid expression that follow “expr [options] —“.
llvm-svn: 203874
2014-03-13 23:48:40 +00:00
Greg Clayton 487143fdd3 Fixed crasher when “expr” was NULL due to no characters following the terminating "--".
llvm-svn: 203873
2014-03-13 23:46:26 +00:00
Greg Clayton cf28a8b7cd Allow a multi-line expression to follow expression commands with options when there is no expression following the option terminating “—“.
llvm-svn: 203872
2014-03-13 23:42:30 +00:00
Todd Fiala 8a5c5a016c Fix cmake build issues on Darwin.
llvm-svn: 203850
2014-03-13 21:16:13 +00:00
Hafiz Abid Qadeer b4bc64962a Changed "Windows.h" to "windows.h".
I missed this one in my earlier commit a few days ago.

llvm-svn: 203787
2014-03-13 11:39:01 +00:00