summaryrefslogtreecommitdiffstats
path: root/lldb/source/Plugins/Process
Commit message (Collapse)AuthorAgeFilesLines
...
* Move several plugin to its own namespaceTamas Berghammer2015-03-3143-466/+576
| | | | | | | | | | | | | Affected paths: * Plugins/Platform/Android/* * Plugins/Platform/Linux/* * Plugins/Platform/gdb-server/* * Plugins/Process/Linux/* * Plugins/Process/gdb-remote/* Differential revision: http://reviews.llvm.org/D8654 llvm-svn: 233679
* Move debug register output into __amd64__ (FreeBSD)Ed Maste2015-03-271-2/+0
| | | | | | | This debug register diagnostic is really only applicable to amd64 at present. llvm-svn: 233403
* Specify LLDB_REGNUM_GENERIC_ARG* registers for arm64Tamas Berghammer2015-03-271-8/+8
| | | | llvm-svn: 233369
* Handle FreeBSD/arm64 core filesEd Maste2015-03-268-1/+330
| | | | | | | | This is derived from FreeBSD/mips64 and Darwin and Linux arm64 support. Differential Revision: http://reviews.llvm.org/D7835 llvm-svn: 233273
* Remove virtual and add override for lots of function.Tamas Berghammer2015-03-256-92/+92
| | | | | | | | | | Effeted pathes: * Host/posix/* * Platform/gdb-server/* * Process/Linux/* * Process/POSIX/* llvm-svn: 233193
* Fix wrong type convesrion in ReadRegOperationTamas Berghammer2015-03-251-1/+1
| | | | | | | | The automatic conversion from long int to lldb::addr_t caused sign extension but for a register read it is an unwanted behaviour. Fix with forcing different conversion path. llvm-svn: 233176
* Fetch module specification from remote process alsoTamas Berghammer2015-03-2410-40/+196
| | | | | | | | | | | | | Previously the remote module sepcification was fetched only from the remote platform. With this CL if we have a remote process then we ask it if it have any information from a given module. It is required because on android the dynamic linker only reports the name of the SO file and the platform can't always find it without a full path (the process can do it based on /proc/<pid>/maps). Differential revision: http://reviews.llvm.org/D8547 llvm-svn: 233061
* Remove virtual and add override to all virtual functions in Process/gdb-remote.Tamas Berghammer2015-03-236-92/+92
| | | | llvm-svn: 232952
* Use POSIX pid_t and not lldb::pid_t.Davide Italiano2015-03-221-1/+1
| | | | | | | | | | The latter is uint64_t beacuse lldb supports arbitrary pid/platforms but in this case we're using it as return value for fork() which might return -1 to the parent in case the syscall fails. Differential Revision: http://reviews.llvm.org/D8491 llvm-svn: 232926
* Add missing #include to fix libc++ Linux build.Richard Smith2015-03-221-0/+1
| | | | llvm-svn: 232925
* Add missing cases to NativeProcessLinux LogThreadStopInfoPavel Labath2015-03-201-0/+21
| | | | | | | | | | | | Test Plan: No tests, this is just a debug logging function. Reviewers: tberghammer Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D8453 llvm-svn: 232815
* Report watchpoint hits during single stepping.Chaoren Lin2015-03-198-148/+195
| | | | | | | | | | | | | | | | | | Summary: Reorganized NativeProcessLinux::MonitorSIGTRAP to check for watchpoint hits on TRAP_TRACE. Added test for stepping over watchpoints. https://llvm.org/bugs/show_bug.cgi?id=22814 Reviewers: ovyalov, tberghammer, vharron, clayborg Subscribers: jingham, labath, lldb-commits Differential Revision: http://reviews.llvm.org/D8404 llvm-svn: 232784
* Don't close pseudo terminal master file descriptor on EOFTamas Berghammer2015-03-191-0/+1
| | | | | | | | | | | | | Some application on Linux an all application on android close stdout and stderr during the libc exit stage. Previously the master file descriptor of the pseudo terminal used to communicate with the inferior was closed on an EOF causing a race condition and a possible SIGHUP on process exit. After this change the master file descriptor will be closed by the destructor of the GDBRemoteCommunicationServerLLGS class. Differential revision: http://reviews.llvm.org/D8436 llvm-svn: 232724
* Move lldb-log.cpp to core/Logging.cppZachary Turner2015-03-181-1/+0
| | | | | | | | | So that we don't have to update every single #include in the entire codebase to #include this new header (which used to get included by lldb-private-log.h, we automatically #include "Logging.h" from within "Log.h". llvm-svn: 232653
* Convert open options for POSIX open on target platform.Robert Flack2015-03-182-3/+3
| | | | | | | | | | | | | | | | | | | | This moves the conversion of the open options to the target platform. On mac fcntl.h has different values for O_CREAT and O_TRUNC than on linux so by transmitting the standardized lldb open options we can correctly convert them on the target platform. Test Plan: On linux: lldb-server p --listen *:1234 On mac: lldb platform select remote-linux platform connect connect://ip-of-linux-box:1234 target create ~/path/to/linux/binary b main process launch Binary is successfully pushed to linux remote, process successfully launches and break in the main method. Differential Revision: http://reviews.llvm.org/D8395 llvm-svn: 232634
* Remove ScriptInterpreterObject.Zachary Turner2015-03-174-324/+280
| | | | | | | | | | | | | | | | | | | | | | | | | This removes ScriptInterpreterObject from the codebase completely. Places that used to rely on ScriptInterpreterObject now use StructuredData::Object and its derived classes. To support this, a new type of StructuredData object is introduced, called StructuredData::Generic, which stores a void*. Internally within the python library, StructuredPythonObject subclasses this StructuredData::Generic class so that it can addref and decref the python object on construction and destruction. Additionally, all of the classes in PythonDataObjects.h such as PythonList, PythonDictionary, etc now provide a method to create an instance of the corresponding StructuredData type. For example, there is PythonDictionary::CreateStructuredDictionary. To eliminate dependencies on PythonDataObjects for external callers, all ScriptInterpreter methods now return only StructuredData classes The rest of the changes in this CL are focused on fixing up users of PythonDataObjects classes to use the new StructuredData classes. llvm-svn: 232534
* Fix the clang -Werror build by suppressing -Wextended-offsetofDavid Blaikie2015-03-171-2/+2
| | | | llvm-svn: 232507
* Add missing overrides to fix the clang -Werror build ↵David Blaikie2015-03-171-4/+4
| | | | | | (-Winconsistent-missing-override) llvm-svn: 232504
* Change reinterpret_casts to static_casts in NativeProcessLinuxTamas Berghammer2015-03-171-34/+34
| | | | llvm-svn: 232491
* Remove unused handler registreation from GDBRemoteCommunicationServerLLGSTamas Berghammer2015-03-171-2/+0
| | | | llvm-svn: 232488
* Report stopped by trace if none of the watchpoint was hitTamas Berghammer2015-03-172-20/+35
| | | | | | | | | | Some linux kernel reports a watchpoint hit after single stepping even when no watchpoint was hit. This CL looks for a watchpoint which was hit and reports a stop by trace if it haven't found any. Differential revision: http://reviews.llvm.org/D8081 llvm-svn: 232482
* [MIPS] - Register Context for MIPS64Mohit K. Bhakkad2015-03-178-0/+546
| | | | | | | | | | | | | | | | Patch by Jaydeep Patil Summery: 1. Add MIPS variants by parsing e_flags of the ELF 2. Create RegisterInfoInterface and RegisterContext for MIPS64 and MIPS64EL Reviewers: clayborg Subscribers: tberghammer, bhushan, mohit.bhakkad, sagar Differential Revision: http://reviews.llvm.org/D8166 llvm-svn: 232467
* Create NativeRegisterContext for android-arm64Tamas Berghammer2015-03-1311-183/+884
| | | | | | Differential revision: http://reviews.llvm.org/D8058 llvm-svn: 232160
* Add filepath to qModuleInfo packetTamas Berghammer2015-03-131-2/+16
| | | | | | | | | | | The file path is currently required on android because the executables only contain the name of the system libraries without their path. This CL add an extra field to the qModuleInfo packet to return the full path of a modul and add logic to locate a shared module on android. Differential revision: http://reviews.llvm.org/D8221 llvm-svn: 232156
* Add code to exit the NativeProcessLinux Monitor thread on androidTamas Berghammer2015-03-133-8/+12
| | | | | | | | | | This CL change the logic used to terminate the monitor thread of NativeProcessLinux to use a signal instead of pthread_cancel as pthread_cancel is not supported on android. Differential revision: http://reviews.llvm.org/D8205 llvm-svn: 232155
* Fix fetching the architecture of the target on process launchTamas Berghammer2015-03-131-9/+10
| | | | | | | | | | Previously it was fetched only if the architecture isn't valid, but the architecture can be valid without containing all information about the current target (e.g. missing os). Differential revision: http://reviews.llvm.org/D8057 llvm-svn: 232153
* Remove non const version of GetArchitecture from Target.hTamas Berghammer2015-03-131-9/+12
| | | | | | | The architecture of a target should be updated only by the SetArchitecture method so the target can correctly manage its modules. llvm-svn: 232152
* Test Commit: Spell correctionBhushan D. Attarde2015-03-121-2/+2
| | | | llvm-svn: 232022
* Initialize ProcessGDBRemoteLog for LLGS to fix remote platform loggingRobert Flack2015-03-119-52/+47
| | | | | | | | This was previously initialized by ProcessGDBRemote::Initialize but lldb-server does not contain ProcessGDBRemote anymore so this needs to be initialized directly. Differential Revision: http://reviews.llvm.org/D8186 llvm-svn: 231966
* Pass a process full executable path within "name" response field.Oleksiy Vyalov2015-03-111-1/+1
| | | | | | http://reviews.llvm.org/D8239 llvm-svn: 231949
* Fix bug in ProcessGDBRemotePavel Labath2015-03-111-1/+1
| | | | | | | | | | | | | | | Summary: ProcessGDBRemote::AsyncThread nuked its own thread handle upon exiting. This prevented the main thread from joining it correctly in StopAsyncThread. I address this by moving the Reset() call to StopAsyncThread, after the join. Reviewers: clayborg, zturner Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D8218 llvm-svn: 231915
* Add Utility/ModuleCache class and integrate it with PlatformGDBRemoteServer ↵Oleksiy Vyalov2015-03-102-9/+6
| | | | | | | | - in order to allow modules caching from remote targets. http://reviews.llvm.org/D8037 llvm-svn: 231734
* Report the actual user register count from NativeRegisterContextLinux_x86_64Tamas Berghammer2015-03-092-0/+16
| | | | | | | | | Thic change have effect wehn the AVX registers aren't available with reporting the count of user registers without them. Differential revision: http://reviews.llvm.org/D8111 llvm-svn: 231638
* Initialize ProcessPOSIXLog by NativeProcessLinuxTamas Berghammer2015-03-062-0/+24
| | | | | | | | | | Previously it was initialized by ProcessLinux but lldb-server don't contain ProcessLinux anymore so it have to be initialized by NativeProcessLinux also. Differential revision: http://reviews.llvm.org/D8080 llvm-svn: 231482
* Fix build on OS X after r231202Ilia K2015-03-041-0/+1
| | | | llvm-svn: 231235
* Set the signals based on the OS in the qHostInfo packetTamas Berghammer2015-03-041-1/+1
| | | | | | | | | | Setting it from the Target architecture cause problems when the target archiutecture is filled just by examining the executable because in that case the OS isn't set. Differential revision: http://reviews.llvm.org/D8035 llvm-svn: 231234
* Fix deadlock in operation thread in NativeProcessLinuxTamas Berghammer2015-03-041-9/+13
| | | | | | | | | The deadlock occurred when the Attach or the Launch operation failed for any reason. Differential revision: http://reviews.llvm.org/D8030 llvm-svn: 231231
* Further reduce header footprint of Debugger.h.Zachary Turner2015-03-041-0/+2
| | | | llvm-svn: 231202
* Fix errors building on linux.Zachary Turner2015-03-032-0/+2
| | | | llvm-svn: 231169
* Don't #include FormatManager.h from Debugger.hZachary Turner2015-03-031-0/+1
| | | | | | | | Debugger.h is a huge file that gets included everywhere, and FormatManager.h brings in a ton of unnecessary stuff and doesn't even use anything from it in the header. llvm-svn: 231161
* Fix FreeBSD build after r231145Ed Maste2015-03-032-0/+2
| | | | llvm-svn: 231157
* Further reduce the header footprint of Process.hZachary Turner2015-03-035-0/+5
| | | | | | | No functional change here, only deletes unnecessary headers and moves one function's body from the .h file to the .cpp. llvm-svn: 231145
* Don't #include ClangPersistentVariables.h from Process.hZachary Turner2015-03-034-4/+8
| | | | | | | Nothing from this header file was even being referenced in Process.h anyway, so it was a completely unnecessary include. llvm-svn: 231131
* Reduce header footprint of Target.hZachary Turner2015-03-031-0/+1
| | | | | | | | | | | | This continues the effort to reduce header footprint and improve build speed by removing clang and other unnecessary headers from Target.h. In one case, some headers were included solely for the purpose of declaring a nested class in Target, which was not needed by anybody outside the class. In this case the definition and implementation of the nested class were isolated in the .cpp file so the header could be removed. llvm-svn: 231107
* Make it possible to stop the operation thread in NativeProcessLinuxTamas Berghammer2015-03-021-2/+11
| | | | | | | | | | | Previously the operation thread is stopped with a cancel event but pthread_cancel is not supported on android. This CL creates a custom operation which asks the operation thread to exit without any pthread call. Differential revision: http://reviews.llvm.org/D7937 llvm-svn: 230945
* Fix attaching to 32 bit inferior with 64 bit llgs.Chaoren Lin2015-03-011-2/+2
| | | | | | | | | | | | Summary: Executable module should use inferior architecture instead of host architecture. Reviewers: ovyalov, vharron, clayborg Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D7977 llvm-svn: 230887
* Casting pid to ::pid_t when invoking syscall.Chaoren Lin2015-02-282-2/+4
| | | | | | | | | | | | | | Summary: syscalls involving pid/tid on 32 bit binaries are failing with "Invalid argument" because the uint64_t arguments are too wide. Reviewers: clayborg, ovyalov, sivachandra Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D7963 llvm-svn: 230817
* Fix FileSpec::GetPath to return null-terminated stringsIlia K2015-02-271-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Before this fix the FileSpec::GetPath() returned string which might be without '\0' at the end. It could have happened if the size of buffer for path was less than actual path. Test case: ``` FileSpec test("/path/to/file", false); char buf[]="!!!!!!"; test.GetPath(buf, 3); ``` Before fix: ``` 233 FileSpec test("/path/to/file", false); 234 char buf[]="!!!!!!"; 235 test.GetPath(buf, 3); 236 -> 237 if (core_file) 238 { 239 if (!core_file.Exists()) 240 { (lldb) print buf (char [7]) $0 = "/pa!!!" ``` After fix: ``` 233 FileSpec test("/path/to/file", false); 234 char buf[]="!!!!!!"; 235 test.GetPath(buf, 3); 236 -> 237 if (core_file) 238 { 239 if (!core_file.Exists()) 240 { (lldb) print buf (char [7]) $0 = "/p" ``` Reviewers: zturner, abidh, clayborg Reviewed By: abidh, clayborg Subscribers: tberghammer, vharron, lldb-commits, clayborg, zturner, abidh Differential Revision: http://reviews.llvm.org/D7553 llvm-svn: 230787
* Can't set watchpoints on launching threads on Linux LLGS.Chaoren Lin2015-02-261-0/+2
| | | | | | | | | | | | | | Summary: They'll be set anyway when the thread starts running, so the launching threads should just ignore the set request. Reviewers: ovyalov Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D7914 llvm-svn: 230671
* Increase default packet timeout for android to 20sTamas Berghammer2015-02-261-0/+9
| | | | | | Differential revision: http://reviews.llvm.org/D7853 llvm-svn: 230626
OpenPOWER on IntegriCloud