aboutsummaryrefslogtreecommitdiff
path: root/lldb/source/Host/common/NativeProcessProtocol.cpp
AgeCommit message (Collapse)AuthorFilesLines
2025-07-16[lldb] Fix a crash in lldb-server during RemoveSoftwareBreakpoint() (#148738)royitaqi1-6/+12
# Lldb-server crash We have seen stacks like the following in lldb-server core dumps: ``` [ "__GI___pthread_kill at pthread_kill.c:46", "__GI_raise at raise.c:26", "__GI_abort at abort.c:100", "__assert_fail_base at assert.c:92", "__GI___assert_fail at assert.c:101", "lldb_private::NativeProcessProtocol::RemoveSoftwareBreakpoint(unsigned long) at /redacted/lldb-server:0" ] ``` # Hypothesis of root cause In `NativeProcessProtocol::RemoveSoftwareBreakpoint()` ([code](https://github.com/llvm/llvm-project/blob/19b2dd9d798c124406b0124a1b8debb711675281/lldb/source/Host/common/NativeProcessProtocol.cpp#L359-L423)), a `ref_count` is asserted and reduced. If it becomes zero, the code first go through a series of memory reads and writes to remove the breakpoint trap opcode and to restore the original process code, then, if everything goes fine, removes the entry from the map `m_software_breakpoints` at the end of the function. However, if any of the validations for the above reads and writes goes wrong, the code returns an error early, skipping the removal of the entry. This leaves the entry behind with a `ref_count` of zero. The next call to `NativeProcessProtocol::RemoveSoftwareBreakpoint()` for the same breakpoint[*] would violate the assertion about `ref_count > 0` ([here](https://github.com/llvm/llvm-project/blob/19b2dd9d798c124406b0124a1b8debb711675281/lldb/source/Host/common/NativeProcessProtocol.cpp#L365)), which would cause a crash. [*] We haven't found a *regular* way to repro such a next call in lldb or lldb-dap. This is because both of them remove the breakpoint from their internal list when they get any response from the lldb-server (OK or error). Asking the client to delete the breakpoint a second time doesn't trigger the client to send the `$z` gdb packet to lldb-server. We are able to trigger the crash by sending the `$z` packet directly, see "Manual test" below. # Fix Lift the removal of the map entry to be immediately after the decrement of `ref_count`, before the early returns. This ensures that the asserted case will never happen. The validation errors can still happen, and whether they happen or not, the breakpoint has been removed from the perspective of the lldb-server (same as that of lldb and lldb-dap). # Manual test & unit test See PR.
2025-03-28[lldb] Use *Set::insert_range and a range constructor (NFC) (#133548)Kazu Hirata1-1/+1
This patch uses *Set::insert_range and a range constructor of DenseSet to clean up the code to populate sets.
2024-09-05[lldb] Make deep copies of Status explicit (NFC) (#107170)Adrian Prantl1-4/+4
2024-09-05[lldb] Make conversions from llvm::Error explicit with Status::FromEr… ↵Adrian Prantl1-1/+1
(#107163) …ror() [NFC]
2024-08-27[lldb] Turn lldb_private::Status into a value type. (#106163)Adrian Prantl1-16/+19
This patch removes all of the Set.* methods from Status. This cleanup is part of a series of patches that make it harder use the anti-pattern of keeping a long-lives Status object around and updating it while dropping any errors it contains on the floor. This patch is largely NFC, the more interesting next steps this enables is to: 1. remove Status.Clear() 2. assert that Status::operator=() never overwrites an error 3. remove Status::operator=() Note that step (2) will bring 90% of the benefits for users, and step (3) will dramatically clean up the error handling code in various places. In the end my goal is to convert all APIs that are of the form ` ResultTy DoFoo(Status& error) ` to ` llvm::Expected<ResultTy> DoFoo() ` How to read this patch? The interesting changes are in Status.h and Status.cpp, all other changes are mostly ` perl -pi -e 's/\.SetErrorString/ = Status::FromErrorString/g' $(git grep -l SetErrorString lldb/source) ` plus the occasional manual cleanup.
2023-04-17[lldb] Add support for MSP430 in LLDB.Ilya Kuklin1-0/+4
Add MSP430 to the list of available targets, implement MSP430 ABI, add support for debugging targets with 16-bit address size. The update is intended for use with MSPDebug, a GDB server implementation for MSP430. Reviewed By: bulbazord, DavidSpickett Differential Revision: https://reviews.llvm.org/D146965
2023-04-17Revert "[lldb] Add support for MSP430 in LLDB."Anton Korobeynikov1-4/+0
This reverts commit 82c02b733c7736507a41a26bebd37d3f8e88bd4e. Apparently, the original patch was not rebased onto `main
2023-04-17[lldb] Add support for MSP430 in LLDB.Anton Korobeynikov1-0/+4
Add MSP430 to the list of available targets, implement MSP430 ABI, add support for debugging targets with 16-bit address size. The update is intended for use with MSPDebug, a GDB server implementation for MSP430. Reviewed By: bulbazord, DavidSpickett Differential Revision: https://reviews.llvm.org/D146965
2023-03-30[lldb-server/linux] Use waitpid(-1) to collect inferior eventsPavel Labath1-1/+1
This is a follow-up to D116372, which had a rather unfortunate side effect of making the processing of a single SIGCHLD quadratic in the number of threads -- which does not matter for simple applications, but can get really bad for applications with thousands of threads. This patch fixes the problem by implementing the other possibility mentioned in the first patch -- doing waitpid(-1) centrally and then routing the events to the correct process instance. The "uncollected" threads are held in the process factory class -- which I've renamed to Manager for this purpose, as it now does more than creating processes. Differential Revision: https://reviews.llvm.org/D146977
2023-01-16[llvm][ADT] Replace uses of `makeMutableArrayRef` with deduction guidesJoe Loser1-2/+1
Similar to how `makeArrayRef` is deprecated in favor of deduction guides, do the same for `makeMutableArrayRef`. Once all of the places in-tree are using the deduction guides for `MutableArrayRef`, we can mark `makeMutableArrayRef` as deprecated. Differential Revision: https://reviews.llvm.org/D141814
2023-01-10Move from llvm::makeArrayRef to ArrayRef deduction guides - last partserge-sans-paille1-13/+13
This is a follow-up to https://reviews.llvm.org/D140896, split into several parts as it touches a lot of files. Differential Revision: https://reviews.llvm.org/D141298
2023-01-07[lldb] Use std::optional instead of llvm::Optional (NFC)Kazu Hirata1-2/+2
This patch replaces (llvm::|)Optional< with std::optional<. I'll post a separate patch to clean up the "using" declarations, #include "llvm/ADT/Optional.h", etc. This is part of an effort to migrate from llvm::Optional to std::optional: https://discourse.llvm.org/t/deprecating-llvm-optional-x-hasvalue-getvalue-getvalueor/63716
2023-01-07[lldb] Add #include <optional> (NFC)Kazu Hirata1-0/+1
This patch adds #include <optional> to those files containing llvm::Optional<...> or Optional<...>. I'll post a separate patch to actually replace llvm::Optional with std::optional. This is part of an effort to migrate from llvm::Optional to std::optional: https://discourse.llvm.org/t/deprecating-llvm-optional-x-hasvalue-getvalue-getvalueor/63716
2022-12-04[lldb] Use std::nullopt instead of None (NFC)Kazu Hirata1-3/+3
This patch mechanically replaces None with std::nullopt where the compiler would warn if None were deprecated. The intent is to reduce the amount of manual work required in migrating from Optional to std::optional. This is part of an effort to migrate from llvm::Optional to std::optional: https://discourse.llvm.org/t/deprecating-llvm-optional-x-hasvalue-getvalue-getvalueor/63716
2022-11-10[LLDB] Add LoongArch software breakpoint trap opcodeTeizhu Yang1-0/+8
Use `break 0x5` for LoongArch software breakpoint traps. The magic number 0x5 means `BRK_SSTEPBP` as defined in the kernel header `asm/break.h` on LoongArch. Reviewed By: SixWeining, xen0n Differential Revision: https://reviews.llvm.org/D137519
2022-10-25[LLDB][RISCV] Add RV64C instruction support for EmulateInstructionRISCVEmmmer1-3/+6
Add: - RV64C instructions sets. - corresponding unittests. - `c.break` code for lldb and lldb-server Fix: - wrong decoding of imm in `DecodeSType` Reviewed By: DavidSpickett Differential Revision: https://reviews.llvm.org/D136362
2022-08-11[LLDB][RISCV] Add riscv software breakpoint trap codeEmmmer1-0/+7
Added: - Take RISC-V `ebreak` instruction as breakpoint trap code, so our breakpoint works as expected now. Further work: - RISC-V does not support hardware single stepping yet. A software implementation may come in future PR. - Add support for RVC extension (the trap code, etc.). Reviewed By: DavidSpickett Differential Revision: https://reviews.llvm.org/D131566
2022-06-15[trace][intelpt] Support system-wide tracing [9] - Collect and return ↵Walter Erquinigo1-1/+10
context switch traces - Add collection of context switches per cpu grouped with the per-cpu intel pt traces. - Move the state handling from the interl pt trace class to the PerfEvent one. - Add support for stopping and enabling perf event groups. - Return context switch entries as part of the jLLDBTraceGetState response. - Move the triggers of whenever the process stopped or resumed. Now the will-resume notification is in a better location, which will ensure that we'll capture the instructions that will be executed. - Remove IntelPTSingleBufferTraceUP. The unique pointer was useless. - Add unit tests Differential Revision: https://reviews.llvm.org/D125897
2022-06-14[lldb] Fix TestDyldExecLinux with xml enabledPavel Labath1-0/+2
NativeProcessLinux is not able to properly read libraries-svr4 data when running with ld.so as the "main" executable. Normally, this is not a big problem, as it returns an error message, and lldb can fallback to manual library loading. Unfortunately, lldb-server also does not clear cached svr4 data on exec, which means that it does *not* return an error when the application execs from the "regular" to the "ld.so" mode. Instead it returns incorrect data (it is missing the main executable) and causes TestDyldExecLinux to fail (but only when building with xml support enabled). This patch makes ensures that cached process data is cleared on exec, fixing the test. Since TestDyldExecLinux has shown to be sensitive to the way we read library info, I fork it into two (with svr4 enabled and disabled).
2022-05-17[trace][intelpt] Support system-wide tracing [5] - Disable/enable per-core ↵Walter Erquinigo1-0/+1
tracing based on the process state When tracing on per-core mode, we are tracing all processes, which means that after hitting a breakpoint, our process will stop running (thus producing no more tracing data) but other processes will continue writing to our trace buffers. This causes a big data loss for our trace. As a way to remediate this, I'm adding some logic to pause and unpause tracing based on the target's state. The earlier we do it the better, however, I'm not adding the trigger at the earliest possible point for simplicity of this diff. Later we can improve that part. Differential Revision: https://reviews.llvm.org/D124962
2022-02-03[lldb] Rename Logging.h to LLDBLog.h and clean up includesPavel Labath1-0/+1
Most of our code was including Log.h even though that is not where the "lldb" log channel is defined (Log.h defines the generic logging infrastructure). This worked because Log.h included Logging.h, even though it should. After the recent refactor, it became impossible the two files include each other in this direction (the opposite inclusion is needed), so this patch removes the workaround that was put in place and cleans up all files to include the right thing. It also renames the file to LLDBLog to better reflect its purpose.
2022-02-02[lldb] Convert "LLDB" log channel to the new APIPavel Labath1-10/+10
2021-07-27[lldb][AArch64] Add memory tag writing to lldb-serverDavid Spickett1-0/+7
This is implemented using the QMemTags packet, as specified by GDB in: https://sourceware.org/gdb/current/onlinedocs/gdb/General-Query-Packets.html#General-Query-Packets (recall that qMemTags was previously added to read tags) On receipt of a valid packet lldb-server will: * align the given address and length to granules (most of the time lldb will have already done this but the specification doesn't guarantee it) * Repeat the supplied tags as many times as needed to cover the range. (if tags > range we just use as many as needed) * Call ptrace POKEMTETAGS to write the tags. The ptrace step will loop just like the tag read does, until all tags are written or we get an error. Meaning that if ptrace succeeds it could be a partial write. So we call it again and if we then get an error, return an error to lldb. We are not going to attempt to restore tags after a partial write followed by an error. This matches the behaviour of the existing memory writes. The lldb-server tests have been extended to include read and write in the same test file. With some updated function names since "qMemTags" vs "QMemTags" isn't very clear when they're next to each other. Reviewed By: omjavaid Differential Revision: https://reviews.llvm.org/D105180
2021-06-24[lldb][AArch64] Add memory tag reading to lldb-serverDavid Spickett1-0/+6
This adds memory tag reading using the new "qMemTags" packet and ptrace on AArch64 Linux. This new packet is following the one used by GDB. (https://sourceware.org/gdb/current/onlinedocs/gdb/General-Query-Packets.html) On AArch64 Linux we use ptrace's PEEKMTETAGS to read tags and we assume that lldb has already checked that the memory region actually has tagging enabled. We do not assume that lldb has expanded the requested range to granules and expand it again to be sure. (although lldb will be sending aligned ranges because it happens to need them client side anyway) Also we don't assume untagged addresses. So for AArch64 we'll remove the top byte before using them. (the top byte includes MTE and other non address data) To do the ptrace read NativeProcessLinux will ask the native register context for a memory tag manager based on the type in the packet. This also gives you the ptrace numbers you need. (it's called a register context but it also has non register data, so it saves adding another per platform sub class) The only supported platform for this is AArch64 Linux and the only supported tag type is MTE allocation tags. Anything else will error. Ptrace can return a partial result but for lldb-server we will be treating that as an error. To succeed we need to get all the tags we expect. (Note that the protocol leaves room for logical tags to be read via qMemTags but this is not going to be implemented for lldb at this time.) Reviewed By: omjavaid Differential Revision: https://reviews.llvm.org/D95601
2021-04-13[lldb] Replace NativeProcess delegate list with a single delegatePavel Labath1-52/+7
In all this time, we've never used more than one delegate. The logic to support multiple delegates is therefore untested, and becomes particularly unwieldy once we need to support multiple processes. Just remove it.
2021-02-09[lldb] [Process/FreeBSDRemote] Introduce powerpc supportMichał Górny1-2/+9
Introduce a minimal support for the 32-bit powerpc platform. This includes support for GPR and FPR registers. I also needed to add software breakpoint opcode for PPC32/PPC64 (big endian), and to fix offsets in RegisterInfos_powerpc.h (used only by FreeBSD register context to be globally unique rather than relative to each struct). Differential Revision: https://reviews.llvm.org/D95947
2020-08-13[lldb][NFC] Use llvm::is_contained instead of std::find in a few placesRaphael Isemann1-2/+1
2020-04-07[lldb] NFC: Fix trivial typo in comments, documents, and messagesKazuaki Ishizaki1-1/+1
Differential Revision: https://reviews.llvm.org/D77460
2020-01-24[lldb][NFC] Fix all formatting errors in .cpp file headersRaphael Isemann1-1/+1
Summary: A *.cpp file header in LLDB (and in LLDB) should like this: ``` //===-- TestUtilities.cpp -------------------------------------------------===// ``` However in LLDB most of our source files have arbitrary changes to this format and these changes are spreading through LLDB as folks usually just use the existing source files as templates for their new files (most notably the unnecessary editor language indicator `-*- C++ -*-` is spreading and in every review someone is pointing out that this is wrong, resulting in people pointing out that this is done in the same way in other files). This patch removes most of these inconsistencies including the editor language indicators, all the different missing/additional '-' characters, files that center the file name, missing trailing `===//` (mostly caused by clang-format breaking the line). Reviewers: aprantl, espindola, jfb, shafik, JDevlieghere Reviewed By: JDevlieghere Subscribers: dexonsmith, wuzish, emaste, sdardis, nemanjai, kbarton, MaskRay, atanasyan, arphaman, jfb, abidh, jsji, JDevlieghere, usaxena95, lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D73258
2020-01-07[lldb][NFC] Use static_cast instead of reinterpret_cast where possibleRaphael Isemann1-2/+2
Summary: There are a few places in LLDB where we do a `reinterpret_cast` for conversions that we could also do with `static_cast`. This patch moves all this code to `static_cast`. Reviewers: shafik, JDevlieghere, labath Reviewed By: labath Subscribers: arphaman, usaxena95, lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D72161
2019-10-16Add arm64_32 support to lldb, an ILP32 codegen Jason Molenda1-0/+2
that runs on arm64 ISA targets, specifically Apple watches. Differential Revision: https://reviews.llvm.org/D68858 llvm-svn: 375032
2019-07-24[Logging] Replace Log::Printf with LLDB_LOG macro (NFC)Jonas Devlieghere1-9/+10
This patch replaces explicit calls to log::Printf with the new LLDB_LOGF macro. The macro is similar to LLDB_LOG but supports printf-style format strings, instead of formatv-style format strings. So instead of writing: if (log) log->Printf("%s\n", str); You'd write: LLDB_LOG(log, "%s\n", str); This change was done mechanically with the command below. I replaced the spurious if-checks with vim, since I know how to do multi-line replacements with it. find . -type f -name '*.cpp' -exec \ sed -i '' -E 's/log->Printf\(/LLDB_LOGF\(log, /g' "{}" + Differential revision: https://reviews.llvm.org/D65128 llvm-svn: 366936
2019-07-23Revert "Revert "Add ReadCStringFromMemory for faster string reads""Antonio Afonso1-0/+54
This reverts commit 9c10b620c0619611dfe062216459431955ac4801. llvm-svn: 366848
2019-06-25Revert "Add ReadCStringFromMemory for faster string reads"Antonio Afonso1-54/+0
This reverts commit a7335393f50246b59db450dc6005f7c8f29e73a6. It seems this is breaking a bunch of tests (https://reviews.llvm.org/D62503#1549874) so reverting until I find the time to repro and fix. llvm-svn: 364355
2019-06-18Add ReadCStringFromMemory for faster string readsAntonio Afonso1-0/+54
Summary: This is the fifth patch to improve module loading in a series that started here (where I explain the motivation and solution): D62499 Reading strings with ReadMemory is really slow when reading the path of the shared library. This is because we don't know the length of the path so use PATH_MAX (4096) and these strings are actually super close to the boundary of an unreadable page. So even though we use process_vm_readv it will usually fail because the read size spans to the unreadable page and we then default to read the string word by word with ptrace. This new function is very similar to another ReadCStringFromMemory that already exists in lldb that makes sure it never reads cross page boundaries and checks if we already read the entire string by finding '\0'. I was able to reduce the GetLoadedSharedLibraries call from 30ms to 4ms (or something of that order). Reviewers: clayborg, xiaobai, labath Reviewed By: labath Subscribers: emaste, lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D62503 llvm-svn: 363750
2019-04-10[NFC] Remove ASCII lines from commentsJonas Devlieghere1-2/+0
A lot of comments in LLDB are surrounded by an ASCII line to delimit the begging and end of the comment. Its use is not really consistent across the code base, sometimes the lines are longer, sometimes they are shorter and sometimes they are omitted. Furthermore, it looks kind of weird with the 80 column limit, where the comment actually extends past the line, but not by much. Furthermore, when /// is used for Doxygen comments, it looks particularly odd. And when // is used, it incorrectly gives the impression that it's actually a Doxygen comment. I assume these lines were added to improve distinguishing between comments and code. However, given that todays editors and IDEs do a great job at highlighting comments, I think it's worth to drop this for the sake of consistency. The alternative is fixing all the inconsistencies, which would create a lot more churn. Differential revision: https://reviews.llvm.org/D60508 llvm-svn: 358135
2019-01-19Update the file headers across all of the LLVM projects in the monorepoChandler Carruth1-4/+3
to reflect the new license. We understand that people may be surprised that we're moving the header entirely to discuss the new license. We checked this carefully with the Foundation's lawyer and we believe this is the correct approach. Essentially, all code in the project is now made available by the LLVM project under our new license, so you will see that the license headers include that license only. Some of our contributors have contributed code under our old license, and accordingly, we have retained a copy of our old license notice in the top-level files in each project and repository. llvm-svn: 351636
2018-11-04Fix log statement in r346093Pavel Labath1-1/+1
Thanks to Dávid Bolvanský for pointing that out. llvm-svn: 346094
2018-11-04NativeProcessProtocol: Simplify breakpoint setting codePavel Labath1-40/+183
Summary: A fairly simple operation as setting a breakpoint (writing a breakpoint opcode) at a given address was going through three classes: NativeProcessProtocol which called NativeBreakpointList, which then called SoftwareBrekpoint, only to end up again in NativeProcessProtocol to do the actual writing itself. This is unnecessarily complex and can be simplified by moving all of the logic into NativeProcessProtocol class itself, removing a lot of boilerplate. One of the reeasons for this complexity was that (it seems) NativeBreakpointList class was meant to hold both software and hardware breakpoints. However, that never materialized, and hardware breakpoints are stored in a separate map holding only hardware breakpoints. Essentially, this patch makes software breakpoints follow that approach by replacing the heavy SoftwareBraekpoint with a light struct of the same name, which holds only the data necessary to describe one breakpoint. The rest of the logic is in the main class. As, at the lldb-server level, handling software and hardware breakpoints is very different, this seems like a reasonable state of things. Reviewers: krytarowski, zturner, clayborg Subscribers: mgorny, lldb-commits Differential Revision: https://reviews.llvm.org/D52941 llvm-svn: 346093
2018-10-03Pull FixupBreakpointPCAsNeeded into base classPavel Labath1-0/+62
Summary: This function existed (with identical code) in both NativeProcessLinux and NativeProcessNetBSD, and it is likely that it would be useful to any future implementation of NativeProcessProtocol. Therefore I move it to the base class. Reviewers: krytarowski Subscribers: lldb-commits Differential Revision: https://reviews.llvm.org/D52719 llvm-svn: 343683
2018-09-30Pull GetSoftwareBreakpointPCOffset into base classPavel Labath1-0/+23
Summary: This function encodes the knowledge of whether the PC points to the breakpoint instruction of the one following it after the breakpoint is "hit". This behavior mainly(*) depends on the architecture and not on the OS, so it makes sense for it to be implemented in the base class, where it can be shared between different implementations (Linux and NetBSD atm). (*) It is possible for an OS to expose a different API, perhaps by doing some fixups in the kernel. In this case, the implementation can override this function to implement custom behavior. Reviewers: krytarowski, zturner Subscribers: lldb-commits Differential Revision: https://reviews.llvm.org/D52532 llvm-svn: 343409
2018-09-13NativeProcessProtocol: Sink ReadMemoryWithoutTrap into base classPavel Labath1-0/+9
The two existing implementations have the function implemented identically, and there's no reason to believe that this would be different for other implementations. llvm-svn: 342167
2018-09-09Speculative fix for NetBSD bot for r341758Pavel Labath1-6/+6
llvm-svn: 341759
2018-09-09Re-commit "Modernize NativeProcessProtocol::GetSoftwareBreakpointTrapOpcode"Pavel Labath1-0/+37
This recommits r341487, which was reverted due to failing tests with clang. It turned out I had incorrectly expected that the literal arrays passed to ArrayRef constructor will have static (permanent) storage. This was only the case with gcc, while clang was constructing them on stack, leading to dangling pointers when the function returns. The fix is to explicitly assign static storage duration to the opcode arrays. llvm-svn: 341758
2018-09-08Revert "Modernize NativeProcessProtocol::GetSoftwareBreakpointTrapOpcode"Pavel Labath1-32/+0
This reverts commit r341487. Jan Kratochvil reports it breaks LLDB when compiling with clang. llvm-svn: 341747
2018-09-05Modernize NativeProcessProtocol::GetSoftwareBreakpointTrapOpcodePavel Labath1-0/+32
return the opcode as a Expected<ArrayRef> instead of a Status+pointer+size combo. I also move the linux implementation to the base class, as the trap opcodes are likely to be the same for all/most implementations of the class (except the arm one, where linux chooses a different opcode than what the arm spec recommends, which I keep linux-specific). llvm-svn: 341487
2018-08-07Move RegisterValue,Scalar,State from Core to UtilityPavel Labath1-1/+1
These three classes have no external dependencies, but they are used from various low-level APIs. Moving them down to Utility improves overall code layering (although it still does not break any particular dependency completely). The XCode project will need to be updated after this change. Differential Revision: https://reviews.llvm.org/D49740 llvm-svn: 339127
2018-05-15Reapply "Remove Process references from the Host module"Pavel Labath1-1/+0
This re-lands r332250/D46395, after fixing Mac build errors. llvm-svn: 332353
2018-05-14Revert "Remove Process references from the Host module"Pavel Labath1-0/+1
The first fix wasn't enough, there is still a missing ProcessInstanceInfo include in Host.mm. I won't be able to test a fix before leaving work, so I am reverting both commits. This reverts commit r332250 and the subsequent fix attempt. llvm-svn: 332261
2018-05-14Remove Process references from the Host modulePavel Labath1-1/+0
The Process class was only being referenced because of the last-ditch effort in the process launchers to set a process death callback in case one isn't set already. Although launching a process for debugging is the most important kind of "launch" we are doing, it is by far not the only one, so assuming this particular callback is the one to be used is not a good idea (besides breaking layering). Instead of assuming a particular exit callback, I change the launcher code to require the callback to be set by the user (and fix up the two call sites which did not set the callback already). Reviewers: jingham, davide Subscribers: lldb-commits Differential Revision: https://reviews.llvm.org/D46395 llvm-svn: 332250