summaryrefslogtreecommitdiffstats
path: root/lldb/source/Plugins/Process/Linux/ProcessLinux.cpp
Commit message (Collapse)AuthorAgeFilesLines
* The DynamicLoader plug-in instance now lives up in lldb_private::Process whereGreg Clayton2011-02-161-14/+0
| | | | | | | | | | | | | | | | | it should live and the lldb_private::Process takes care of managing the auto pointer to the dynamic loader instance. Also, now that the ArchSpec contains the target triple, we are able to correctly set the Target architecture in DidLaunch/DidAttach in the subclasses, and then the lldb_private::Process will find the dynamic loader plug-in by letting the dynamic loader plug-ins inspect the arch/triple in the target. So now the ProcessGDBRemote plug-in is another step closer to be purely process/platform agnostic. I updated the ProcessMacOSX and the ProcessLinux plug-ins accordingly. llvm-svn: 125650
* Added a new variant of SBTarget::Launch() that deprectates the old one thatGreg Clayton2011-01-231-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | takes separate file handles for stdin, stdout, and stder and also allows for the working directory to be specified. Added support to "process launch" to a new option: --working-dir=PATH. We can now set the working directory. If this is not set, it defaults to that of the process that has LLDB loaded. Added the working directory to the host LaunchInNewTerminal function to allows the current working directory to be set in processes that are spawned in their own terminal. Also hooked this up to the lldb_private::Process and all mac plug-ins. The linux plug-in had its API changed, but nothing is making use of it yet. Modfied "debugserver" and "darwin-debug" to also handle the current working directory options and modified the code in LLDB that spawns these tools to pass the info along. Fixed ProcessGDBRemote to properly pass along all file handles for stdin, stdout and stderr. After clearing the default values for the stdin/out/err file handles for process to be NULL, we had a crasher in UserSettingsController::UpdateStringVariable which is now fixed. Also fixed the setting of boolean values to be able to be set as "true", "yes", "on", "1" for true (case insensitive) and "false", "no", "off", or "0" for false. Fixed debugserver to properly handle files for STDIN, STDOUT and STDERR that are not already opened. Previous to this fix debugserver would only correctly open and dupe file handles for the slave side of a pseudo terminal. It now correctly handles getting STDIN for the inferior from a file, and spitting STDOUT and STDERR out to files. Also made sure the file handles were correctly opened with the NOCTTY flag for terminals. llvm-svn: 124060
* Timeout if we fail to receive a state change event when destroying an inferior.Stephen Wilson2011-01-191-4/+12
| | | | llvm-svn: 123796
* Only enqueue valid ProcessLinux messages.Stephen Wilson2011-01-191-1/+5
| | | | llvm-svn: 123795
* Initial support for a DynamicLoader plugin on Linux.Stephen Wilson2011-01-161-0/+27
| | | | | | | | | | | | | | | | | | | | | | | | This patch is enough to have shared objects recognized by LLDB. We can handle position independent executables. We can handle dynamically loaded modules brought in via dlopen. The DYLDRendezvous class provides an interface to a structure present in the address space of ELF-based processes. This structure provides the address of a function which is called by the linker each time a shared object is loaded and unloaded (thus a breakpoint at that address will let LLDB intercept such events), a list of entries describing the currently loaded shared objects, plus a few other things. On Linux, processes are brought up with an auxiliary vector on the stack. One element in this vector contains the (possibly dynamic) entry address of the process. One does not need to walk the stack to find this information as it is also available under /proc/<pid>/auxv. The new AuxVector class provides a convenient read-only view of this auxiliary vector information. We use the dynamic entry address and the address as specified in the object file to compute the actual load address of the inferior image. This strategy works for both normal executables and PIE's. llvm-svn: 123592
* Set the ID of a ProcessLinux instance to the PID of the inferior on launch.Stephen Wilson2011-01-151-0/+1
| | | | llvm-svn: 123503
* Implement ProcessLinux::GetImageInfoAddress().Stephen Wilson2011-01-151-0/+13
| | | | llvm-svn: 123499
* Spelling changes applied from lldb_spelling.diffs from Bruce Mitchener.Greg Clayton2011-01-081-1/+1
| | | | | | Thanks Bruce! llvm-svn: 123083
* Do not load sections manually when launching a Linux process.Stephen Wilson2011-01-041-27/+0
| | | | | | | | This code was a temporary workaround due to the lack of a dynamic loader plugin for the Linux platform that has bit rotted over time. Instead of replacing this hack with another a proper plugin will be developed instead. llvm-svn: 122837
* Update ProcessLinux method signatures to be in line with LLDB's current API.Stephen Wilson2011-01-041-1/+2
| | | | llvm-svn: 122836
* Add a new Process plugin for Linux.Stephen Wilson2010-07-241-0/+443
This component is still at an early stage, but allows for simple breakpoint/step-over operations and basic process control. The makefiles are set up to build the plugin under Linux only. llvm-svn: 109318
OpenPOWER on IntegriCloud