summaryrefslogtreecommitdiffstats
path: root/lldb/source/Plugins/Process/gdb-remote
Commit message (Collapse)AuthorAgeFilesLines
...
* Get lldb-server building on android-9Vince Harron2015-05-123-2/+21
| | | | | | Build lldb-server with an android-9 sysroot. llvm-svn: 237078
* Add support for ./dotest.py --channel and --log-successVince Harron2015-05-101-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: New dotest options that allow arbitrary log channels and categories to be enabled. Also enables logging for locally run debug servers. Log messages are separated into separate files per test case. (this makes it possible to log in dosep runs) These new log files are stored side-by-side with trace files in the session directory. These files are deleted by default if the test run is successful. If --log-success is specified, even successful logs are retained. --log-success is useful for creating reference log files. Test Plan: add '--channel "lldb all" --channel "gdb-remote packets" --log-success' to your dotest options Tested on OSX and Linux Differential Revision: http://reviews.llvm.org/D9594 llvm-svn: 236956
* Fixed minor compile warningsVince Harron2015-05-101-2/+1
| | | | llvm-svn: 236945
* Set path syntax for remote executable FileSpec.Chaoren Lin2015-05-091-4/+4
| | | | | | | | | | Reviewers: ovyalov, zturner Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D9579 llvm-svn: 236925
* This patch allows LLDB to use the $qXfer:Libraries: packet.Aidan Dodds2015-05-082-8/+345
| | | | | | Differential Revision: http://reviews.llvm.org/D9471 llvm-svn: 236817
* Fix process launch from Windows host to Android target.Chaoren Lin2015-05-051-2/+2
| | | | | | | | | | | | | | | | Summary: - Denormalized path on Windows host causes bad `A` packet. - Executables copied from Windows host doesn't have executable bits. Reviewers: tberghammer, zturner, ovyalov Reviewed By: ovyalov Subscribers: tberghammer, lldb-commits Differential Revision: http://reviews.llvm.org/D9492 llvm-svn: 236516
* Fix GetModuleInfo() not checking for unsupported RSP response.Aidan Dodds2015-05-051-1/+1
| | | | | | http://reviews.llvm.org/D9473 llvm-svn: 236486
* Remove trap code from disassembly.Chaoren Lin2015-04-291-5/+5
| | | | | | | | | | | | | | | | | | | | Summary: NativeProcessProtocol uses ReadMemory internally for setting/checking breakpoints but also for generic memory reads (Handle_m), this change adds a ReadMemoryWithoutTrap for that purpose. Also fixes a bunch of misuses of addr_t as size/length. Test Plan: `disassemble` no longer shows the trap code. Reviewers: jingham, vharron, clayborg Reviewed By: clayborg Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D9330 llvm-svn: 236132
* Fix bug in gdb-remote xml parser which failed to parse xml split over ↵Aidan Dodds2015-04-291-1/+2
| | | | | | multiple rsp packets. llvm-svn: 236095
* Add an unnamed pipe fail-safe to launching lldb-gdbserver.Chaoren Lin2015-04-271-38/+67
| | | | | | | | | | | | | | | | | | Summary: Currently, launching lldb-gdbserver from platform on Android requires root for mkfifo() and an explicit TMPDIR variable. This should remove both requirements. Test Plan: Successfully launched lldb-gdbserver on a non-rooted Android device. Reviewers: tberghammer, vharron, clayborg Reviewed By: clayborg Subscribers: tberghammer, lldb-commits Differential Revision: http://reviews.llvm.org/D9307 llvm-svn: 235940
* Whitespace-only tweaks to Colin's r235109 patch to match the lldbJason Molenda2015-04-171-128/+175
| | | | | | coding style a little more closely. llvm-svn: 235218
* Fix cmake build on osx after r235109Colin Riley2015-04-171-0/+4
| | | | llvm-svn: 235179
* Add a "force_kill" arg to Process::Destroy(). This is needed afterJason Molenda2015-04-171-1/+1
| | | | | | | | | | | | | | | | | | the changes in r233255/r233258. Normally if lldb attaches to a running process, when we call Process::Destroy, we want to detach from the process. If lldb launched the process itself, ::Destroy should kill it. However, if we attach to a process and the driver calls SBProcess::Kill() (which calls Destroy), we need to kill it even if we didn't launch it originally. The force_kill param allows for the SBProcess::Kill method to force the behavior of Destroy. <rdar://problem/20424439> llvm-svn: 235158
* Define LIBXML2_DEFINED in the Xcode project for Xcode builds so Darwin ↵Greg Clayton2015-04-161-1/+1
| | | | | | | | | | builds can take advantage of the new GDB register info from the target XML. Also add "#if defined( LIBXML2_DEFINED )" around code that already used libxml2 in SymbolVendorMacOSX.cpp. Cleaned up some warnings in ProcessGDBRemote.cpp. llvm-svn: 235144
* Fix warnings about construction ordering.Greg Clayton2015-04-161-1/+1
| | | | llvm-svn: 235143
* Surround assignments w/ parenthesis to avoid mistakes.Davide Italiano2015-04-161-5/+5
| | | | | | This also silences a warning. llvm-svn: 235131
* Use the correct type, and silence a warning.Davide Italiano2015-04-161-1/+1
| | | | llvm-svn: 235126
* Adds lldb support for querying the register mapping from gdbserver remote ↵Colin Riley2015-04-164-1/+577
| | | | | | | | targets using qXfer:features:read packet. Only enabled if libxml2 enabled in build. Differential Revision: http://reviews.llvm.org/D8999 llvm-svn: 235109
* Pass normalized target file paths via GDB-remote to a target and denormalize ↵Oleksiy Vyalov2015-04-162-4/+6
| | | | | | | | them on the target. http://reviews.llvm.org/D8980 llvm-svn: 235077
* Fixed remote failures in TestCPP11EnumTypes, probably othersVince Harron2015-04-151-0/+5
| | | | | | | | | | | | | | | Typically, LLGS only sends stdout/stderr notifications when the inferior process is running. Because LLGS reads stdout from the process in a separate thread, sometimes these stdout notifications can be received after the server has sent a thread stop message. The host isn't expecting stdout to be generated by the target after a stop message and these messages interfere with the host's request/ response paradigm. Differential Revision: http://reviews.llvm.org/D9024 llvm-svn: 234995
* [LLDB][MIPS] Add LinuxSignals for mips64 and change trap opcode for mips64el.Mohit K. Bhakkad2015-04-091-1/+5
| | | | | | | | | | | | | | | Patch by Sagar Thakur - Added LinuxSignals for MIPS64. - Changed software trap opcode for mips64el. Reviewers: clayborg, tberghammer. Subscribers: emaste, jaydeep, bhushan, mohit.bhakkad, llvm-commits. Differential Revision: http://reviews.llvm.org/D8856 llvm-svn: 234469
* Sprinkle some #include <mutex> in files that use std::call_once.Benjamin Kramer2015-04-031-0/+1
| | | | llvm-svn: 234005
* [Plugin/Process] Use std::call_once() to initialize.Davide Italiano2015-04-031-4/+3
| | | | | | | | This replaces the home-grown initialization mechanism used before. Differential Revision: http://reviews.llvm.org/D8760 llvm-svn: 233999
* Implement Handle_QEnvironmentHexEncoded.Chaoren Lin2015-03-312-1/+21
| | | | | | | | | | | | Reviewers: clayborg, ovyalov, chaoren Reviewed By: chaoren Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D8689 llvm-svn: 233768
* Move several plugin to its own namespaceTamas Berghammer2015-03-3120-286/+343
| | | | | | | | | | | | | 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
* Fetch module specification from remote process alsoTamas Berghammer2015-03-248-34/+149
| | | | | | | | | | | | | 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
* 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
* 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-172-25/+25
| | | | | | | | | | | | | | | | | | | | | | | | | 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
* Remove unused handler registreation from GDBRemoteCommunicationServerLLGSTamas Berghammer2015-03-171-2/+0
| | | | llvm-svn: 232488
* 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
* 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
* Initialize ProcessGDBRemoteLog for LLGS to fix remote platform loggingRobert Flack2015-03-113-8/+21
| | | | | | | | 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
* 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
* Further reduce header footprint of Debugger.h.Zachary Turner2015-03-041-0/+2
| | | | llvm-svn: 231202
* Fix errors building on linux.Zachary Turner2015-03-031-0/+1
| | | | llvm-svn: 231169
* Further reduce the header footprint of Process.hZachary Turner2015-03-033-0/+3
| | | | | | | No functional change here, only deletes unnecessary headers and moves one function's body from the .h file to the .cpp. llvm-svn: 231145
* 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
* Increase default packet timeout for android to 20sTamas Berghammer2015-02-261-0/+9
| | | | | | Differential revision: http://reviews.llvm.org/D7853 llvm-svn: 230626
* Add qModuleInfo request in order to get module information (uuid, triple,..) ↵Oleksiy Vyalov2015-02-254-1/+96
| | | | | | | | by module path from remote platform. http://reviews.llvm.org/D7709 llvm-svn: 230556
* Fix logging in GDBRemoteCommunicationServerPlatform.Oleksiy Vyalov2015-02-251-3/+3
| | | | llvm-svn: 230418
* Fix qLaunchGDBServer packet parsing in GDBRemoteCommunicationServerPlatform.Oleksiy Vyalov2015-02-241-2/+2
| | | | llvm-svn: 230390
* Create ScopedTimeout class for GDBRemoteCommunicationTamas Berghammer2015-02-244-27/+48
| | | | | | | | | | This new class makes it easier to change the timeout of a GDBRemoteCommunication instance for a short time and then restore it to its original value. Differential revision: http://reviews.llvm.org/D7826 llvm-svn: 230319
* Fix the communication in qPlatform_[mkdir,chmod]Tamas Berghammer2015-02-232-19/+25
| | | | | | | | | | | | With the previous implementation the protocol used by the client and the server for the response was different and worked only by an accident. With this change the communication is fixed and the return code from mkdir and chmod correctly captured by lldb. The change also add documentation for the qPlatform__[mkdir,chmod] packages. Differential revision: http://reviews.llvm.org/D7786 llvm-svn: 230213
* Prevent LLGS from crashing when exiting - make NativeProcessLinux to wait ↵Oleksiy Vyalov2015-02-191-0/+7
| | | | | | | | until ThreadStateCoordinator is fully stopped before entering ~NativeProcessLinux. http://reviews.llvm.org/D7692 llvm-svn: 229875
OpenPOWER on IntegriCloud