summaryrefslogtreecommitdiffstats
path: root/lldb/scripts
Commit message (Collapse)AuthorAgeFilesLines
...
* Fix line endings of deps analysis script.Zachary Turner2017-03-061-65/+65
| | | | llvm-svn: 297035
* Fix a bug in the dep analysis script.Zachary Turner2017-03-041-0/+1
| | | | | | | It wasn't always normalizing slashes correctly, so you'd end up with the same thing in the map twice. llvm-svn: 296947
* Fixed repo.py to not send git errors to stderr.Sean Callanan2017-03-031-1/+1
| | | | | | | | Some repos are not git repos, so git is expected to fail. These errors should not go to stderr, because Xcode interprets them as failures. llvm-svn: 296924
* Add a script to dump out all project inter-dependencies.Zachary Turner2017-03-031-0/+65
| | | | llvm-svn: 296920
* Changed builld-llvm.py to use .json filesSean Callanan2017-02-234-31/+106
| | | | | | | | | | | | | | | | | | | | | | | LLDB has many branches in a variety of repositories. The build-script.py file is subtly different for each set. This is unnecessary and causes merge headaches. This patch makes build-llvm.py consult a directory full of .json files, each one of which matches a particular branch using a regular expression. This update to the patch introduces a FALLBACK file whose contents take precedence if the current branch could not be identified. If the current branch could be identified, FALLBACK is updated, allowing the user to e.g. cut branches off of known branches and still have the automatic checkout mechanism work. It also documents all of this. Differential revision: https://reviews.llvm.org/D30275 llvm-svn: 295922
* Reverted 295897 pending refinements and fixes for green-dragon.Sean Callanan2017-02-233-80/+31
| | | | llvm-svn: 295915
* Changed builld-llvm.py to use .json filesSean Callanan2017-02-223-31/+80
| | | | | | | | | | | | | | LLDB has many branches in a variety of repositories. The build-script.py file is subtly different for each set. This is unnecessary and causes merge headaches. This patch makes build-llvm.py consult a directory full of .json files, each one of which matches a particular branch using a regular expression. Differential revision: https://reviews.llvm.org/D30275 llvm-svn: 295897
* Install six.py conditionallyKamil Rytarowski2017-02-043-5/+12
| | | | | | | | | | | | | | | | | | | | | | | Summary: The current version of LLDB installs six.py into global python library directory. This approach produces conflicts downstream with distribution's py-six copy. Introduce new configure option LLDB_USE_SYSTEM_SIX (disabled by default). Once specified as TRUE, six.py won't be installed to Python's directory. Add new option in finishSwigWrapperClasses.py, namely --useSystemSix. Sponsored by <The NetBSD Foundation> Reviewers: mgorny, emaste, clayborg, joerg, labath Reviewed By: labath Subscribers: #lldb Tags: #lldb Differential Revision: https://reviews.llvm.org/D29405 llvm-svn: 294071
* Add logging to SBThread::GetInfoItemByPathAsString toJason Molenda2017-02-021-6/+8
| | | | | | | | | | | | print the path being requested. Change the GetInfoItemByPathAsString docuemtnation in the .i file to use docstring instead of autodoc so the function signature is included in the python help. <rdar://problem/29999567> llvm-svn: 293858
* Install lldb Python module on Windows.Zachary Turner2017-01-061-6/+9
| | | | | | | Patch by Vadim Chugunov Differential Revision: https://reviews.llvm.org/D27476 llvm-svn: 291291
* Fix the cmake declaration syntaxSylvestre Ledru2016-12-171-1/+1
| | | | llvm-svn: 290045
* Support of lldb on Kfreebsd Sylvestre Ledru2016-12-172-2/+6
| | | | | | | | | | | | | | Summary: Patch by Pino Toscano. Reported in http://bugs.debian.org/835665 Reviewers: tfiala, emaste Subscribers: beanz, mgorny, emaste, krytarowski, brucem, tberghammer, danalbert, srhines, #lldb Tags: #lldb Differential Revision: https://reviews.llvm.org/D23977 llvm-svn: 290044
* Fix broken escaping of commands in the buildLuke Drummond2016-12-162-33/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | A combination of broken escaping in CMake and in the python swig generation scripts meant that the swig generation step would fail whenever there were spaces or special characters in parameters passed to swig. The fix for this in CMakeLists is to use the VERBATIM option on all COMMAND-based custom builders relying on CMake to properly escape each argument in the generated file. Within the python swig scripts, the fix is to call subprocess.Popen with a list of raw argument strings rather than ones that are incorrectly manually escaped, then passed to a shell subprocess via subprocess.Popen(' '.join(params)). This also prevents nasty things happening such as accidental command-injection. This allows us to have the swig / python executables in paths containing special chars and spaces, (or on shared storage on Win32, e.g \\some\path or C:\Program Files\swig\swig.exe). Subscribers: lldb-commits Differential Revision: https://reviews.llvm.org/D26757 llvm-svn: 289956
* Adopt PrettyStackTrace in LLDBSean Callanan2016-12-141-1/+2
| | | | | | | | | | LLDB needs some minor changes to adopt PrettyStackTrace after https://reviews.llvm.org/D27683. We remove our own SetCrashDescription() function and use LLVM-provided RAII objects instead. We also make sure LLDB doesn't define __crashtracer_info__ which would collide with LLVM's definition. Differential Revision: https://reviews.llvm.org/D27735 llvm-svn: 289711
* Clean up some use of __ANDROID_NDK__ in the cmake filesPavel Labath2016-12-051-1/+1
| | | | | | | | | | | | | | | Rationale: scripts/Python/modules: android is excluded at a higher level, so no point in checking here tools/lldb-mi: lldb-mi builds fine (with some cosmetic tweaks) on android, and there is no reason it shouldn't. tools/lldb-server: LLDB_DISABLE_LIBEDIT/CURSES already take the platform into account, so there is no point in checking again. I am reasonably confident this should not break the build on any platform, but I'll keep an eye out on the bots. llvm-svn: 288661
* Clean up the stop printing header lines.Jim Ingham2016-11-081-0/+9
| | | | | | | | | | | | | | | | I added a "thread-stop-format" to distinguish between the form that is just the thread info (since the stop printing immediately prints the frame info) and one with more frame 0 info - which is useful for "thread list" and the like. I also added a frame.no-debug boolean to the format entities so you can print frame information differently between frames with source info and those without. This closes https://reviews.llvm.org/D26383. <rdar://problem/28273697> llvm-svn: 286288
* [CMake] Rename lldb-launcher to darwin-debugChris Bieneman2016-10-272-41/+0
| | | | | | | | | | | | Summary: This tool is only built on Darwin, and the name darwin-debug matches the Xcode project. We should have this in sync unless there is a good reason not to. Reviewers: zturner, tfiala, labath Subscribers: labath, mgorny, lldb-commits Differential Revision: https://reviews.llvm.org/D25745 llvm-svn: 285356
* Fix Python binding generation build step on WindowsVadim Macagon2016-10-131-4/+4
| | | | | | | | | | | | | | | | | | | | Summary: If Python is installed to a location that contains spaces (e.g. "C:\Program Files\Python3") then the build fails while attempting to run the modify-python-lldb.py script because the path to the Python executable is not double-quoted before being passed to the shell. The fix consists of letting Python handle the formatting of the command line, since subprocess.Popen() is perfectly capable of handling paths containing spaces if it's given the command and arguments as a list instead of a single pre-formatted string. Reviewers: zturner, clayborg Subscribers: lldb-commits Differential Revision: https://reviews.llvm.org/D25396 llvm-svn: 284100
* Add an accessor to get the value of RC_PLATFORM_NAME at build timeEnrico Granata2016-09-231-0/+3
| | | | llvm-svn: 282310
* Add the ability to append breakpoints to the save file.Jim Ingham2016-09-221-1/+8
| | | | llvm-svn: 282212
* Add the ability to deserialize only breakpoints matching a given name.Jim Ingham2016-09-221-0/+63
| | | | | | Also tests for this and the ThreadSpec serialization. llvm-svn: 282207
* Actually, do it this way because I will want to know if I am in a host build ↵Enrico Granata2016-09-221-3/+9
| | | | | | elsewhere too llvm-svn: 282179
* The host version of lldb always builds for macosxEnrico Granata2016-09-221-0/+3
| | | | llvm-svn: 282178
* [CMake] Initial support for LLDB.frameworkChris Bieneman2016-09-212-12/+29
| | | | | | | | | | | | | | | | | | | Summary: This patch adds a CMake option LLDB_BUILD_FRAMEWORK, which builds libLLDB as a macOS framework instead of as a *nix shared library. With this patch any LLDB executable that has the INCLUDE_IN_FRAMEWORK option set will be built into the Framework's resources directory, and a symlink to the exeuctable will be placed under the build directory's bin folder. Creating the symlinks allows users to run commands from the build directory without altering the workflow. The framework generated by this patch passes the LLDB test suite, but has not been tested beyond that. It is not expected to be fully ready to ship, but it is a first step. With this patch binaries that are placed inside the framework aren't being properly installed. Fixing that would increase the patch size significantly, so I'd like to do that in a follow-up. Reviewers: zturner, tfiala Subscribers: beanz, lldb-commits, mgorny Differential Revision: https://reviews.llvm.org/D24749 llvm-svn: 282110
* add stop column highlighting supportTodd Fiala2016-09-211-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This change introduces optional marking of the column within a source line where a thread is stopped. This marking will show up when the source code for a thread stop is displayed, when the debug info knows the column information, and if the optional column marking is enabled. There are two separate methods for handling the marking of the stop column: * via ANSI terminal codes, which are added inline to the source line display. The default ANSI mark-up is to underline the column. * via a pure text-based caret that is added in the appropriate column in a newly-inserted blank line underneath the source line in question. There are some new options that control how this all works. * settings set stop-show-column This takes one of 4 values: * ansi-or-caret: use the ANSI terminal code mechanism if LLDB is running with color enabled; if not, use the caret-based, pure text method (see the "caret" mode below). * ansi: only use the ANSI terminal code mechanism to highlight the stop line. If LLDB is running with color disabled, no stop column marking will occur. * caret: only use the pure text caret method, which introduces a newly-inserted line underneath the current line, where the only character in the new line is a caret that highlights the stop column in question. * none: no stop column marking will be attempted. * settings set stop-show-column-ansi-prefix This is a text format that indicates the ANSI formatting code to insert into the stream immediately preceding the column where the stop column character will be marked up. It defaults to ${ansi.underline}; however, it can contain any valid LLDB format codes, e.g. ${ansi.fg.red}${ansi.bold}${ansi.underline} * settings set stop-show-column-ansi-suffix This is the text format that specifies the ANSI terminal codes to end the markup that was started with the prefix described above. It defaults to: ${ansi.normal}. This should be sufficient for the common cases. Significant leg-work was done by Adrian Prantl. (Thanks, Adrian!) differential review: https://reviews.llvm.org/D20835 reviewers: clayborg, jingham llvm-svn: 282105
* Adds tests for breakpoint names, and a FindBreakpointsByName.Jim Ingham2016-09-211-0/+3
| | | | | | | | Also if you set a breakpoint with an invalid name, we'll refuse to set the breakpoint rather than silently ignoring the name. llvm-svn: 282043
* Add some more tests for breakpoint serialization.Jim Ingham2016-09-202-0/+8
| | | | | | | | | | Serialize breakpoint names & the hardware_requested attributes. Also added a few missing affordances to SBBreakpoint whose absence writing the tests pointed out. <rdar://problem/12611863> llvm-svn: 282036
* Xcode: support gtests that use the Inputs dirTodd Fiala2016-09-191-0/+10
| | | | | | | | | | | | | | | | This change adds support for the gtests that require input data in the Inputs files. This is done through a new Xcode script phase that runs the scripts/Xcode/prepare-gtest-run-dir.sh script. That script simply copies the contents of all unittests/**/Inputs dirs into ${TARGET_BUILD_DIR}/Inputs before running the test. This change also renames the Xcode 'gtest-for-debugging' to 'gtest-build', and makes the gtest "build and run" target depend on gtest-build. This reduces replication within the targets. gtest .c/.cpp files now should only be added to the gtest-build target. llvm-svn: 281913
* First tests for serializing breakpoints.Jim Ingham2016-09-161-0/+6
| | | | | | Plus a few bug fixes I found along the way. llvm-svn: 281690
* Add SB API's for writing breakpoints to & creating the from a file.Jim Ingham2016-09-142-0/+35
| | | | | | | | | | | Moved the guts of the code from CommandObjectBreakpoint to Target (should have done it that way in the first place.) Added an SBBreakpointList class so there's a way to specify which breakpoints to serialize and to report the deserialized breakpoints. <rdar://problem/12611863> llvm-svn: 281520
* LLDB: API for iPermission of object file's sectionsAbhishek Aggarwal2016-09-081-0/+3
| | | | | | | | | | | | | | | | | | Summary: - Added an API to public interface that provides permissions (RWX) of individual sections of an object file - Earlier, there was no way to find out this information through SB APIs - A possible use case of this API is: when a user wants to know the sections that have executable machine instructions and want to write a tool on top of LLDB based on this information - Differential Revision: https://reviews.llvm.org/D24251 llvm-svn: 280924
* *** This commit represents a complete reformatting of the LLDB source codeKate Stone2016-09-0623-606/+1109
| | | | | | | | | | | | | | | | | | | | | | | *** 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
* Fixup TestPyObjSynthProvider.py and enable it againPavel Labath2016-08-311-0/+1
| | | | | | | | | | | | | | | Summary: - copies the new file in the cmake build - adds an additional import statement - marks the test as no-debug-info specific, as it seems to be testing a python feature Reviewers: granata.enrico Subscribers: lldb-commits Differential Revision: https://reviews.llvm.org/D24074 llvm-svn: 280261
* Add an helper class lldb.formatters.synth.PythonObjectSyntheticChildProviderEnrico Granata2016-08-301-0/+1
| | | | | | | | This class enables one to easily write a synthetic child provider by writing a class that returns pairs of names and primitive Python values - the base class then converts those into LLDB SBValues Comes with a test case llvm-svn: 280172
* Add SBType::GetArrayType() such that - given a type - one can make an array ↵Enrico Granata2016-08-301-0/+3
| | | | | | | | (of a given size) of that type This is currently only implemented for the clang-based TypeSystem, but other languages are welcome to jump in! llvm-svn: 280151
* Add StructuredData plugin type; showcase with new DarwinLog featureTodd Fiala2016-08-194-2/+53
| | | | | | | | | | | | Take 2, with missing cmake line fixed. Build tested on Ubuntu 14.04 with clang-3.6. See docs/structured_data/StructuredDataPlugins.md for details. differential review: https://reviews.llvm.org/D22976 reviewers: clayborg, jingham llvm-svn: 279202
* Revert "Add StructuredData plugin type; showcase with new DarwinLog feature"Todd Fiala2016-08-194-53/+2
| | | | | | This reverts commit 1d885845d1451e7b232f53fba2e36be67aadabd8. llvm-svn: 279200
* Add StructuredData plugin type; showcase with new DarwinLog featureTodd Fiala2016-08-194-2/+53
| | | | | | | | | See docs/structured_data/StructuredDataPlugins.md for details. differential review: https://reviews.llvm.org/D22976 reviewers: clayborg, jingham llvm-svn: 279198
* fix lldb-gtest target of Xcode buildTodd Fiala2016-08-121-1/+1
| | | | | | | | | | | | | Change r278527 was filtering out too many libraries. The Xcode lldb-gtest target depends on linking libgtest*.a, but those were not being included. This caused the lldb-gtest linkage step to fail to find a main entry point that is present in the filtered out libs. This change restores the libgtest* libraries to the link list by whitelisting them in the filter. llvm-svn: 278552
* Link LLDB only against libclang and libLLVM .a files to fix macOS buildTodd Fiala2016-08-121-1/+4
| | | | | | | | | | | | | | | | | | The Xcode macOS build of LLDB is currently broken after https://reviews.llvm.org/D23232 landed, see http://lab.llvm.org:8080/green/job/lldb_build_test/20014/console, because we’re trying to link against all .a files found in the llvm-build/lib directory. Let’s be more specific in what we link against. This patch applies a regexp to only use “libclang.*”, “libLLVM.*” and not “libclang_rt.*” static archives. Change by Kuba Mracek (formerly Kuba Brecka) See review here: https://reviews.llvm.org/D23444 Reviewers: tfiala, compnerd llvm-svn: 278527
* Add a few more needed bits to the scripted thread plans.Jim Ingham2016-08-052-0/+6
| | | | llvm-svn: 277879
* Add LLVM build config for BuildAndIntegration.Stephane Sezer2016-07-121-0/+4
| | | | | | | | | | Reviewers: tfiala, clayborg Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D22234 llvm-svn: 275140
* Apply local patches when building llvm on Mac.Stephane Sezer2016-07-121-0/+8
| | | | | | | | | | | | | | | Summary: This is already done when building for linux with the CMake build system. This functionality disappeared recently when some of the build scripts used by the xcode build system changed. Reviewers: tfiala, clayborg Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D22233 llvm-svn: 275134
* Add an API to unwind from a hand-called expression.Jim Ingham2016-07-081-0/+8
| | | | | | | This is just an SB API way of doing "thread return -x". <rdar://problem/27110360> llvm-svn: 274822
* Implement GetMemoryRegions() for Linux and Mac OSX core files.Howard Hellyer2016-07-071-0/+3
| | | | | | | | | | | | | | | Summary: This patch fills in the implementation of GetMemoryRegions() on the Linux and Mac OS core file implementations of lldb_private::Process (ProcessElfCore::GetMemoryRegions and ProcessMachCore::GetMemoryRegions.) The GetMemoryRegions API was added under: http://reviews.llvm.org/D20565 The patch re-uses the m_core_range_infos list that was recently added to implement GetMemoryRegionInfo in both ProcessElfCore and ProcessMachCore to ensure the returned regions match the regions returned by Process::GetMemoryRegionInfo(addr_t load_addr, MemoryRegionInfo &region_info). Reviewers: clayborg Subscribers: labath, lldb-commits Differential Revision: http://reviews.llvm.org/D21751 llvm-svn: 274741
* Because of our lifetime rules w.r.t. ValueObjects and ClusterManagers, ↵Enrico Granata2016-07-061-0/+23
| | | | | | | | | | | | | | | | synthetic children caching is a tricky area: - if a synthetic child comes from the same hierarchy as its parent object, then it can't be cached by SharedPointer inside the synthetic provider, or it will cause a reference loop; - but, if a synthetic child is made from whole cloth (e.g. from an expression, a memory region, ...), then it better be cached by SharedPointer, or it will be cleared out and cause an assert() to fail if used at a later point For most cases of self-rooted synthetic children, we have a flag we set "IsSyntheticChildrenGenerated", but we were not using it to track caching. So, what ended up happening is each provider would set up its own cache, and if it got it wrong, a hard to diagnose crash would ensue This patch fixes that by centralizing caching in ValueObjectSynthetic - if a provider returns a self-rooted child (as per the flag), then it gets cached centrally by the ValueObject itself This cache is used only for lifetime management and not later retrieval of child values - a different cache handles that (because we might have a mix of self-rooted and properly nested child values for the same parent, we can't trivially use this lifetime cache for retrieval) Fixes rdar://26480007 llvm-svn: 274683
* Fix "lldb.SBProcess.is_stopped" and "lldb.SBProcess.is_running" to do the ↵Greg Clayton2016-07-051-3/+3
| | | | | | | | right thing. https://llvm.org/bugs/show_bug.cgi?id=28428 llvm-svn: 274568
* fixits are apparently called fix-its.Jim Ingham2016-06-281-2/+2
| | | | | | <rdar://problem/26998596> llvm-svn: 273979
* Add .i files for SBMemoryRegionInfo and SBMemoryRegionInfoList and also hook ↵Greg Clayton2016-06-245-0/+119
| | | | | | | | up the new calls in SBProcess that give out SBMemoryRegionInfo and SBMemoryRegionInfoList objects. Also make sure the right headers and .i files are included so SWIG can hook everything up. llvm-svn: 273749
* Fix an issue where the @lldb.command marker would not work with the new ↵Enrico Granata2016-06-242-5/+10
| | | | | | | | | | | 5-argument version of the Python command function This: a) teaches PythonCallable to look inside a callable object b) teaches PythonCallable to discover whether a callable method is bound c) teaches lldb.command to dispatch to either the older 4 argument version or the newer 5 argument version llvm-svn: 273640
OpenPOWER on IntegriCloud