summaryrefslogtreecommitdiffstats
path: root/lldb
Commit message (Collapse)AuthorAgeFilesLines
* Rename lldb registers to contain lldb_ prefix.Zachary Turner2014-11-216-795/+796
| | | | | | | | | | | | | | | | | | | | LLDB supports many different register numbering schemes, and these are typically prefixed with an indicator that lets the user know what numbering scheme is used. The gcc numbering scheme is prefixed with gcc, and there are similar ones for dwarf, gdb, and gcc_dwarf. LLDB also contains its own internal numbering scheme, but the enum for LLDB's numbering scheme was prefixed differently. This patch changes the names of these enums to use the same naming scheme for the enum values as the rest of the register kinds by removing gpr_ and fpu_ prefixes, and instead using lldb_ prefixes for all enum values. Differential Revision: http://reviews.llvm.org/D6351 Reviewed by: Greg Clayton llvm-svn: 222495
* Add a test for the driver's "-k" option.Jim Ingham2014-11-211-1/+3
| | | | llvm-svn: 222484
* Make the option parsing of -k & -K match the help strings.Jim Ingham2014-11-201-2/+2
| | | | llvm-svn: 222479
* Remove duplicated enum, use the authoritative one.Zachary Turner2014-11-201-275/+2
| | | | | | | | | Running a diff against lldb-x86-register-enums.h and the file modified in this patch, the two enums were completely identical. Deleting one of them to reduce code noise. llvm-svn: 222478
* [ProcessWindows] Implement a RegisterContextWindows for x86.Zachary Turner2014-11-206-11/+460
| | | | | | | | | | | | | | | This implements the skeleton of a RegisterContext for Windows. In particular, this implements support only for x86 general purpose registers. After this patch, LLDB on Windows can perform basic debugging operations in a single-threaded inferior process (breakpoint, register inspection, frame select, unwinding, etc). Differential Revision: http://reviews.llvm.org/D6322 Reviewed by: Greg Clayton llvm-svn: 222474
* "nexti" should not step over inlined functions.Jim Ingham2014-11-201-1/+28
| | | | | | <rdar://problem/16705325> llvm-svn: 222459
* Remove decorator for FreeBSD test that now passesEd Maste2014-11-201-1/+0
| | | | llvm-svn: 222449
* Add decorator for FreeBSD failureEd Maste2014-11-201-0/+1
| | | | | | llvm.org/pr21620 llvm-svn: 222442
* Properly specify a few checksum values for llgs tests.Stephane Sezer2014-11-204-7/+7
| | | | | | | | | | | | | | Summary: In noack mode, these checksums are ignored by llgs, but some implementations need them still. Specify these checksums to ease integration. Test Plan: Run the tests before and after the change and make sure nothing breaks. Reviewers: clayborg, tfiala Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D6343 llvm-svn: 222441
* Fix a typo in lldb-gdb-remote.txt.Stephane Sezer2014-11-201-1/+1
| | | | | | | | | | | | Test Plan: None. Reviewers: clayborg Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D6342 llvm-svn: 222440
* Add test for denied process attach by pid and fix found bugs in ↵Oleksiy Vyalov2014-11-197-16/+165
| | | | | | | | | | Process/ProcessPOSIX.cpp and FreeBSD/ProcessMonitor. http://reviews.llvm.org/D6240 llvm-svn: 222372
* Fix broken build after removing StringMap::GetOrCreateValue in favor of ↵Oleksiy Vyalov2014-11-191-3/+3
| | | | | | StringMap::insert. llvm-svn: 222370
* Add additional checks to the SavedLocationForRegister methodJason Molenda2014-11-191-5/+28
| | | | | | | | | | | | | | where it is retrieving the Return Address register contents on a target where that's a thing. If we fail to get a valid RA, we force a switch to the fallback unwind plan. This patch adds a sanity check for that fallback unwind plan -- it must get a valid CFA for this frame in addition to being able to retrieve the caller's PC -- and it correctly marks the unwind rules as failing if the fallback unwind plan fails. <rdar://problem/19010211> llvm-svn: 222301
* Add "-k" and "-K" options to the driver, that allow you to register Jim Ingham2014-11-192-98/+193
| | | | | | | | | | | | some commands that will get run if the target crashes. Also fix the bug where the local .lldbinit file was not getting sourced before not after the target was created from the file options on the driver command line. <rdar://problem/19019843> llvm-svn: 222295
* Shuffle APIs around a little bit, so that if you pass custom summary ↵Enrico Granata2014-11-186-15/+31
| | | | | | options, we don't end up caching the summary hence obtained. You may want to obtain an uncapped summary, but this should not be reflected in the summary we cache. The drawback is that we don't cache as aggressively as we could, but at least you get to have different summaries with different options without having to reset formatters or the SBValue at each step llvm-svn: 222280
* Add the ability for the NSString and libc++ std::string formatters to ↵Enrico Granata2014-11-185-7/+38
| | | | | | retrieve uncapped data llvm-svn: 222277
* Allow dsymutil to exists in a path with spaces in itEnrico Granata2014-11-181-1/+1
| | | | llvm-svn: 222276
* Revert "git-svn test commit"Ismail Pazarbasi2014-11-181-1/+0
| | | | | | This reverts commit aa8d370ee798f75bc05a1ae9a240bc3e5b6870ac. llvm-svn: 222275
* git-svn test commitIsmail Pazarbasi2014-11-181-0/+1
| | | | llvm-svn: 222273
* More override warning cleanup.Eric Christopher2014-11-181-3/+3
| | | | llvm-svn: 222271
* Find SWIG with CMakeIsmail Pazarbasi2014-11-183-17/+20
| | | | | | | | | | SWIG is searched under certain paths within python script. CMake can detect SWIG with find_package(SWIG). This is used iff user checks LLDB_ENABLE_PYTHON_SCRIPTS_SWIG_API_GENERATION. If buildSwigWrapperClasses.py does not receive swigExecutable argument, then the script will use its current search implementation. llvm-svn: 222262
* Fixed the stop hook test after recent editline changes.Greg Clayton2014-11-181-3/+9
| | | | llvm-svn: 222246
* Add decorator for test that fails on FreeBSD after editline reworkEd Maste2014-11-181-0/+1
| | | | | | llvm.org/21599 llvm-svn: 222245
* Patch from dawn@burble.org to make the --silent-run do what it says, not the ↵Jim Ingham2014-11-181-3/+3
| | | | | | opposite of what it says. llvm-svn: 222243
* Fix up the code in the FuncUnwinders class thatJason Molenda2014-11-182-16/+16
| | | | | | | | | | retrieves the personality routine addr and the LSDA addr. Don't bother checking with the "non-call site" unwind plan - this kind of information is only going to come from the call site unwind plan. llvm-svn: 222226
* Add documentation for the SBTarget::ReadInstructions andJason Molenda2014-11-181-2/+27
| | | | | | | | | SBTarget::GetInstructions APIs so it's a little clearer to understand which should be used. <rdar://problem/18787018> llvm-svn: 222225
* Make the mutex ivar in Unwind recursive so we don't have a threadJason Molenda2014-11-181-1/+1
| | | | | | | | | deadlocking when we have the base Unwind class and the HistoryUnwind subclass both trying to acquire the lock on the same thread to clear their respective ivar state. <rdar://problem/18986350> llvm-svn: 222221
* Read the LSDA and Personality Routine function address out of theJason Molenda2014-11-186-5/+166
| | | | | | | | | | | | | | | | | | | | | eh_frame data. These two pieces of information are used in the process of exception handler unwinding on SysV ABI systems. This patch reads the data from the eh_frame section (DWARFCallFrameInfo.cpp), allows for it to be saved & read out of a given UnwindPlan (UnwindPlan.h, UnwindPlan.cpp) - as well as printing the information in the UnwindPlan::Dump method - and adds methods to the FuncUnwinders object so that higher levels can query if a given function has an LSDA / personality routine defined. It's only lightly tested, but seems to be working correctly as long as your have this information in eh_frame. Does not address getting this information from compact unwind yet on Darwin systems. <rdar://problem/18742797> llvm-svn: 222214
* Have CommandObjectCommandsAddRegex inherit from IOHandlerDelegateMultiline ↵Greg Clayton2014-11-181-58/+16
| | | | | | | | | | | | so it will not immediately terminate after the first regular expression in "command regex <name>" commands. Fixed the prompt to not include non-printable characters as it was hosing up the prompt when you ran "command regex foo" and entered multi-line editing mode. Fixed error strings to include more complete descriptions when bad regular expressions are entered. Removed the old IOHandlerLinesUpdated function as it is no longer needed (inheriting from IOHandlerDelegateMultiline takes care of what this function used to do). llvm-svn: 222207
* Fixed a broken test suite test after recent editline merges.Greg Clayton2014-11-181-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The problem is that editline currently is trying to be smart when we paste things into a terminal window. It detects that input is pending and multi-line input is accepted as long as there is anything pending. So if you open lldb and paste the text between the quotes: "command regex carp s/^$/help/ carp " We still still be stuck in the "command regex" multi-line input reader as it will have all three lines: "s/^$/help/ carp " The true fix for this is something Kate Stone will soon work on: - multi-line input readers must opt into this paste/pending input feature ("expr" will opt into it, all other commands won't) - If we are in a multi-line input reader that requests this and stuff is pasted, then it will do what it does today - if we start in a IOHandler that doesn't need/want pending input and text is pasted, and we transistion to a IOHandler that does want this functionality, then disable the pending input. Example text would be: "frame variable thread backtrace expr for (int i=0;i<10;++i) (int)printf("i = %i\n", i); frame select 0 " When we push the expression multi-line reader we would disable the pending input because we had pending input _before_ we entered "expr". If we did this first: (lldb) expr Then we pasted: "void foo() { } void bar() { } " Then we would allow the pending input to not look for an empty line to terminate the expression. We filed radar 19008425 to track fixing this issue. llvm-svn: 222206
* Fix a problem where the StringPrinter could be mistaking an empty string for ↵Enrico Granata2014-11-173-1/+5
| | | | | | a read error, and reporting spurious 'unable to read data' messages. rdar://19007243 llvm-svn: 222190
* Add APIs on SBFunction and SBCompileUnit to inquire about the language type ↵Enrico Granata2014-11-176-0/+30
| | | | | | that the function/compile unit is defined in llvm-svn: 222189
* Fix override/virtual warnings.Eric Christopher2014-11-171-22/+23
| | | | llvm-svn: 222186
* Change HostThread::GetNativeThread() to return a derived reference.Zachary Turner2014-11-178-32/+46
| | | | | | | | Previously using HostThread::GetNativeThread() required an ugly cast to most-derived type. This solves the issue by simply returning the derived type directly. llvm-svn: 222185
* Fix broken NativeProcessLinux.cpp after signature change of ResolveExecutable.Oleksiy Vyalov2014-11-171-1/+1
| | | | llvm-svn: 222184
* Fix broken Linux build after signature change of ResolveExecutable.Oleksiy Vyalov2014-11-173-11/+13
| | | | llvm-svn: 222182
* Move the thread logic around to fit better into LLDB's process model.Zachary Turner2014-11-173-27/+72
| | | | | | | | | | | Previously we were directly updating the thread list and stopping and restarting the process every time threads were created. With this patch, we queue up thread launches and thread exits, resolve these all internally, and only update the threads when we get an UpdateThreadList call. We now only update the private state on an actual stop (i.e. breakpoint). llvm-svn: 222178
* Disable Editline on Windows.Zachary Turner2014-11-174-11/+23
| | | | | | | | | | | | | | | | | | | | Editline does not work correctly on Windows. This goes back at least to r208369, and as a result r210105 was submitted to disable libedit at runtime on Windows. More recently, r222163 was submitted which re-writes editline entirely, but makes the situation even worse on Windows, to the point that it doesn't even compile. While it would be easy to fix the compilation failure, this patch simply stops compiling Editline entirely on Windows, as the simple compilation fix would still result in a broken use of select on Windows, and as such a broken implementation of Editline. Since Editline was already disabled to begin with on Windows, we don't attempt to fix the compilation failure or the underlying issues, and instead just disable it "even more". llvm-svn: 222177
* Fix broken build after signature change of ResolveExecutable.Zachary Turner2014-11-171-1/+3
| | | | llvm-svn: 222176
* Small tweaks to make the editline sources match the lldb Jason Molenda2014-11-172-37/+74
| | | | | | source layout. llvm-svn: 222171
* Fixed more fallout from running the test suite remotely on iOS devices.Greg Clayton2014-11-1737-301/+505
| | | | | | | | | | | | | | | | Fixed include: - Change Platform::ResolveExecutable(...) to take a ModuleSpec instead of a FileSpec + ArchSpec to help resolve executables correctly when we have just a path + UUID (no arch). - Add the ability to set the listener in SBLaunchInfo and SBAttachInfo in case you don't want to use the debugger as the default listener. - Modified all places that use the SBLaunchInfo/SBAttachInfo and the internal ProcessLaunchInfo/ProcessAttachInfo to not take a listener as a parameter since it is in the launch/attach info now - Load a module's sections by default when removing a module from a target. Since we create JIT modules for expressions and helper functions, we could end up with stale data in the section load list if a module was removed from the target as the section load list would still have entries for the unloaded module. Target now has the following functions to help unload all sections a single or multiple modules: size_t Target::UnloadModuleSections (const ModuleList &module_list); size_t Target::UnloadModuleSections (const lldb::ModuleSP &module_sp); llvm-svn: 222167
* Complete rewrite of interactive editing support for single- and multi-line ↵Kate Stone2014-11-1710-916/+1869
| | | | | | | | | | | | | | | | | | | input. Improvements include: * Use of libedit's wide character support, which is imperfect but a distinct improvement over ASCII-only * Fallback for ASCII editing path * Support for a "faint" prompt clearly distinguished from input * Breaking lines and insert new lines in the middle of a batch by simply pressing return * Joining lines with forward and backward character deletion * Detection of paste to suppress automatic formatting and statement completion tests * Correctly reformatting when lines grow or shrink to occupy different numbers of rows * Saving multi-line history, and correctly preserving the "tip" of history during editing * Displaying visible ^C and ^D indications when interrupting input or sending EOF * Fledgling VI support for multi-line editing * General correctness and reliability improvements llvm-svn: 222163
* Not all things callable have an im_self, so harden the test logic against ↵Enrico Granata2014-11-171-1/+1
| | | | | | that. getattr(,,None) is the closest to ?. we have in Python, so use that llvm-svn: 222160
* Fixes for remote test suite execution of the "lldb/test/lang" directory.Greg Clayton2014-11-1716-72/+207
| | | | | | | | | Fixes include: - Add a new lldbtest.TestBase function named registerSharedLibrariesWithTarget. This function can be called using the shared libraries for your test suite either as shared library basename ("foo"), path basename ("libfoo.dylib") or full path ("/tmp/lldb/test/lang/c/carp/libfoo.dylib"). These shared libraries are then registered with the target so they will be downloaded when the test is run remotely. - Changed a lot of tests over to use SBDebugger::CreateTarget(...) calls instead of using "file a.out" commands. - Cleaned up some tests to add new locations for breakpoints that all compilers should be able to abide by. Some tests and constants being loaded into values of structs and some compilers like arm64 will often combine two constant data loads into a single source line so some breakpoint locations were not being set correctly. Adding lines like 'puts("")' allow us to lock onto a source line that will have code. llvm-svn: 222156
* Fix buildSwigWrapperClasses.py after recent break.Zachary Turner2014-11-171-7/+28
| | | | | | | A re-ordering of some enum values exposed a lingering bug where an invalid key was indexing a dictionary. llvm-svn: 222154
* Fix some issue with running the test suite remotely on iOS.Greg Clayton2014-11-171-5/+18
| | | | | | | - Added a new "--apple-sdk" flag that can be specified on Darwin only so the correct cross compilers can be auto-selected without having to specify the "--compiler" flag. - Set SDKROOT if needed llvm-svn: 222153
* Reformat lldb-mi using clang-format.Zachary Turner2014-11-17159-25407/+26209
| | | | | | Courtesy of dawn@burble.org. llvm-svn: 222150
* [ProcessWindows] Create a TargetThreadWindows class.Zachary Turner2014-11-176-48/+200
| | | | | | | | | | | This creates a TargetThreadWindows class and updates the thread list of the Process with the main thread. Additionally, we fill out a few more overrides of Process base class methods. We do not yet update the thread list as threads are created and/or destroyed, and we do not yet propagate stop reasons to threads as their states change. llvm-svn: 222148
* [ProcessWindows] Implement read / write process memory.Zachary Turner2014-11-173-3/+36
| | | | llvm-svn: 222147
* Fix Darwin and FreeBSD OS type detectionEd Maste2014-11-171-8/+11
| | | | | | Obtained in part from http://reviews.llvm.org/D6290 llvm-svn: 222136
OpenPOWER on IntegriCloud