summaryrefslogtreecommitdiffstats
path: root/lldb/source
Commit message (Collapse)AuthorAgeFilesLines
...
* Failsafe directory for shared objects and support executables.Chaoren Lin2015-02-101-0/+9
| | | | llvm-svn: 228716
* Adding x86 to supported architectures on x86_64.Chaoren Lin2015-02-101-0/+1
| | | | llvm-svn: 228715
* Fix the LLDB build under Debian KfreebsdSylvestre Ledru2015-02-103-1/+12
| | | | | | | | | | | | | | Summary: I don't know if there is a better way for the change in source/Host/freebsd/ThisThread.cpp Reviewers: emaste Subscribers: hansw, emaste, lldb-commits Differential Revision: http://reviews.llvm.org/D7441 llvm-svn: 228710
* Fixed a problem where we might omit some breakpoints when using DWARF in .o ↵Greg Clayton2015-02-101-2/+1
| | | | | | | | | | files. The problem occurred when we had incorrect address ranges in the debug map that included the padding between functions causing the end address of a line table entry to fall into an inlinked (next function) address range. <rdar://problem/19721144> llvm-svn: 228707
* And make the globbing behavior available via the SB APIEnrico Granata2015-02-101-0/+12
| | | | llvm-svn: 228660
* Add a "launch with globber" mode that lets you launch a process after having ↵Enrico Granata2015-02-103-2/+100
| | | | | | globbed the command line arguments via argdumper instead of routing via /bin/sh llvm-svn: 228658
* Add JSON.cpp to CMakeLists.txtChaoren Lin2015-02-101-0/+1
| | | | llvm-svn: 228639
* Add a JSON producer to LLDB - this is a set of classes that encapsulate JSON ↵Enrico Granata2015-02-101-0/+217
| | | | | | | | objects and allow you to write them to a Stream for subsequent processing Using this JSON producer, write a little tool that expands its own command-line arguments and dumps them to stdout as a JSON array llvm-svn: 228636
* Dont' use O_CLOEXEC on Windows, since it doesn't exist.Zachary Turner2015-02-091-1/+5
| | | | llvm-svn: 228590
* Fix descriptor leak in multi-target debuggingPavel Labath2015-02-091-2/+3
| | | | | | | | | | | | | | | Summary: When debugging two targets concurrently, the pseude terminal master fd from the first one would leak into the second. This fixes the problem by setting O_CLOEXEC on the master fd. Test included. Reviewers: clayborg, vharron Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D7466 llvm-svn: 228570
* Fix sorting. Spotted by emaste.Justin Hibbits2015-02-081-1/+1
| | | | llvm-svn: 228549
* PowerPC64 host also supports 32-bit binaries, so note it.Justin Hibbits2015-02-081-1/+1
| | | | llvm-svn: 228548
* Fix off-by-one IsGPR().Justin Hibbits2015-02-081-1/+1
| | | | | | | f0 was being counted as a GPR, due to the check in IsGPR(). Correct it by looking at the precise GPR range. llvm-svn: 228547
* Fix a handling of full path in break-insert.Hafiz Abid Qadeer2015-02-081-0/+6
| | | | | | | | | | | | | | | | | | | | For some time, eclipse (CDT) uses full path of the file in break-insert command when putting breakpoint on a source line. On windows, a typical command looks like the following. 56-break-insert -f F:\\work\\ws\\test\\main.c:49 Current implementation in lldb-mi have problem in 2 ways. 1. It was assuming that there will be only one : in the path which is wrong if full path is supplied. 2. CDT sends out path with double backslashes in windows which gives error on resolution. Fixed the : issue in lldb-mi. Changed FileSpec::Normalize to make sure that it handles the path with \\ correctly. Added test cases to check for full path in both lldb-mi and lldb. Also added a test case to check SBFileSpec with double slashes. llvm-svn: 228538
* When creating a disassembler for one of the arm variants that canJason Molenda2015-02-071-0/+18
| | | | | | | | | only execute thumb instructions, force the arch triple string to be "thumbv..." instead of "armv..." so we do the right thing by default when disassembling arbitrary chunks of code. <rdar://problem/15126397> llvm-svn: 228486
* Make lldb-platform to clear m_process_launch_info when hanlding qProcessInfo ↵Oleksiy Vyalov2015-02-061-0/+1
| | | | | | request - otherwise subsequent process launches will reuse data from previous launch. llvm-svn: 228430
* Add support for SBProcess::PutSTDIN to remote processesVince Harron2015-02-068-0/+90
| | | | | | | | | | | | | | Processes running on a remote target can already send $O messages to send stdout but there is no way to send stdin to a remote inferior. This allows processes using the API to pump stdin into a remote inferior process. It fixes a hang in TestProcessIO.py when running against a remote target. llvm-svn: 228419
* Fix a missing "*stopped" notification in LLDB-MI after "process launch -s" ↵Ilia K2015-02-061-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | in case of remote-macosx Summary: This patch fixes *stopped notification for remote target when started with eLaunchFlagStopAtEntry (for example, using "process launch -s"). See explanation below: ``` Target::Launch (ProcessLaunchInfo &launch_info, Stream *stream) { ... if (state != eStateConnected && platform_sp && platform_sp->CanDebugProcess ()) { ... } else { ... if (m_process_sp) error = m_process_sp->Launch (launch_info); } if (error.Success()) { if (launch_info.GetFlags().Test(eLaunchFlagStopAtEntry) == false) { .... } -- missing event if eLaunchFlagStopAtEntry is set -- m_process_sp->RestoreProcessEvents (); } ... return error ``` Also this patch contains tests and you can check how it works. Reviewers: zturner, clayborg, abidh Reviewed By: clayborg Subscribers: clayborg, abidh, zturner, lldb-commits Differential Revision: http://reviews.llvm.org/D7273 llvm-svn: 228417
* Fix evaluation commands (MI)Ilia K2015-02-061-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: These changes include: * Fix -var-create to be able use current frame '*' (MI) * Fix print-values option in -var-update (MI) * Fix 'variable doesn't exist' error in -var-show-attributes (MI) * Mark print-values option as 'handled-by-cmd' in -var-update (MI) * Fix SBValue::GetValueDidChange if value was changed * Fix lldb-mi: -data-evaluate-expression shows undef vars. Before this fix -data-evaluate-expression perceives undefined variables as strings: ``` (gdb) -data-evaluate-expression undef ^done,value="undef" ``` * Minor fix: -data-evaluate-expression uses IsUnknownValue() * Enable MiEvaluateTestCase test All test pass on OS X. Reviewers: abidh, clayborg Subscribers: lldb-commits, clayborg, abidh Differential Revision: http://reviews.llvm.org/D7463 llvm-svn: 228414
* Fix TestProcesslaunch regression caused by D7372Pavel Labath2015-02-065-13/+22
| | | | | | | | | | | | | | | | | | | | | | | Summary: After closing all the leaked file descriptors to the inferior tty, the following problem occured: - when stdin, stdout and stderr are redirected, there are no slave descriptors open (which is good) - lldb has a reader thread, which attempts to read from the master end of the tty - this thread receives an EOF - in response, it closes it's master end - as this is the last open file descriptor for the master end, this deletes the tty and sends SIGHUP to the inferior (this is bad) I fix this problem by making sure the master end remains open for the duration of the inferior process by storing a copy of the file descriptor in ProcessMonitor. I create a copy to avoid ownership issues with the reading thread. Reviewers: ovyalov, emaste Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D7440 llvm-svn: 228391
* Fix build of lldb-gdbserver and lldb-platform for android (arm32, x86)Tamas Berghammer2015-02-062-33/+29
| | | | | | | | | | * Fix cmake script for android x86 * Reorder includes to avoid collision between system macros and local variables in clang framework Differential Revision: http://reviews.llvm.org/D7435 llvm-svn: 228388
* Fix TestThreadSpecificBreakpoint with LLGSTamas Berghammer2015-02-062-135/+138
| | | | | | | | | | | * Set the state of the process into running/stepping on continue/step operations * Add mutex to use transactions in Thread State Coordinator ** It is required because the events from two Signal Handler or form a Signal handler and a Resume request shouldn't overlap * Send Stop Replay Packet only when the state of the process changed Differential Revision: http://reviews.llvm.org/D7374 llvm-svn: 228387
* Add additional DWARF 5 language constants.Bruce Mitchener2015-02-063-1/+6
| | | | | | | | | This also hooks up the new C++14 language constant to be treated the same as the other C++ language constants. Differential Revision: http://reviews.llvm.org/D7429 llvm-svn: 228386
* Add a "-a/--address" option to "thread until". You can specify one or more ↵Jim Ingham2015-02-061-27/+61
| | | | | | | | | | | line numbers (as arguments) and/or one or more addresses (with -a) and until will stop at the first one of thesepoints it hits, or on exit from the function if you leave the function before hitting any of these stop points. <rdar://problem/12438270> llvm-svn: 228370
* Avoid leaking log file descriptors into the inferior process.Pavel Labath2015-02-052-1/+4
| | | | | | | | | | | | | | Summary: This commit adds a new open flag File::eOpenOptionCloseOnExec (i.e., O_CLOEXEC), and adds it to the list of flags when opening log files (#ifndef windows). A regression test is included. Reviewers: vharron, clayborg Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D7412 llvm-svn: 228310
* Fix warning about the use of mktemp and make platform agnostic by adding and ↵Oleksiy Vyalov2015-02-053-25/+66
| | | | | | | | using PipeBase::CreateWithUniqueName - on behalf of flackr. http://reviews.llvm.org/D7348 llvm-svn: 228307
* Avoid leakage of file descriptors in LLDB (apply r228130 to FreeBSD)Ed Maste2015-02-051-1/+9
| | | | llvm-svn: 228305
* Implement initial Altivec supportJustin Hibbits2015-02-0514-20/+317
| | | | | | | | | | | | | | | | | Summary: This adds the register plumbing, as well as register reading in FreeBSD core dumps. Further work on the POSIX/FreeBSD ProcessMonitor is required in order to support ptrace access to these registers. Reviewers: tfiala, emaste Reviewed By: emaste Subscribers: emaste, lldb-commits Differential Revision: http://reviews.llvm.org/D7039 llvm-svn: 228278
* Add PowerPC FPR access to the process monitorJustin Hibbits2015-02-052-21/+23
| | | | | | | | | | | | | | Summary: This adds reading and writing to the POSIX PowerPC ProcessMonitor. Reviewers: emaste Reviewed By: emaste Subscribers: emaste, lldb-commits Differential Revision: http://reviews.llvm.org/D7040 llvm-svn: 228277
* Keep the user data for compile units up to date since we often create ↵Greg Clayton2015-02-051-2/+11
| | | | | | | | | | lldb_private::CompileUnit objects without creating the DWARFCompileUnit objects when we do DWARF in .o files. Now we make sure to update our DWARFCompileUnit -> lldb_private::CompileUnit user data when it isn't set to ensure quick transitions between the two. <rdar://problem/18371367> llvm-svn: 228264
* Don't wait for the dynamic loader to set a module as a dynamic link editor, ↵Greg Clayton2015-02-054-7/+20
| | | | | | | | | | figure it out through the ObjectFile. Background: dyld binaries often have extra symbols in their symbol table like "malloc" and "free" for the early bringup of dyld and we often don't want to set breakpoints in dynamic linker binaries. We also don't want to call the "malloc" or "free" function in dyld when a user writes an expression like "(void *)malloc(123)" so we need to avoid doing name lookups in dyld. We mark Modules as being dynamic link editors and this helps do correct lookups for breakpoints by name and function lookups. <rdar://problem/19716267> llvm-svn: 228261
* Extend SBPlatform with capability to launch/terminate a process remotely. ↵Oleksiy Vyalov2015-02-0411-366/+452
| | | | | | | | Integrate this change into test framework in order to spawn processes on a remote target. http://reviews.llvm.org/D7263 llvm-svn: 228230
* Unbreak the cmake build by adding some new filesReid Kleckner2015-02-042-0/+2
| | | | llvm-svn: 228224
* Get test/types tests passing on remote targetsVince Harron2015-02-041-3/+0
| | | | | | | | redirecting output to a path that will work well on host or target. copying file from output location to location on local host that test will read from llvm-svn: 228217
* Update documenation for the changed in from ${var.script:<pythonfunction>} ↵Greg Clayton2015-02-041-1/+1
| | | | | | to the new ${script.var:<pythonfunction>}. llvm-svn: 228216
* Get rid of Debugger::FormatPrompt() and replace it with the new FormatEntity ↵Greg Clayton2015-02-0417-1794/+2832
| | | | | | | | | | | | | | | | | | | class. Why? Debugger::FormatPrompt() would run through the format prompt every time and parse it and emit it piece by piece. It also did formatting differently depending on which key/value pair it was parsing. The new code improves on this with the following features: 1 - Allow format strings to be parsed into a FormatEntity::Entry which can contain multiple child FormatEntity::Entry objects. This FormatEntity::Entry is a parsed version of what was previously always done in Debugger::FormatPrompt() so it is more efficient to emit formatted strings using the new parsed FormatEntity::Entry. 2 - Allows errors in format strings to be shown immediately when setting the settings (frame-format, thread-format, disassembly-format 3 - Allows auto completion by implementing a new OptionValueFormatEntity and switching frame-format, thread-format, and disassembly-format settings over to using it. 4 - The FormatEntity::Entry for each of the frame-format, thread-format, disassembly-format settings only replaces the old one if the format parses correctly 5 - Combines all consecutive string values together for efficient output. This means all "${ansi.*}" keys and all desensitized characters like "\n" "\t" "\0721" "\x23" will get combined with their previous strings 6 - ${*.script:} (like "${var.script:mymodule.my_var_function}") have all been switched over to use ${script.*:} "${script.var:mymodule.my_var_function}") to make the format easier to parse as I don't believe anyone was using these format string power user features. 7 - All key values pairs are defined in simple C arrays of entries so it is much easier to add new entries. These changes pave the way for subsequent modifications where we can modify formats to do more (like control the width of value strings can do more and add more functionality more easily like string formatting to control the width, printf formats and more). llvm-svn: 228207
* Fix synchronization issue in Broadcaster::HijackBroadcaster.Oleksiy Vyalov2015-02-041-0/+10
| | | | llvm-svn: 228179
* Fix broken windows build due to use of O_CLOEXEC.Zachary Turner2015-02-041-1/+8
| | | | llvm-svn: 228171
* Avoid leakage of file descriptors in LLDB and LLGSPavel Labath2015-02-043-3/+19
| | | | | | | | | | | | | | | Summary: Both LLDB and LLGS are leaking file descriptors into the debugged process. This plugs the leak by closing the unneeded descriptors. In one case I use O_CLOEXEC, which I hope is supported on relevant platforms. I also added a regression test and plugged a fd leak in dosep.py. Reviewers: vharron, clayborg Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D7372 llvm-svn: 228130
* Test commit.Chaoren Lin2015-02-041-1/+1
| | | | | | | Removed trailing whitespace. From: Vince Harron <vharron@google.com> llvm-svn: 228115
* Fix it so we always get major, minor and update from the version in ↵Greg Clayton2015-02-041-12/+4
| | | | | | | | ObjectFileMachO::GetMinimumOSVersion(...) and ObjectFileMachO::GetSDKVersion(...). <rdar://problem/19697053> llvm-svn: 228092
* Small fix for the "memory write -i filename" command -- if the user fails to ↵Jason Molenda2015-02-031-1/+1
| | | | | | | | | | | | specify the number of bytes to write into the inferior process, the "default byte size" will be 1. In that case, we want to copy the entire file into memory. The code was looking for a default byte size of 0 to indicate that the user had not provided a specific # of bytes to copy; adjust that to 1 to match the actual default value. <rdar://problem/18074973> llvm-svn: 228067
* Use basename of main executable in POSIX-DYLD on Android.Stephane Sezer2015-02-032-6/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: The Android dynamic linker reports only the basename of each SO entry, so for the above check to be successful, we need to compare it to the basename of the main executable. This also has a nasty side-effect when working with older version of Android (verified on platform version 16), and debugging PIE executables: the dynamic linker has a bug and reports the load address of the main executable (which is a shared object, because PIE) to be 0. We then try to update the list of loaded sections for all shared objects, including the main executable, and set the load address to 0, which breaks everything that relies on resolving addresses in the main executable (breakpoints, stepping, etc). This commit also fixes that broken behavior when debugging on older Androids. This bug doesn't happen on newer Android versions (verified for Android L). Test Plan: Run test suite on linux. Reviewers: clayborg, tfiala, richard.mitton Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D7188 llvm-svn: 228057
* Fix compilation failure on Windows.Zachary Turner2015-02-031-1/+1
| | | | llvm-svn: 227998
* Test commit. No changes.Pavel Labath2015-02-031-1/+1
| | | | llvm-svn: 227960
* Change void* name_token to const void* to address warnings.Bruce Mitchener2015-02-032-7/+7
| | | | | | | | | | | | Reviewers: granata.enrico, clayborg Reviewed By: clayborg Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D7337 llvm-svn: 227952
* Cast to (const OptionPermissions*) to avoid warning.Bruce Mitchener2015-02-031-2/+2
| | | | | | | | | | | | Reviewers: clayborg Reviewed By: clayborg Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D7336 llvm-svn: 227951
* Fixed bugs in the multi-threaded access in HostInfoBase. Prior to this fix, ↵Greg Clayton2015-02-036-145/+193
| | | | | | | | | | static bool variables were used but this is not sufficient. We now use std::call_once in all places where the previous static bool code was used to try to implement thread safety. This was causing code that opened multiple targets to try and get a path to debugserver from the GDB remote communication class, and it would get the LLDB path and some instances would return empty strings and it would cause debugserver to not be found. <rdar://problem/18756927> llvm-svn: 227935
* Fix TestThreadStepOut on Linux with LLGSChaoren Lin2015-02-032-5/+8
| | | | | | | | Remove implicit stop action on $vCont package for threads where no explicit action or default action specified based on the specification (they have to stay in there original state). llvm-svn: 227933
* Add missing switch cases to silence warnings.Chaoren Lin2015-02-033-9/+13
| | | | llvm-svn: 227931
OpenPOWER on IntegriCloud