summaryrefslogtreecommitdiffstats
path: root/lldb
Commit message (Collapse)AuthorAgeFilesLines
...
* [lldb] Make TestDeletedExecutable more reliableRaphael Isemann2019-07-112-5/+25
| | | | | | | | | | | | | | | | | | | | | Summary: It seems that calling Popen can return to the caller before the started process has read all the needed information from its executable. This means that in case we delete the executable while the process is still starting up, this test will create a zombie process which in turn leads to a failing test. On my macOS system this happens quite frequently. This patch fixes this by letting the test synchronize with the inferior after it has started up. Reviewers: davide Reviewed By: davide Subscribers: labath, friss, lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D64546 llvm-svn: 365813
* [lldb] Don't use __FUNCTION__ as a file nameRaphael Isemann2019-07-111-1/+1
| | | | | | | | | | | | | | | | | | | | | Summary: I saw while debugging that we call this file `ParseInternal`, which is not a very good name for our fake expression file and also adds this unnecessary link between the way we name this function and the other source location names we get from the expression parser. This patch is renaming it to `<lldb-expr>` which is closer to the way Clang names its buffers, it doesn't depend on the function name (which changes when I refactor this code) and it's easier to grep for. Reviewers: davide Reviewed By: davide Subscribers: abidh, lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D64545 llvm-svn: 365812
* [LLDB] Fix FreeBSD build.David Carlier2019-07-112-19/+24
| | | | | | | | | | | | To align with the LaunchThread change. Reviewers: MaskRay, mgorny Reviewed By: MaskRay Differential Revision: https://reviews.llvm.org/D64398 llvm-svn: 365761
* [lldb] Disable TestDollarInVariable.py on WindowsRaphael Isemann2019-07-111-1/+2
| | | | | | | | | | | | It seems on Windows we don't handle the lldb_expr_result variable correctly: ``` AssertionError: False is not True : 'expr $__lldb_expr_result' returns expected result, got '(int &) $0 = 0x0000000000000000' ``` I'll disable the test until I can find a way to debug this on Windows. llvm-svn: 365719
* [swig] Add workaround for old swigJonas Devlieghere2019-07-111-0/+5
| | | | | | | | | Apparently, when using swig 1.3.40, properties to set values do not work without the `__swig_setmethods__` workaround. I conditionally added this back for SBTypeCategory, as it's causing a test failure on GreenDragon, while I investigate this further. llvm-svn: 365718
* [lldb] Fix handling of dollar characters in expr commandRaphael Isemann2019-07-107-31/+132
| | | | llvm-svn: 365698
* [Expression] IR Instrumenters should have a UtilityFunctionAlex Langford2019-07-102-18/+18
| | | | | | | | | Right now, IR Instrumenters take a DynamicCheckerFunctions object which has all the UtilityFunctions used to instrument IR for expressions. However, each Instrumenter (in practice) uses exactly one UtilityFunction, so let's change the abstraction. llvm-svn: 365696
* Add Python 3.6 and 3.7 to the version listNico Weber2019-07-101-1/+1
| | | | | | | | | | Python 3.6 and 3.7 have been released. Differential Revision: https://reviews.llvm.org/D64444 Patch from Christian Biesinger <cbiesinger@google.com>! llvm-svn: 365688
* [scripts] Remove the unused 'shush' script.Davide Italiano2019-07-101-64/+0
| | | | | | | | There are pre-made utilities doing this. If somebody finds an use for it and wants to resurrect, I would recommend to revise the error messages. llvm-svn: 365677
* Options: Reduce code duplicationPavel Labath2019-07-104-72/+48
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: While investigating breakages caused by D63110, I noticed we were building the short options strings in three places. Some of them used a leading ':' to detect missing arguments, and some didn't. This was the indirect cause of D63110. Here, I move the common code into a utility function. Also, unify the code which appends the sentinel value at the end of the option vector, and make it harder for users to pass invalid argc-argv combos to getopt (another component of D63110) by having the OptionParser::Parse function take a (Mutable)ArrayRef. This unification has uncovered that we don't handle missing arguments while building aliases, However, it's not possible to write an effective test for this, as right now it is not possible to return an error out of the alias parsing code (which means we are printing the generic "failure" message even after this patch). Reviewers: mgorny, aprantl Reviewed By: mgorny Subscribers: lldb-commits Differential Revision: https://reviews.llvm.org/D63770 llvm-svn: 365665
* ObjectFileELF: Add support for gnu-style compressed sectionsPavel Labath2019-07-103-29/+57
| | | | | | | | | With this style, a compressed section is indicated by a "z" in the section name, instead of a section header flag. This patch consists of two small tweaks: - use an llvm Decompressor method in order to properly detect compressed sections - make sure we recognise .zdebug_info (and friends) when classifying section types. llvm-svn: 365654
* [CMake][NFC] Remove dead code lldb_append_link_flags() from AddLLDB.cmakeStefan Granitz2019-07-101-16/+0
| | | | llvm-svn: 365651
* [CMake][NFC] Polish comments in AddLLDB.cmakeStefan Granitz2019-07-101-2/+6
| | | | llvm-svn: 365650
* [CMake] Add Apple-lldb-Linux.cmake cacheStefan Granitz2019-07-101-0/+8
| | | | llvm-svn: 365649
* [CMake] Polish Apple-lldb cachesStefan Granitz2019-07-102-18/+8
| | | | llvm-svn: 365648
* [CMake] `install-distribution` for LLDB on DarwinStefan Granitz2019-07-108-74/+118
| | | | | | | | | | | | | | | | | | | | | Summary: There's a number of requirements for installing LLDB on macOS that are untypical for LLVM projects: use special install-prefix for LLDB.framework, ship headers and tools as framework resources, patch RPATHs, externalize debug-info to dSYM's and strip binaries with `-ST`. For some of it we could use `llvm_externalize_debuginfo()` in the past and just add special cases. However, this complicates the code for all projects and comes with the major drawback, that it adds all these actions at build-time, i.e. dSYM creation and stripping take a lot of time and don't make sense at build-time. LLVM's distribution mechanism (https://llvm.org/docs/BuildingADistribution.html) appears to be the natural candidate to install LLDB. Based on D64399 (enable in standalone builds), this patch integrates framework installation with the distribution mechanism and adds custom stripping flags and dSYM creation at install-time. Unlike the abandoned D61952, it leaves build-tree binaries untouched, so there's no side-effects on testing. Potential install-order issues must be handled externally. Please let me know what you think, while I run a few more tests and add remarks+documentation. Reviewers: xiaobai, compnerd, JDevlieghere, davide, labath, mgorny Reviewed By: xiaobai, JDevlieghere Subscribers: lldb-commits, #lldb Tags: #lldb Differential Revision: https://reviews.llvm.org/D64408 llvm-svn: 365617
* [CMake] Distribution builds for LLDB standaloneStefan Granitz2019-07-103-1/+14
| | | | | | | | | | | | | | | | | | Summary: Enable `distribution` and `install-distribution` targets in LLDB standalone and pre-populate the cache accordingly on macOS. Documentation for distribution builds is here: https://llvm.org/docs/BuildingADistribution.html Reviewers: xiaobai, mgorny, JDevlieghere, davide, compnerd Reviewed By: xiaobai, JDevlieghere Subscribers: lldb-commits, #lldb Tags: #lldb Differential Revision: https://reviews.llvm.org/D64399 llvm-svn: 365616
* [CMake] Remove extra lldb-framework targetStefan Granitz2019-07-102-14/+6
| | | | | | | | | | | | | | | | Summary: The custom lldb-framework target was meant to encapsulate all build steps that LLDB.framework needs on top of the ordinaly liblldb. In the end all of it happens in post-build steps, so we can do the same with liblldb and cut down another source of confusion. Reviewers: xiaobai, JDevlieghere Reviewed By: xiaobai, JDevlieghere Subscribers: mgorny, lldb-commits, #lldb Tags: #lldb Differential Revision: https://reviews.llvm.org/D64397 llvm-svn: 365615
* Revert accidental change to fileAaron Smith2019-07-101-3/+0
| | | | llvm-svn: 365593
* Try again to move common functionality from ProcessWindows into ProcessDebuggerAaron Smith2019-07-106-455/+726
| | | | | | | This reverts commit ed499a36b67cf46cbf66052cfe374c80a595f1c1 and addresses a problem causing a Windows build bot to hang. llvm-svn: 365592
* [lldb] Quick Fix: IRExecutionUnit check pointer before access itAlex Langford2019-07-091-3/+3
| | | | | | | | | | | | Summary: Move checking pointer code block before accessing the pointer This caused lldb to crash when testing on Android Patch by Wanyi Ye! Differential Revision: https://reviews.llvm.org/D64434 llvm-svn: 365567
* [lldb_test_suite] Fix lldb test suite targeting remote AndroidAlex Langford2019-07-093-2/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Fixed `Android.rules` for running test suite on remote android - the build configuration is not compatible with ndk structure, change it to link to static libc++ - generally clang should be able to use libc++ and will link against the right library, but some libc++ installations require the user manually link libc++abi. - add flag `-lc++abi` to fix the test binary build failure Added `skipIfTargetAndroid` `skipUnlessTargetAndroid` for better test support - the `skipIfPlatform` method will ask `lldbplatformutil.getPlatform()` for platform info which is actually the os type, and //Android// is not os type but environment - create this function to handle the android target condition **To Run Test on Remote Android** 1 start lldb-server on your devices 2 run lldb-dotest with following configuration: `./lldb-dotest --out-of-tree-debugserver --arch aarch64 --platform-name remote-android --platform-url connect://localhost:12345 --platform-working-dir /data/local/tmp/ --compiler your/ndk/clang` Reviewers: xiaobai, labath Reviewed By: labath Subscribers: labath, javed.absar, kristof.beyls, srhines, lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D64118 llvm-svn: 365561
* [Docs] Replace SVN revisions with lldb versionsDave Lee2019-07-091-7/+6
| | | | | | | | | | | | | | Summary: Replaces references to svn commits with the lldb version number those commits first appeared in. Themotivation is to show that these features are no longer that new and can generally be adopted. Reviewers: JDevlieghere Subscribers: lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D61778 llvm-svn: 365559
* [lldb, windows] Include WindowsError instead of ErrorHandling in ThreadLauncherStella Stamenova2019-07-091-1/+1
| | | | | | ErrorHandling.h does not include WindowsError.h which is needed for mapWindowsError llvm-svn: 365533
* [lldb-suite] Skip TestMachCore on WindowsStella Stamenova2019-07-091-1/+4
| | | | | | This test was originally marked as expected failure on Windows, but it is timing out instead of outright failing now. The expectedFailure attribute does not correctly track timeouts (as in, they don't count as failures), so now this is causing the test suite to fail. llvm-svn: 365527
* [lldb, windows] Update two more locations that use LaunchThread to the new ↵Stella Stamenova2019-07-092-16/+20
| | | | | | function signature llvm-svn: 365526
* [CMake] Polish a commentStefan Granitz2019-07-091-1/+2
| | | | llvm-svn: 365459
* [CMake] Don't initialize LLVM_INSTALL_TOOLCHAIN_ONLY in Apple-lldb-base cacheStefan Granitz2019-07-091-1/+0
| | | | llvm-svn: 365458
* [CMake] Remove old lldb_setup_framework_rpaths_in_tool()Stefan Granitz2019-07-091-39/+0
| | | | llvm-svn: 365457
* Fix ASCII art headerJonas Devlieghere2019-07-091-2/+1
| | | | llvm-svn: 365421
* [Windows] Include ErrorHandling.hJonas Devlieghere2019-07-091-0/+2
| | | | | | Include ErrorHandling.h for mapWindowsError. llvm-svn: 365420
* [crashlog] Fix a mismatch between bytes and strings.Davide Italiano2019-07-091-1/+1
| | | | | | | | | The functions in read_plist() want bytes as input, not strings. <rdar://problem/52600712> llvm-svn: 365416
* [ThreadLauncher] Use mapWindowsError and LLDB_INVALID_HOST_THREADJonas Devlieghere2019-07-081-4/+2
| | | | | | Address post-commit feedback from Pavel and Jim. llvm-svn: 365403
* [lldb, windows] When StartMonitoring fails, return a proper errorStella Stamenova2019-07-081-7/+8
| | | | | | This is possible now that the function returns an llvm::Expected llvm-svn: 365400
* Remove install-headersJonas Devlieghere2019-07-082-168/+0
| | | | | | | | After discussing this internally, it is my understanding this was used for building LLDB internally at Apple, and is no longer used or necessary. llvm-svn: 365392
* Remove lldb-perfJonas Devlieghere2019-07-0826-4772/+0
| | | | | | | | | As discussed offline, this tool is no longer used or maintained, and doesn't provide the right abstraction for performance tracking in lldb. Differential revision: https://reviews.llvm.org/D64362 llvm-svn: 365391
* [Windows] Convert GetLastError to std::error_codeJonas Devlieghere2019-07-081-2/+4
| | | | | | | Create a std::error_code from the result of GetLastError, which in turn we can use to return an llvm::Error. llvm-svn: 365390
* [lldb] Fix two more issues in Windows following rL365226: Change ↵Stella Stamenova2019-07-082-3/+4
| | | | | | | | LaunchThread interface to return an expected A couple of the function signatures changed and they were not updated in the Windows HostProcess llvm-svn: 365388
* Revert "Move common functionality from processwindows into processdebugger"Stella Stamenova2019-07-085-716/+452
| | | | | | | | This reverts commit 9c01eaff6aa3f59d91530f47b85bb470377a7780. The changes in this commit are causing several of the LLDB tests to hang and/or timeout. llvm-svn: 365371
* [Host] Fix out-of-line definition on WindowsJonas Devlieghere2019-07-082-2/+2
| | | | | | Add missing interface changes after r365295. llvm-svn: 365358
* [Host] Fix out-of-line definition of StartMonitoringChildProcessJonas Devlieghere2019-07-081-1/+1
| | | | llvm-svn: 365344
* [lldb] [test] Update NetBSD XFAILs in test suiteMichal Gorny2019-07-0811-4/+9
| | | | llvm-svn: 365338
* Change LaunchThread interface to return an Expected for non-Apple-non-WindowsFangrui Song2019-07-089-12/+23
| | | | | | Fixes Linux build errors after D64163/r365226 llvm-svn: 365295
* Process: generalise Windows thread setupSaleem Abdulrasool2019-07-071-10/+20
| | | | | | | | The Windows build currently cannot support debugging foreign targets or debugging Windows ARM NT and Windows ARM64 targets. Do not assume a x64/x86 host. This enables building lldb for Windows ARM64. llvm-svn: 365282
* [LLDBAssert] Use unreachable instead of assert(0)Jonas Devlieghere2019-07-051-2/+2
| | | | | | As per Davide's suggestion offline. llvm-svn: 365250
* [lldb] Added assert to VerifyDeclRaphael Isemann2019-07-051-1/+4
| | | | | | | We could VerifyDecl sometimes with a nullptr. It would be nice if we could get an actual assert here instead of triggering UB. llvm-svn: 365247
* lldb_assert: abort when assertions are enabled.Jonas Devlieghere2019-07-051-0/+6
| | | | | | | | | | | | | | | | | | | | We had a long discussion in D59911 about lldb_assert and what it means. The result was the assert manifesto on lldb.llvm.org. > LLDB provides lldb_assert() as a soft alternative to cover the middle > ground of situations that indicate a recoverable bug in LLDB. In a > Debug configuration lldb_assert() behaves like assert(). In a Release > configuration it will print a warning and encourage the user to file a > bug report, similar to LLVM’s crash handler, and then return > execution. However, currently lldb_assert doesn't behave they way it's being described there: it doesn't abort in a debug/assert build. This patch fixes that by adding a call to assert() in lldb_assert(). Differential revision: https://reviews.llvm.org/D64267#1571962 llvm-svn: 365246
* [CplusPlus] ISVTableName is unused. NFCI.Davide Italiano2019-07-055-16/+0
| | | | | | | | | | | | Reviewers: teemperor, JDevlieghere Subscribers: lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D64265 llvm-svn: 365243
* Change LaunchThread interface to return an expected.Jonas Devlieghere2019-07-0512-66/+133
| | | | | | | | | Change the interface to return an expected, instead of taking a Status pointer. Differential revision: https://reviews.llvm.org/D64163 llvm-svn: 365226
* Add assert for 'bad' code path in GetUniqueNamespaceDeclarationRaphael Isemann2019-07-041-1/+2
| | | | | | | | | | | | | | | | | Summary: If we call this function with a non-namespace as a second argument (and a nullptr name), we currently only get a nullptr as a return when we hit the "Bad!!!" code path. This patch just adds an assert as this seems to be a programming error in the calling code. Reviewers: shafik Subscribers: abidh, lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D57880 llvm-svn: 365157
OpenPOWER on IntegriCloud