summaryrefslogtreecommitdiffstats
path: root/lldb/source/Host/openbsd
Commit message (Collapse)AuthorAgeFilesLines
* Move ProcessInfo from Host to Utility.Zachary Turner2019-03-041-1/+5
| | | | | | | | | | | | | | | | | | | | | There are set of classes in Target that describe the parameters of a process - e.g. it's PID, name, user id, and similar. However, since it is a bare description of a process and contains no actual functionality, there's nothing specifically that makes this appropriate for being in Target -- it could just as well be describing a process on the host, or some hypothetical virtual process that doesn't even exist. To cement this, I'm moving these classes to Utility. It's possible that we can find a better place for it in the future, but as it is neither Host specific nor Target specific, Utility seems like the most appropriate place for the time being. After this there is only 2 remaining references to Target from Host, which I'll address in a followup. Differential Revision: https://reviews.llvm.org/D58842 llvm-svn: 355342
* lldb: Fix compilation on OpenBSDRaphael Isemann2019-02-101-2/+1
| | | | | | | | | | | | | | | | Summary: Update the OpenBSD Host.cpp for the new SetFile() function signature. Fixes compiling lldb on OpenBSD. Reviewers: krytarowski Reviewed By: krytarowski Subscribers: lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D57907 llvm-svn: 353642
* Update the file headers across all of the LLVM projects in the monorepoChandler Carruth2019-01-192-8/+6
| | | | | | | | | | | | | | | | | 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
* Use llvm::VersionTuple instead of manual version marshallingBrad Smith2019-01-181-5/+6
| | | | llvm-svn: 351504
* Remove header grouping comments.Jonas Devlieghere2018-11-111-4/+0
| | | | | | | | This patch removes the comments grouping header includes. They were added after running IWYU over the LLDB codebase. However they add little value, are often outdates and burdensome to maintain. llvm-svn: 346626
* [FileSpec] Make style argument mandatory for SetFile. NFCJonas Devlieghere2018-06-131-1/+2
| | | | | | Fix SetFile uses in hosts that I missed in r334663. llvm-svn: 334664
* Delete some unused #includes of CleanUp.h, NFCVedant Kumar2018-02-231-1/+0
| | | | llvm-svn: 325847
* Remove unused includes from the Host modulePavel Labath2018-01-241-1/+0
| | | | llvm-svn: 323340
* Remove Platform references from the Host modulePavel Labath2018-01-191-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: These were used by Host::LaunchProcess to "resolve" the executable it was about to launch. The only parts of Platform::ResolveExecutable, which seem to be relevant here are the FileSpec::ResolvePath and ResolveExecutableLocation calls. The rest (most) of that function deals with selecting an architecture out of a fat binary and making sure we are able to create a Module with that slice. These are reasonable actions when selecting a binary to debug, but not for a generic process launching framework (it's technically even wrong because we should be able to launch a binary with execute permissions only, but trying to parse such file will obviously fail). I remove the platform call by inlining the relevant FileSpec calls and ignoring the rest of the Platform::ResolveExecutable code. The architecture found by the slice-searching code is being ignored already anyway, as we use the one specified in the LaunchInfo, so the only effect of this should be a different error message in case the executable does not contain the requested architecture -- before we would get an error message from the Platform class, but now we will get an error from the actual posix_spawn syscall (this is only relevant on mac, as it's the only target supporting fat binaries). Launching targets for debugging should not be affected as here the executable is pre-resolved at the point when the Target is created. Reviewers: jingham, clayborg Subscribers: lldb-commits, emaste Differential Revision: https://reviews.llvm.org/D41902 llvm-svn: 322935
* Add Utility/Environment class for handling... environmentsPavel Labath2018-01-101-3/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: There was some confusion in the code about how to represent process environment. Most of the code (ab)used the Args class for this purpose, but some of it used a more basic StringList class instead. In either case, the fact that the underlying abstraction did not provide primitive operations for the typical environment operations meant that even a simple operation like checking for an environment variable value was several lines of code. This patch adds a separate Environment class, which is essentialy a llvm::StringMap<std::string> in disguise. To standard StringMap functionality, it adds a couple of new functions, which are specific to the environment use case: - (most important) envp conversion for passing into execve() and likes. Instead of trying to maintain a constantly up-to-date envp view, it provides a function which creates a envp view on demand, with the expectation that this will be called as the very last thing before handing the value to the system function. - insert(StringRef KeyEqValue) - splits KeyEqValue into (key, value) pair and inserts it into the environment map. - compose(value_type KeyValue) - takes a map entry and converts in back into "KEY=VALUE" representation. With this interface most of the environment-manipulating code becomes one-liners. The only tricky part was maintaining compatibility in SBLaunchInfo, which expects that the environment entries are accessible by index and that the returned const char* is backed by the launch info object (random access into maps is hard and the map stores the entry in a deconstructed form, so we cannot just return a .c_str() value). To solve this, I have the SBLaunchInfo convert the environment into the "envp" form, and use it to answer the environment queries. Extra code is added to make sure the envp version is always in sync. (This also improves the layering situation as Args was in the Interpreter module whereas Environment is in Utility.) Reviewers: zturner, davide, jingham, clayborg Subscribers: emaste, lldb-commits, mgorny Differential Revision: https://reviews.llvm.org/D41359 llvm-svn: 322174
* Remove dead Core/StreamFile includesPavel Labath2017-06-301-6/+3
| | | | llvm-svn: 306817
* Rename Error -> Status.Zachary Turner2017-05-121-3/+3
| | | | | | | | | | | | | | | This renames the LLDB error class to Status, as discussed on the lldb-dev mailing list. A change of this magnitude cannot easily be done without find and replace, but that has potential to catch unwanted occurrences of common strings such as "Error". Every effort was made to find all the obvious things such as the word "Error" appearing in a string, etc, but it's possible there are still some lingering occurences left around. Hopefully nothing too serious. llvm-svn: 302872
* [LLDB] OpenBSD supportKamil Rytarowski2017-03-262-0/+290
Summary: Add basic OpenBSD support. This is enough to be able to analyze core dumps for OpenBSD/amd64, OpenBSD/arm, OpenBSD/arm64 and OpenBSD/i386. Note that part of the changes to source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp fix a bug that probably affects other platforms as well. The GetProgramHeaderByIndex() interface use 1-based indices, but in some case when looping over the headers the, the loop starts at 0 and misses the last header. This caused problems on OpenBSD since OpenBSD core dumps have the PT_NOTE segment as the last program header. Reviewers: joerg, labath, krytarowski Reviewed By: krytarowski Subscribers: aemerson, emaste, rengolin, srhines, krytarowski, mgorny, lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D31131 llvm-svn: 298810
OpenPOWER on IntegriCloud