summaryrefslogtreecommitdiffstats
path: root/lldb/source/Interpreter/OptionValueFileSpec.cpp
Commit message (Collapse)AuthorAgeFilesLines
* *** This commit represents a complete reformatting of the LLDB source codeKate Stone2016-09-061-133/+95
| | | | | | | | | | | | | | | | | | | | | | | *** to conform to clang-format’s LLVM style. This kind of mass change has *** two obvious implications: Firstly, merging this particular commit into a downstream fork may be a huge effort. Alternatively, it may be worth merging all changes up to this commit, performing the same reformatting operation locally, and then discarding the merge for this particular commit. The commands used to accomplish this reformatting were as follows (with current working directory as the root of the repository): find . \( -iname "*.c" -or -iname "*.cpp" -or -iname "*.h" -or -iname "*.mm" \) -exec clang-format -i {} + find . -iname "*.py" -exec autopep8 --in-place --aggressive --aggressive {} + ; The version of clang-format used was 3.9.0, and autopep8 was 1.2.4. Secondly, “blame” style tools will generally point to this commit instead of a meaningful prior commit. There are alternatives available that will attempt to look through this change and find the appropriate prior commit. YMMV. llvm-svn: 280751
* Decoupled Options from CommandInterpreter.Todd Fiala2016-08-111-0/+1
| | | | | | | | | | | | | | | | Options used to store a reference to the CommandInterpreter instance in the base Options class. This made it impossible to parse options independent of a CommandInterpreter. This change removes the reference from the base class. Instead, it modifies the options-parsing-related methods to take an ExecutionContext pointer, which the options may inspect if they need to do so. Closes https://reviews.llvm.org/D23416 Reviewers: clayborg, jingham llvm-svn: 278440
* Don't #include "lldb-python.h" from anywhere.Zachary Turner2015-05-291-2/+0
| | | | | | | | | | | | | Since interaction with the python interpreter is moving towards being more isolated, we won't be able to include this header from normal files anymore, all includes of it should be localized to the python library which will live under source/bindings/API/Python after a future patch. None of the files that were including this header actually depended on it anyway, so it was just a dead include in every single instance. llvm-svn: 238581
* Make sure to re-read the file data you can get from ↵Greg Clayton2015-03-061-1/+9
| | | | | | | | | | | | | | | | | OptionValueFileSpec::GetFileContents(...) when the file has changed. This means you can set an expression prefix file with: (lldb) settings set target.expr-prefix /tmp/to/prefix.txt And you can run an expression and modify your expression prefix file in another editor without having to type: (lldb) settings set target.expr-prefix /tmp/to/prefix.txt again... <rdar://problem/12155942> llvm-svn: 231535
* Refactor OptionValue::SetValueFromCString to use llvm::StringRefPavel Labath2015-02-201-12/+5
| | | | | | | | | | Reviewers: clayborg Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D7676 llvm-svn: 230005
* Fix SettingsCommandTestCase.test_set_error_output_pathVince Harron2015-02-181-7/+12
| | | | | | | | | | target.error-path (and output-path) were getting resolved on the local file system, which doesn't make any sense for remote targets So this patch prevents file paths from being resolved on the host system. llvm-svn: 229763
* Fixed an issue where if the operating system python plug-in is changed at ↵Greg Clayton2015-01-131-0/+2
| | | | | | | | | | | | | | | | | | | | | | | runtime, it wouldn't cause the process to reload the new operating system plug-in, now it does. This is currently controlled by a setting: (lldb) settings set target.process.python-os-plugin-path <path> Or clearing it with: (lldb) settings clear target.process.python-os-plugin-path The process will now reload the OperatingSystem plug-in. This was implemented by: - adding the ability to set a notify callback for when an option value is changed - added the ability for the process plug-in to load the operating system plug-in on the fly - fixed bugs in the Process::GetStatus() so all threads are displayed if their thread IDs are larger than 32 bits - adding a callback in ProcessProperties to tell when the "python-os-plugin-path" is changed by the user - fixing a crasher in ProcessMachCore that happens when updating the thread list when the OS plugin is reloaded llvm-svn: 225831
* Switch NULL to C++11 nullptr in source/InterpreterEd Maste2014-04-201-1/+1
| | | | | | Patch by Robert Matusewicz llvm-svn: 206711
* Remember to clear the cached data for the OptionValueFileSpec in ↵Jim Ingham2014-04-041-0/+1
| | | | | | | | SetValueFromCString. <rdar://problem/16179718> target.expr-prefix contents appear to be cached for an entire session llvm-svn: 205636
* Change OptionValueFileSpec::SetValueFromCString to strip off whitespace,Jason Molenda2013-09-131-1/+14
| | | | | | | | single-quote and double-quotemarks from around file paths specified to settings like target.expr-prefix or target.process.python-os-plugin-path. <rdar://problem/14970457> llvm-svn: 190654
* OptionValueFileSpec::SetValueFromCString() is passed a complete file ↵Jason Molenda2013-08-271-11/+2
| | | | | | | | | | | | | | pathname -- it should not split up that pathname itself or require quoting to avoid the same. This fixing a bug where target create -c "core file" or target create -s "symbol file" will fail with an error message that the paths haven't been properly quoted. Working around it required target create -c "core\ file" to survive both attemps at tokenizing. <rdar://problem/14230629> llvm-svn: 189313
* Cleanup logging to use the new "std::string FileSpec::GetPath()" function. ↵Greg Clayton2013-04-291-11/+1
| | | | | | | | | | | Also added a similar function for modules: std::string Module::GetSpecificationDescription () const; This returns the module as "/usr/lib/libfoo.dylib" for normal files (calls "std::string FileSpec::GetPath()" on m_file) but it also might include the object name in case the module is for a .o file in a BSD archive ("/usr/lib/libfoo.a(bar.o)"). Cleaned up necessary logging code to use it. llvm-svn: 180717
* Rolled back r176719 because settings with fileSean Callanan2013-03-151-2/+11
| | | | | | | | names were broken. <rdar://problem/13422580> llvm-svn: 177139
* OptionValueFileSpec shouldn't be doing argumentSean Callanan2013-03-081-11/+2
| | | | | | | | | parsing on the file name it gets. That confuses it if there are spaces in the file name. <rdar://problem/13380392> llvm-svn: 176719
* <rdar://problem/12978143>Enrico Granata2013-01-281-1/+1
| | | | | | | | | | | Data formatters now cache themselves. This commit provides a new formatter cache mechanism. Upon resolving a formatter (summary or synthetic), LLDB remembers the resolution for later faster retrieval. Also moved the data formatters subsystem from the core to its own group and folder for easier management, and done some code reorganization. The ObjC runtime v1 now returns a class name if asked for the dynamic type of an object. This is required for formatters caching to work with the v1 runtime. Lastly, this commit disposes of the old hack where ValueObjects had to remember whether they were queried for formatters with their static or dynamic type. Now the ValueObjectDynamicValue class works well enough that we can use its dynamic value setting for the same purpose. llvm-svn: 173728
* <rdar://problem/12827031>Greg Clayton2012-12-101-2/+11
| | | | | | Fix the OptionValueFileSpec option value to correctly get the file path when trailing spaces are on the path. The "settings set" command uses the OptionValueFileSpec class to set file paths and if extra spaces are at the end it will include those in the paths. Now we chop up the value send to to OptionValueFileSpec::SetValueFromCString(...) function with "lldb_private::Args" and give an appropriate error if more than one path is used. It also allows for quotes to be used when specifying the path. llvm-svn: 169753
* Fix Linux build warnings due to redefinition of macros:Daniel Malea2012-12-051-0/+2
| | | | | | | | | - add new header lldb-python.h to be included before other system headers - short term fix (eventually python dependencies must be cleaned up) Patch by Matt Kopec! llvm-svn: 169341
* When OptionValueFileSpec is given a filename startingJason Molenda2012-10-111-1/+1
| | | | | | | | | | with ~, we need to realpath it. Fixes the case where settings set target.expr-prefix ~/lldb.prefix.header wouldn't read this prefix header file. <rdar://problem/12475676> llvm-svn: 165704
* Wrapped up the work I am going to do for now for the "add-dsym" or "target ↵Greg Clayton2012-09-271-1/+30
| | | | | | | | | | | | | | | | | | | | symfile add" command. We can now do: Specify a path to a debug symbols file: (lldb) add-dsym <path-to-dsym> Go and download the dSYM file for the "libunc.dylib" module in your target: (lldb) add-dsym --shlib libunc.dylib Go and download the dSYM given a UUID: (lldb) add-dsym --uuid <UUID> Go and download the dSYM file for the current frame: (lldb) add-dsym --frame llvm-svn: 164806
* OptionValueFileSpec had an accessor to read the contents of the file and ↵Greg Clayton2012-08-301-2/+7
| | | | | | return the data. This can end up being used to get the string contents of a text file and could end up not being NULL terminated. I added accessors to get the file contents raw, or with a null terminator. Added the needed calls to make this happen in the FileSpec and File classes. llvm-svn: 162921
* Remove further outdated "settings" code and also implement a few missing things.Greg Clayton2012-08-221-0/+8
| | | | llvm-svn: 162376
* Reimplemented the code that backed the "settings" in lldb. There were many ↵Greg Clayton2012-08-221-0/+116
issues with the previous implementation: - no setting auto completion - very manual and error prone way of getting/setting variables - tons of code duplication - useless instance names for processes, threads Now settings can easily be defined like option values. The new settings makes use of the "OptionValue" classes so we can re-use the option value code that we use to set settings in command options. No more instances, just "does the right thing". llvm-svn: 162366
OpenPOWER on IntegriCloud