summaryrefslogtreecommitdiffstats
path: root/lldb/source/Plugins/Process
Commit message (Collapse)AuthorAgeFilesLines
...
* Revert "[platform process list] add a flag for showing the processes of all ↵Walter Erquinigo2019-10-121-1/+2
| | | | | | | | users" This reverts commit 90d0de4999354a5223f08ad714222b0a5dca3cad. llvm-svn: 374625
* [platform process list] add a flag for showing the processes of all usersWalter Erquinigo2019-10-121-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: For context: https://reviews.llvm.org/D68293 We need a way to show all the processes on android regardless of the user id. When you run `platform process list`, you only see the processes with the same user as the user that launched lldb-server. However, it's quite useful to see all the processes, though, and it will lay a foundation for full apk debugging support from lldb. Before: ``` PID PARENT USER TRIPLE NAME ====== ====== ========== ======================== ============================ 3234 1 aarch64-unknown-linux-android adbd 8034 3234 aarch64-unknown-linux-android sh 9096 3234 aarch64-unknown-linux-android sh 9098 9096 aarch64-unknown-linux-android lldb-server (lldb) ^D ``` Now: ``` (lldb) platform process list -x 205 matching processes were found on "remote-android" PID PARENT USER TRIPLE NAME ====== ====== ========== ======================== ============================ 1 0 init 524 1 init 525 1 init 531 1 ueventd 568 1 logd 569 1 aarch64-unknown-linux-android servicemanager 570 1 aarch64-unknown-linux-android hwservicemanager 571 1 aarch64-unknown-linux-android vndservicemanager 577 1 aarch64-unknown-linux-android qseecomd 580 577 aarch64-unknown-linux-android qseecomd ... 23816 979 com.android.providers.calendar 24600 979 com.verizon.mips.services 27888 979 com.hualai 28043 2378 com.android.chrome:sandboxed_process0 31449 979 com.att.shm 31779 979 com.samsung.android.authfw 31846 979 com.samsung.android.server.iris 32014 979 com.samsung.android.MtpApplication 32045 979 com.samsung.InputEventApp ``` Reviewers: labath,xiaobai,aadsm,clayborg Subscribers: > llvm-svn: 374584 llvm-svn: 374622
* Revert "[platform process list] add a flag for showing the processes of all ↵Walter Erquinigo2019-10-121-1/+2
| | | | | | | | users" This reverts commit 08781f4c53a177662c029d3da9c407ba65ae6747. llvm-svn: 374621
* [platform process list] add a flag for showing the processes of all usersWalter Erquinigo2019-10-121-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: For context: https://reviews.llvm.org/D68293 We need a way to show all the processes on android regardless of the user id. When you run `platform process list`, you only see the processes with the same user as the user that launched lldb-server. However, it's quite useful to see all the processes, though, and it will lay a foundation for full apk debugging support from lldb. Before: ``` PID PARENT USER TRIPLE NAME ====== ====== ========== ======================== ============================ 3234 1 aarch64-unknown-linux-android adbd 8034 3234 aarch64-unknown-linux-android sh 9096 3234 aarch64-unknown-linux-android sh 9098 9096 aarch64-unknown-linux-android lldb-server (lldb) ^D ``` Now: ``` (lldb) platform process list -x 205 matching processes were found on "remote-android" PID PARENT USER TRIPLE NAME ====== ====== ========== ======================== ============================ 1 0 init 524 1 init 525 1 init 531 1 ueventd 568 1 logd 569 1 aarch64-unknown-linux-android servicemanager 570 1 aarch64-unknown-linux-android hwservicemanager 571 1 aarch64-unknown-linux-android vndservicemanager 577 1 aarch64-unknown-linux-android qseecomd 580 577 aarch64-unknown-linux-android qseecomd ... 23816 979 com.android.providers.calendar 24600 979 com.verizon.mips.services 27888 979 com.hualai 28043 2378 com.android.chrome:sandboxed_process0 31449 979 com.att.shm 31779 979 com.samsung.android.authfw 31846 979 com.samsung.android.server.iris 32014 979 com.samsung.android.MtpApplication 32045 979 com.samsung.InputEventApp ``` Reviewers: labath,xiaobai,aadsm,clayborg Subscribers: > llvm-svn: 374584 llvm-svn: 374620
* Temporarily Revert [platform process list] add a flag for showing the ↵Adrian Prantl2019-10-121-1/+2
| | | | | | | | | | processes of all users as it breaks the bots. This reverts r374609 (git commit 696d3cf8ad6f3a0b3019c87526d561bb77ad538e) llvm-svn: 374616
* [platform process list] add a flag for showing the processes of all usersWalter Erquinigo2019-10-111-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: For context: https://reviews.llvm.org/D68293 We need a way to show all the processes on android regardless of the user id. When you run `platform process list`, you only see the processes with the same user as the user that launched lldb-server. However, it's quite useful to see all the processes, though, and it will lay a foundation for full apk debugging support from lldb. Before: ``` PID PARENT USER TRIPLE NAME ====== ====== ========== ======================== ============================ 3234 1 aarch64-unknown-linux-android adbd 8034 3234 aarch64-unknown-linux-android sh 9096 3234 aarch64-unknown-linux-android sh 9098 9096 aarch64-unknown-linux-android lldb-server (lldb) ^D ``` Now: ``` (lldb) platform process list -x 205 matching processes were found on "remote-android" PID PARENT USER TRIPLE NAME ====== ====== ========== ======================== ============================ 1 0 init 524 1 init 525 1 init 531 1 ueventd 568 1 logd 569 1 aarch64-unknown-linux-android servicemanager 570 1 aarch64-unknown-linux-android hwservicemanager 571 1 aarch64-unknown-linux-android vndservicemanager 577 1 aarch64-unknown-linux-android qseecomd 580 577 aarch64-unknown-linux-android qseecomd ... 23816 979 com.android.providers.calendar 24600 979 com.verizon.mips.services 27888 979 com.hualai 28043 2378 com.android.chrome:sandboxed_process0 31449 979 com.att.shm 31779 979 com.samsung.android.authfw 31846 979 com.samsung.android.server.iris 32014 979 com.samsung.android.MtpApplication 32045 979 com.samsung.InputEventApp ``` Reviewers: labath,xiaobai,aadsm,clayborg Subscribers: > llvm-svn: 374584 llvm-svn: 374609
* Revert "[platform process list] add a flag for showing the processes of all ↵Walter Erquinigo2019-10-111-1/+2
| | | | | | | | | | | | | | | | | | | users" Summary: This reverts commit e4ac611cd787f3f0e727a394e96fb1a5c3b19ccb. There's a failure according to http://lab.llvm.org:8080/green/view/LLDB/job/lldb-cmake/2538/testReport/junit/lldb-api/functionalities_gdb_remote_client/TestPlatformClient_py/ Reviewers: labath, aadsm, clayborg Subscribers: lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D68883 llvm-svn: 374603
* [platform process list] add a flag for showing the processes of all usersWalter Erquinigo2019-10-111-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: For context: https://reviews.llvm.org/D68293 We need a way to show all the processes on android regardless of the user id. When you run `platform process list`, you only see the processes with the same user as the user that launched lldb-server. However, it's quite useful to see all the processes, though, and it will lay a foundation for full apk debugging support from lldb. Before: ``` PID PARENT USER TRIPLE NAME ====== ====== ========== ======================== ============================ 3234 1 aarch64-unknown-linux-android adbd 8034 3234 aarch64-unknown-linux-android sh 9096 3234 aarch64-unknown-linux-android sh 9098 9096 aarch64-unknown-linux-android lldb-server (lldb) ^D ``` Now: ``` (lldb) platform process list -x 205 matching processes were found on "remote-android" PID PARENT USER TRIPLE NAME ====== ====== ========== ======================== ============================ 1 0 init 524 1 init 525 1 init 531 1 ueventd 568 1 logd 569 1 aarch64-unknown-linux-android servicemanager 570 1 aarch64-unknown-linux-android hwservicemanager 571 1 aarch64-unknown-linux-android vndservicemanager 577 1 aarch64-unknown-linux-android qseecomd 580 577 aarch64-unknown-linux-android qseecomd ... 23816 979 com.android.providers.calendar 24600 979 com.verizon.mips.services 27888 979 com.hualai 28043 2378 com.android.chrome:sandboxed_process0 31449 979 com.att.shm 31779 979 com.samsung.android.authfw 31846 979 com.samsung.android.server.iris 32014 979 com.samsung.android.MtpApplication 32045 979 com.samsung.InputEventApp ``` Reviewers: labath,xiaobai,aadsm,clayborg Subscribers: llvm-svn: 374584
* minidump: Use llvm memory info list parserPavel Labath2019-10-113-123/+25
| | | | llvm-svn: 374532
* [Windows] Use information from the PE32 exceptions directory to construct ↵Aleksandr Urakov2019-10-111-0/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | unwind plans This patch adds an implementation of unwinding using PE EH info. It allows to get almost ideal call stacks on 64-bit Windows systems (except some epilogue cases, but I believe that they can be fixed with unwind plan disassembly augmentation in the future). To achieve the goal the CallFrameInfo abstraction was made. It is based on the DWARFCallFrameInfo class interface with a few changes to make it less DWARF-specific. To implement the new interface for PECOFF object files the class PECallFrameInfo was written. It uses the next helper classes: - UnwindCodesIterator helps to iterate through UnwindCode structures (and processes chained infos transparently); - EHProgramBuilder with the use of UnwindCodesIterator constructs EHProgram; - EHProgram is, by fact, a vector of EHInstructions. It creates an abstraction over the low-level unwind codes and simplifies work with them. It contains only the information that is relevant to unwinding in the unified form. Also the required unwind codes are read from the object file only once with it; - EHProgramRange allows to take a range of EHProgram and to build an unwind row for it. So, PECallFrameInfo builds the EHProgram with EHProgramBuilder, takes the ranges corresponding to every offset in prologue and builds the rows of the resulted unwind plan. The resulted plan covers the whole range of the function except the epilogue. Reviewers: jasonmolenda, asmith, amccarth, clayborg, JDevlieghere, stella.stamenova, labath, espindola Reviewed By: jasonmolenda Subscribers: leonid.mashinskiy, emaste, mgorny, aprantl, arichardson, MaskRay, lldb-commits, llvm-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D67347 llvm-svn: 374528
* Fix process launch failure on FreeBSD after r365761Dimitry Andric2019-10-102-26/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: After rLLDB365761, and with `LLVM_ENABLE_ABI_BREAKING_CHECKS` enabled, launching any process on FreeBSD crashes lldb with: ``` Expected<T> must be checked before access or destruction. Expected<T> value was in success state. (Note: Expected<T> values in success mode must still be checked prior to being destroyed). ``` This is because `m_operation_thread` and `m_monitor_thread` were wrapped in `llvm::Expected<>`, but this requires the objects to be correctly initialized before accessing them. To fix the crashes, use `llvm::Optional<>` for the members (as indicated by labath), and use local variables to store the return values of `LaunchThread` and `StartMonitoringChildProcess`. Then, only assign to the member variables after checking if the return values indicated success. Reviewers: devnexen, emaste, MaskRay, mgorny Reviewed By: devnexen Subscribers: jfb, labath, krytarowski, lldb-commits Differential Revision: https://reviews.llvm.org/D68723 llvm-svn: 374444
* [Windows] Introduce a switch for the `lldb-server` mode on WindowsAleksandr Urakov2019-10-101-6/+17
| | | | | | | | | | | | | | | | | | | Summary: This patch introduces a switch, based on the environment variable `LLDB_USE_LLDB_SERVER`, to determine whether to use the `ProcessWindows` plugin (the old way) or the `lldb-server` way for debugging on Windows. Reviewers: labath, amccarth, asmith, stella.stamenova Reviewed By: labath, amccarth Subscribers: mstorsjo, abidh, JDevlieghere, lldb-commits, leonid.mashinskiy Tags: #lldb Differential Revision: https://reviews.llvm.org/D68258 llvm-svn: 374325
* Set eRegisterKindEHFrame register numbers for 32 bit ARM register contexts ↵Greg Clayton2019-10-092-11/+33
| | | | | | | | | | in minidumps Stack unwinding was sometimes failing when trying to unwind stacks in 32 bit ARM. I discovered this was because the EH frame register numbers were not set. This patch fixes this issue and adds a unit test to verify this doesn't regress. Differential Revision: https://reviews.llvm.org/D68088 llvm-svn: 374246
* Fix a crasher due to an assert when two files have the same UUID but ↵Greg Clayton2019-10-091-13/+31
| | | | | | | | | | | | | | | | different paths. Summary: The PlaceholderObjectFile has an assert in SetLoadAddress that fires if "m_base == value" is not true. To avoid this, we create check that the base address matches, and if it doesn't we clear the module that was found using the UUID so that we create a new PlaceholderObjectFile. Added a test to cover this issue. Reviewers: labath, aadsm, dvlahovski Subscribers: lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D68106 llvm-svn: 374242
* StopInfo/Mach: Delete PPC supportVedant Kumar2019-10-081-103/+0
| | | | | | | | | LLDB appears to have at least partial support for PPC, but PPC on Mach isn't a thing AFAIK. Differential Revision: https://reviews.llvm.org/D68661 llvm-svn: 374114
* StopInfo/Mach: Use early-exits, reflow messy comments, NFCIVedant Kumar2019-10-081-494/+481
| | | | llvm-svn: 374106
* Revert "[platform process list] add a flag for showing the processes of all ↵Shafik Yaghmour2019-10-081-1/+2
| | | | | | | | | | | users" This reverts commit 080f35fb875f52c924ee37ed4d56a51fe7056afa. Conflicts: packages/Python/lldbsuite/test/functionalities/gdb_remote_client/TestPlatformClient.py llvm-svn: 374077
* [gdb-remote] process properly effective uidWalter Erquinigo2019-10-071-1/+1
| | | | | | | | | | | | | | | | | | Summary: Someone wrote SetEffectiveSetEffectiveGroupID instead of SetEffectiveUserID. After this fix, the android process list can show user names, e.g. ``` PID PARENT USER GROUP EFF USER EFF GROUP TRIPLE ARGUMENTS ====== ====== ========== ========== ========== ========== ============================== ============================ 529 1 root 0 root 0 /sbin/ueventd ``` Reviewers: labath,clayborg,aadsm,xiaobai Subscribers: llvm-svn: 373953
* [platform process list] add a flag for showing the processes of all usersWalter Erquinigo2019-10-071-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: For context: https://reviews.llvm.org/D68293 We need a way to show all the processes on android regardless of the user id. When you run `platform process list`, you only see the processes with the same user as the user that launched lldb-server. However, it's quite useful to see all the processes, though, and it will lay a foundation for full apk debugging support from lldb. Before: ``` PID PARENT USER TRIPLE NAME ====== ====== ========== ======================== ============================ 3234 1 aarch64-unknown-linux-android adbd 8034 3234 aarch64-unknown-linux-android sh 9096 3234 aarch64-unknown-linux-android sh 9098 9096 aarch64-unknown-linux-android lldb-server (lldb) ^D ``` Now: ``` (lldb) platform process list -x 205 matching processes were found on "remote-android" PID PARENT USER TRIPLE NAME ====== ====== ========== ======================== ============================ 1 0 init 524 1 init 525 1 init 531 1 ueventd 568 1 logd 569 1 aarch64-unknown-linux-android servicemanager 570 1 aarch64-unknown-linux-android hwservicemanager 571 1 aarch64-unknown-linux-android vndservicemanager 577 1 aarch64-unknown-linux-android qseecomd 580 577 aarch64-unknown-linux-android qseecomd ... 23816 979 com.android.providers.calendar 24600 979 com.verizon.mips.services 27888 979 com.hualai 28043 2378 com.android.chrome:sandboxed_process0 31449 979 com.att.shm 31779 979 com.samsung.android.authfw 31846 979 com.samsung.android.server.iris 32014 979 com.samsung.android.MtpApplication 32045 979 com.samsung.InputEventApp ``` Reviewers: labath,xiaobai,aadsm,clayborg Subscribers: llvm-svn: 373931
* [JSON] Don't wrap json::Array in a value (NFC)Jonas Devlieghere2019-10-031-3/+3
| | | | | | | | There's no need to wrap the just-constructed json::Array in a json::Value, we can just return that and pass ownership to the raw_ostream. llvm-svn: 373656
* Fix a use-after-free in GDBRemoteCommunicationServerLLGSPavel Labath2019-10-031-1/+2
| | | | | | | | | | | | Although it's called "GetString", StreamString::GetString actually returns a StringRef. Creating a json object with a StringRef does not make a copy, which means the StringRef will be dangling as soon as the underlying stream is destroyed. Add a .str() to force the json object to hold a copy of the string. This fixes nearly every test on linux. llvm-svn: 373572
* factor out an abstract base class for FileLawrence D'Anna2019-10-032-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | Summary: This patch factors out File as an abstract base class and moves most of its actual functionality into a subclass called NativeFile. In the next patch, I'm going to be adding subclasses of File that don't necessarily have any connection to actual OS files, so they will not inherit from NativeFile. This patch was split out as a prerequisite for https://reviews.llvm.org/D68188 Reviewers: JDevlieghere, jasonmolenda, labath Reviewed By: labath Subscribers: lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D68317 llvm-svn: 373564
* [RegisterContextDarwin_arm64] Include the headers for getsysctlbyname.Davide Italiano2019-10-021-0/+5
| | | | | | | | This code is only used under __arm64__, use the correct guard. <rdar://problem/55916729> llvm-svn: 373509
* [JSON] Use LLVM's library for encoding JSON in ↵Jonas Devlieghere2019-10-021-20/+17
| | | | | | | | | | | GDBRemoteCommunicationServerCommon This patch replaces the LLDB's JSON implementation with the one from LLVM in GDBRemoteCommunicationServerCommon. Differential revision: https://reviews.llvm.org/D68304 llvm-svn: 373500
* [JSON] Use LLVM's library for encoding JSON in ↵Jonas Devlieghere2019-10-021-11/+10
| | | | | | | | | | | GDBRemoteCommunicationServerPlatform This patch replaces the LLDB's JSON implementation with the one from LLVM in GDBRemoteCommunicationServerPlatform. Differential revision: https://reviews.llvm.org/D68302 llvm-svn: 373499
* [JSON] Use LLVM's library for encoding JSON in GDBRemoteCommunicationClientJonas Devlieghere2019-10-021-10/+10
| | | | | | | | | This patch replaces the LLDB's JSON implementation with the one from LLVM in GDBRemoteCommunicationClient. Differential revision: https://reviews.llvm.org/D68301 llvm-svn: 373498
* [JSON] Use LLVM's library for encoding JSON in GDBRemoteCommunicationServerLLGSJonas Devlieghere2019-10-021-48/+51
| | | | | | | | | This patch replaces the LLDB's JSON implementation with the one from LLVM in GDBRemoteCommunicationServerLLGS. Differential revision: https://reviews.llvm.org/D68299 llvm-svn: 373497
* [JSON] Use LLVM's library for encoding JSON in StructuredDataJonas Devlieghere2019-10-011-1/+1
| | | | | | | | | This patch replaces the hand-rolled JSON emission in StructuredData with LLVM's JSON library. Differential revision: https://reviews.llvm.org/D68248 llvm-svn: 373359
* [Windows] Added support of watchpoints to `NativeProcessWindows`Aleksandr Urakov2019-10-018-64/+835
| | | | | | | | | | | | | | | | Summary: This patch adds support of watchpoints to the new `NativeProcessWindows` plugin. The same tests as in D67168 pass with these changes when the old plugin is turned off, so they will cover this functionality when the old plugin is gone. Reviewers: asmith, amccarth, stella.stamenova, labath Reviewed By: labath Subscribers: labath, jfb, JDevlieghere, lldb-commits, leonid.mashinskiy Tags: #lldb Differential Revision: https://reviews.llvm.org/D67222 llvm-svn: 373300
* Use llvm for dumping DWARF expressionsPavel Labath2019-09-301-1/+0
| | | | | | | | | | | | | | | Summary: It uses the new ability of ABI plugins to vend llvm::MCRegisterInfo structs (which is what is needed to turn dwarf register numbers into strings). Reviewers: JDevlieghere, aprantl, jasonmolenda Subscribers: tatyana-krasnukha, lldb-commits Differential Revision: https://reviews.llvm.org/D67966 llvm-svn: 373208
* Unwind: Add a stack scanning mechanism to support win32 unwindingPavel Labath2019-09-272-0/+57
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Windows unwinding is weird. The unwind rules do not (always) describe the precise layout of the stack, but rather expect the debugger to scan the stack for something which looks like a plausible return address, and the unwind based on that. The reason this works somewhat reliably is because the the unwinder also has access to the frame sizes of the functions on the stack. This allows it (in most cases) to skip function pointers in local variables or function arguments, which could otherwise be mistaken for return addresses. Implementing this kind of unwind mechanism in lldb was a bit challenging because we expect to be able to statically describe (in the UnwindPlan) structure, the layout of the stack for any given instruction. Giving a precise desription of this is not possible, because it requires correlating information from two functions -- the pushed arguments to a function are considered a part of the callers stack frame, and their size needs to be considered when unwinding the caller, but they are only present in the unwind entry of the callee. The callee may end up being in a completely different module, or it may not even be possible to determine it statically (indirect calls). This patch implements this functionality by introducing a couple of new APIs: SymbolFile::GetParameterStackSize - return the amount of stack space taken up by parameters of this function. SymbolFile::GetOwnFrameSize - the size of this function's frame. This excludes the parameters, but includes stuff like local variables and spilled registers. These functions are then used by the unwinder to compute the estimated location of the return address. This address is not always exact, because the stack may contain some additional values -- for instance, if we're getting ready to call a function then the stack will also contain partially set up arguments, but we will not know their size because we haven't called the function yet. For this reason the unwinder will crawl up the stack from the return address position, and look for something that looks like a possible return address. Currently, we assume that something is a valid return address if it ends up pointing to an executable section. All of this logic kicks in when the UnwindPlan sets the value of CFA as "isHeuristicallyDetected", which is also the final new API here. Right now, only SymbolFileBreakpad implements these APIs, but in the future SymbolFilePDB will use them too. Differential Revision: https://reviews.llvm.org/D66638 llvm-svn: 373072
* Convert FileSystem::Open() to return Expected<FileUP>Lawrence D'Anna2019-09-262-11/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This patch converts FileSystem::Open from this prototype: Status Open(File &File, const FileSpec &file_spec, ...); to this one: llvm::Expected<std::unique_ptr<File>> Open(const FileSpec &file_spec, ...); This is beneficial on its own, as llvm::Expected is a more modern and recommended error type than Status. It is also a necessary step towards https://reviews.llvm.org/D67891, and further developments for lldb_private::File. Reviewers: JDevlieghere, jasonmolenda, labath Reviewed By: labath Subscribers: mgorny, lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D67996 llvm-svn: 373003
* [NFC] Fix typo in the "kind" description for the software single-step breakpointTatyana Krasnukha2019-09-241-1/+1
| | | | llvm-svn: 372763
* [lldb] [Process/NetBSD] Fix handling LLDB_INVALID_SIGNAL_NUMBERMichal Gorny2019-09-241-2/+4
| | | | | | | | | Fix NativeProcessNetBSD::Resume() to handle LLDB_INVALID_SIGNAL_NUMBER correctly. Fixes breakage caused by r372090 and r372300. I have major rewrite of that function pending; however, the fixes to gdb-remote were committed prior to that. llvm-svn: 372755
* [LLDB] Fix typo in RegisterContextDarwin_arm64Martin Storsjo2019-09-241-1/+1
| | | | | | | | | In these cases, the register number should be calculated from fpu_d0, not fpu_s0. Differential Revision: https://reviews.llvm.org/D67892 llvm-svn: 372738
* [LLDB] [Windows] Add missing ifdefs to fix building for non-x86 architecturesMartin Storsjo2019-09-241-1/+14
| | | | | | | | | | While debugging on those architectures might not be supported yet, the generic code should still be buildable. This file accesses x86 specific fields in the CONTEXT struct. Differential Revision: https://reviews.llvm.org/D67911 llvm-svn: 372699
* File::SetDescriptor() should require optionsJonas Devlieghere2019-09-231-3/+3
| | | | | | | | | | | | | | | | | | | | | | lvm_private::File::GetStream() can fail if m_options == 0 It's not clear from the header a File created with a descriptor will be not be usable by many parts of LLDB unless SetOptions is also called, but it is. This is because those parts of LLDB rely on GetStream() to use the file, and that in turn relies on calling fdopen on the descriptor. When calling fdopen, GetStream relies on m_options to determine the access mode. If m_options has never been set, GetStream() will fail. This patch adds options as a required argument to File::SetDescriptor and the corresponding constructor. Patch by: Lawrence D'Anna Differential revision: https://reviews.llvm.org/D67792 llvm-svn: 372652
* [LLDB] Use SetErrorStringWithFormatv for cases that use LLVM style format ↵Martin Storsjo2019-09-212-6/+6
| | | | | | | | | | | strings SetErrorStringWithFormat only supports normal printf style format strings. Differential Revision: https://reviews.llvm.org/D67862 llvm-svn: 372485
* [LLDB] Use LLVM_FALLTHROUGH instead of a custom commentMartin Storsjo2019-09-211-1/+1
| | | | | | | | This fixes a warning when built with Clang in MinGW mode. Differential Revision: https://reviews.llvm.org/D67860 llvm-svn: 372484
* [LLDB] Check for the GCC/MinGW compatible arch defines for windows, in ↵Martin Storsjo2019-09-212-5/+5
| | | | | | | | | | | addition to MSVC defines This matches how it is done in all other similar ifdefs throughout lldb. Differential Revision: https://reviews.llvm.org/D67858 llvm-svn: 372483
* [LLDB] Fix compilation for MinGW, remove redundant class name on inline memberMartin Storsjo2019-09-211-1/+1
| | | | | | | | | | | | This fixes build errors like these: NativeRegisterContextWindows.h:22:33: error: extra qualification on member 'NativeRegisterContextWindows' NativeRegisterContextWindows::NativeRegisterContextWindows( ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ Differential Revision: https://reviews.llvm.org/D67856 llvm-svn: 372482
* [lldb] [Process/gdb-remote] Correct more missing LLDB_INVALID_SIGNAL_NUMBERMichal Gorny2019-09-191-3/+4
| | | | | | | | Correct more uses of 0 instead of LLDB_INVALID_SIGNAL_NUMBER. Differential Revision: https://reviews.llvm.org/D67727 llvm-svn: 372300
* [lldb] [Process/gdb-remote] Fix defaulting signal to invalid in action listMichal Gorny2019-09-171-2/+3
| | | | | | | | | | Fix processing of "C" packet with signal for the whole process to default signal value for action list to LLDB_INVALID_SIGNAL_NUMBER rather than 0. Differential Revision: https://reviews.llvm.org/D67625 llvm-svn: 372090
* [NFC] Move dumping into GDBRemotePacketJonas Devlieghere2019-09-161-5/+2
| | | | | | | | This moves the dumping logic from the GDBRemoteCommunicationHistory class into the GDBRemotePacket so that it can be reused from the reproducer command object. llvm-svn: 372028
* [Reproducer] Move GDB Remote Packet into Utility. (NFC)Jonas Devlieghere2019-09-1310-153/+34
| | | | | | | | | | | | | | To support dumping the reproducer's GDB remote packets, we need the (de)serialization logic to live in Utility rather than the GDB remote plugin. This patch renames StreamGDBRemote to GDBRemote and moves the relevant packet code there. Its uses in the GDBRemoteCommunicationHistory and the GDBRemoteCommunicationReplayServer are updated as well. Differential revision: https://reviews.llvm.org/D67523 llvm-svn: 371907
* [Target] Move InferiorCall to ProcessAlex Langford2019-09-132-64/+0
| | | | | | | | | | | | | | | | | | | Summary: InferiorCall is only ever used in Process, and it is not specific to POSIX. By moving it to Process, we can remove all dependencies on plugins from Process. Moving InferiorCall to Process seems to achieve this quite well. Additionally, the name InferiorCall is a little vague now, so we rename it something a bit more specific. Reviewers: JDevlieghere, clayborg, compnerd, labath Subscribers: lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D67472 llvm-svn: 371796
* [Reproducer] Move GDB Remote Provider into Reproducer (NFC)Jonas Devlieghere2019-09-111-42/+4
| | | | | | | | | | | | | | Originally the idea was for providers to be defined close to where they are used. While this helped designing the providers in such a way that they don't depend on each other, it also means that it's not possible to access them from a central place. This proved to be a problem for some providers and resulted in them living in the reproducer class. The ProcessGDBRemote provider is the last remaining exception. This patch makes things consistent and moves it into the reproducer like the other providers. llvm-svn: 371685
* [Plugins/Process] Remove direct use of ClangASTContext from InferiorCallPOSIXAlex Langford2019-09-111-11/+21
| | | | | | | | | | | | | Summary: InferiorCallPOSIX directly grabs a ClangASTContext from the Target it has and does no error checking. I don't think these functions have a reason to know about clang specifically. Additionally, using `GetScratchTypeSystemForLanguage` forces us to do error checking since it returns an Expected. Differential Revision: https://reviews.llvm.org/D67427 llvm-svn: 371654
* [Utility] Replace `lldb_private::CleanUp` by `llvm::scope_exit`Jonas Devlieghere2019-09-101-4/+4
| | | | | | | | | This removes the CleanUp class and replaces its usages with llvm's ScopeExit, which has similar semantics. Differential revision: https://reviews.llvm.org/D67378 llvm-svn: 371474
* [Reproducer] Disconnect when the replay server is out of packets.Jonas Devlieghere2019-09-091-3/+3
| | | | | | | | | | | | | | This is a fix for the issue described in r371144. > On more than one occasion I've found this test got stuck during replay > while waiting for a packet from debugserver when the debugger was in > the process of being destroyed. When the replay server is out of packets we should just disconnect so the debugger doesn't have to do any cleanup that it wouldn't do during capture. llvm-svn: 371459
OpenPOWER on IntegriCloud