summaryrefslogtreecommitdiffstats
path: root/lldb
Commit message (Collapse)AuthorAgeFilesLines
* Fix warning caused by new clang::BuiltinType::Float16 added in r312794Ted Woodward2017-09-201-0/+1
| | | | llvm-svn: 313799
* Fix the SIGINT handlersAdrian McCarthy2017-09-202-9/+9
| | | | | | | | | | | | | | | | | 1. Fix a data race (g_interrupt_sent flag usage was not thread safe, signals can be handled on arbitrary threads) 2. exit() is not signal-safe, replaced it with the signal-safe equivalent _exit() (This differs from the patch on Phabrictor because I had to add `#include <atomic>` to get the definition of `std::atomic_flag`.) patch by lemo Differential Revision: https://reviews.llvm.org/D37926 llvm-svn: 313785
* Signal polling is supported with pselect (re-land r313704 without a Windows ↵Eugene Zemtsov2017-09-202-5/+5
| | | | | | | | | breakage) Older Android API levels don't have ppoll, but LLDB works just fine, since on Android it always uses pselect anyway. llvm-svn: 313726
* Rollback r313704 because of the Windows build breakEugene Zemtsov2017-09-202-6/+5
| | | | llvm-svn: 313707
* Signal polling is supported with pselectEugene Zemtsov2017-09-202-5/+6
| | | | | | | Older Android API levels don't have ppoll, but LLDB works just fine, since on Android it always uses pselect anyway. llvm-svn: 313704
* Re-land r313210 - Fix for bug 34532 - A few rough corners related to ↵Adrian McCarthy2017-09-196-5/+100
| | | | | | | | | | | | | | | | | | | | | | | | post-mortem debugging (core/minidump) The main change is to avoid setting the process state as running when debugging core/minidumps (details in the bug). Also included a few small, related fixes around how the errors propagate in this case. Fixed the FreeBSD/Windows break: the intention was to keep Process::WillResume() and Process::DoResume() "in-sync", but this had the unfortunate consequence of breaking Process sub-classes which don't override WillResume(). The safer approach is to keep Process::WillResume() untouched and only override it in the minidump and core implementations. patch by lemo Bug: https://bugs.llvm.org/show_bug.cgi?id=34532 Differential Revision: https://reviews.llvm.org/D37651 llvm-svn: 313655
* Fix build of TaskPoolTest with xcodebuildFrancis Ricci2017-09-191-1/+1
| | | | llvm-svn: 313642
* Use ThreadLauncher to launch TaskPool threadsFrancis Ricci2017-09-199-10/+21
| | | | | | | | | | | | | | | | | | Summary: This allows for the stack size to be configured, which isn't possible with std::thread. Prevents overflowing the stack when performing complex operations in the task pool on darwin, where the default pthread stack size is only 512kb. This also moves TaskPool from Utility to Host. Reviewers: labath, tberghammer, clayborg Subscribers: lldb-commits Differential Revision: https://reviews.llvm.org/D37930 llvm-svn: 313637
* Revert "Fix for bug 34532 - A few rough corners related to post-mortem ↵Adrian McCarthy2017-09-186-91/+6
| | | | | | | | | | debugging (core/minidump)" Broke Windows and FreeBSD (at least). This reverts commit 628ca7052b4a5dbace0f6205409113e12c8a78fa. llvm-svn: 313540
* Revert "Use ThreadLauncher to launch TaskPool threads"Francis Ricci2017-09-181-12/+1
| | | | | | This reverts commit r313537 because it fails to link on linux buildbots llvm-svn: 313539
* Use ThreadLauncher to launch TaskPool threadsFrancis Ricci2017-09-181-1/+12
| | | | | | | | | | | | | | | | Summary: This allows for the stack size to be configured, which isn't possible with std::thread. Prevents overflowing the stack when performing complex operations in the task pool on darwin, where the default pthread stack size is only 512kb. Reviewers: labath, tberghammer, clayborg Subscribers: lldb-commits Differential Revision: https://reviews.llvm.org/D37930 llvm-svn: 313537
* Fix Linux remote debugging after r313442Tamas Berghammer2017-09-181-1/+2
| | | | | | | | | On Linux lldb-server sends an OK response to qfThreadInfo if no process is started yet. I don't know why would LLDB issue a qfThreadInfo packet before starting a process but creating a fake thread ID in case of an OK or Error respoinse sounds bad anyway so lets not do it. llvm-svn: 313525
* Fix compatibility with OpenOCD debug stub.Vadim Chugunov2017-09-162-7/+5
| | | | | | | | OpenOCD sends register classes as two separate <feature> nodes, fixed parser to process both of them. OpenOCD returns "l" in response to "qfThreadInfo", so IsUnsupportedResponse() was false and we were ending up without any threads in the process. I think it's reasonable to assume that there's always at least one thread. llvm-svn: 313442
* Check availability of accept4 in C++ instad of C code.Eugene Zemtsov2017-09-161-1/+1
| | | | llvm-svn: 313437
* More precise c library feature detection for Android.Eugene Zemtsov2017-09-163-2/+3
| | | | llvm-svn: 313436
* Resubmit "[lit] Force site configs to run before source-tree configs"Zachary Turner2017-09-152-101/+16
| | | | | | | | | | | | | | | | | | | | This is a resubmission of r313270. It broke standalone builds of compiler-rt because we were not correctly generating the llvm-lit script in the standalone build directory. The fixes incorporated here attempt to find llvm/utils/llvm-lit from the source tree returned by llvm-config. If present, it will generate llvm-lit into the output directory. Regardless, the user can specify -DLLVM_EXTERNAL_LIT to point to a specific lit.py on their file system. This supports the use case of someone installing lit via a package manager. If it cannot find a source tree, and -DLLVM_EXTERNAL_LIT is either unspecified or invalid, then we print a warning that tests will not be able to run. Differential Revision: https://reviews.llvm.org/D37756 llvm-svn: 313407
* Remove a couple of warnings pointed out by Ted Woodward.Jim Ingham2017-09-151-5/+11
| | | | llvm-svn: 313371
* Revert "[lit] Force site configs to run before source-tree configs"Zachary Turner2017-09-152-16/+101
| | | | | | | | This patch is still breaking several multi-stage compiler-rt bots. I already know what the fix is, but I want to get the bots green for now and then try re-applying in the morning. llvm-svn: 313335
* Fix syntax in lldb lit.cfgReid Kleckner2017-09-151-1/+1
| | | | llvm-svn: 313332
* Wire up the breakpoint name help string.Jim Ingham2017-09-157-12/+69
| | | | llvm-svn: 313327
* Mention breakpoint names in the tutorial.Jim Ingham2017-09-141-3/+64
| | | | llvm-svn: 313305
* Remove BreakpointName.h from all targets so it doesn't Jim Ingham2017-09-141-2/+0
| | | | | | get included in headermaps or put in a CopyFiles phase. llvm-svn: 313296
* Add new files to the cmake lists.Jim Ingham2017-09-142-0/+3
| | | | llvm-svn: 313293
* Make breakpoint names real entities.Jim Ingham2017-09-1450-607/+2744
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When introduced, breakpoint names were just tags that you could apply to breakpoints that would allow you to refer to a breakpoint when you couldn't capture the ID, or to refer to a collection of breakpoints. This change makes the names independent holders of breakpoint options that you can then apply to breakpoints when you add the name to the breakpoint. It adds the "breakpoint name configure" command to set up or reconfigure breakpoint names. There is also full support for then in the SB API, including a new SBBreakpointName class. The connection between the name and the breakpoints sharing the name remains live, so if you reconfigure the name, all the breakpoint options all change as well. This allows a quick way to share complex breakpoint behavior among a bunch of breakpoints, and a convenient way to iterate on the set. You can also create a name from a breakpoint, allowing a quick way to copy options from one breakpoint to another. I also added the ability to make hidden and delete/disable protected names. When applied to a breakpoint, you will only be able to list, delete or disable that breakpoint if you refer to it explicitly by ID. This feature will allow GUI's that need to use breakpoints for their own purposes to keep their breakpoints from getting accidentally disabled or deleted. <rdar://problem/22094452> llvm-svn: 313292
* [lit] Force site configs to be run before source-tree configsZachary Turner2017-09-142-101/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch simplifies LLVM's lit infrastructure by enforcing an ordering that a site config is always run before a source-tree config. A significant amount of the complexity from lit config files arises from the fact that inside of a source-tree config file, we don't yet know if the site config has been run. However it is *always* required to run a site config first, because it passes various variables down through CMake that the main config depends on. As a result, every config file has to do a bunch of magic to try to reverse-engineer the location of the site config file if they detect (heuristically) that the site config file has not yet been run. This patch solves the problem by emitting a mapping from source tree config file to binary tree site config file in llvm-lit.py. Then, during discovery when we find a config file, we check to see if we have a target mapping for it, and if so we use that instead. This mechanism is generic enough that it does not affect external users of lit. They will just not have a config mapping defined, and everything will work as normal. On the other hand, for us it allows us to make many simplifications: * We are guaranteed that a site config will be executed first * Inside of a main config, we no longer have to assume that attributes might not be present and use getattr everywhere. * We no longer have to pass parameters such as --param llvm_site_config=<path> on the command line. * It is future-proof, meaning you don't have to edit llvm-lit.in to add support for new projects. * All of the duplicated logic of trying various fallback mechanisms of finding a site config from the main config are now gone. One potentially noteworthy thing that was required to implement this change is that whereas the ninja check targets previously used the first method to spawn lit, they now use the second. In particular, you can no longer run lit.py against the source tree while specifying the various `foo_site_config=<path>` parameters. Instead, you need to run llvm-lit.py. Differential Revision: https://reviews.llvm.org/D37756 llvm-svn: 313270
* Remove uses of std::auto_ptr, it's going away in C++17.Benjamin Kramer2017-09-145-14/+5
| | | | | | | std::unique_ptr is pretty much a drop-in replacement here. Also remove nullptr checks that are doing nothing. llvm-svn: 313265
* Commands are -d to break modify, not -C.Jim Ingham2017-09-141-1/+1
| | | | | | | | The auto-continue test was using the new (better) name for providing commands (-C) but I haven't checked in that change yet. Put the test back to the old way for now. llvm-svn: 313221
* Forgot to svn add the test cases for breakpoint auto-continue flag.Jim Ingham2017-09-133-0/+129
| | | | | | Adding that now. llvm-svn: 313216
* Fix for bug 34532 - A few rough corners related to post-mortem debugging ↵Adrian McCarthy2017-09-136-6/+91
| | | | | | | | | | | | | | | | | | (core/minidump) The main change is to avoid setting the process state as running when debugging core/minidumps (details in the bug). Also included a few small, related fixes around how the errors propagate in this case. patch by lemo Bug: https://bugs.llvm.org/show_bug.cgi?id=34532 Differential Revision: https://reviews.llvm.org/D37651 llvm-svn: 313210
* [unittests] Another speculative fix for changes introduced in rL313156Vedant Kumar2017-09-131-1/+2
| | | | llvm-svn: 313183
* [unittests] Speculative fix for changes introduced in rL313156Vedant Kumar2017-09-131-1/+3
| | | | llvm-svn: 313181
* Fix test_attach_to_process_from_different_dir_by_id test on WindowsEugene Zemtsov2017-09-131-3/+6
| | | | | | | On Windows a process can't delete its own current direcotry, that's why the test needs to return to the original direcotry before removing newdir. llvm-svn: 313113
* [lldb] Adjust UpdateExternalModuleListIfNeeded method for the case of *.dwoAlexander Shaposhnikov2017-09-121-1/+23
| | | | | | | | | | | | | | | | | | | | | | | When LLDB loads "external" modules it looks at the presence of DW_AT_GNU_dwo_name. However, when the already created module (corresponding to .dwo itself) is being processed, it will see the presence of DW_AT_GNU_dwo_name (which contains the name of dwo file) and will try to call ModuleList::GetSharedModule again. In some cases (i.e. for empty files) Clang 4.0 generates a *.dwo file which has DW_AT_GNU_dwo_name, but no DW_AT_comp_dir. In this case the method ModuleList::GetSharedModule will fail and the warning will be printed. To workaround this issue, one can notice that in this case we don't actually need to try to load the already loaded module (corresponding to .dwo). Test plan: make check-all Differential revision: https://reviews.llvm.org/D37295 llvm-svn: 313083
* Plugins: fix resolution ambiguity in PDB pluginSaleem Abdulrasool2017-09-091-22/+24
| | | | | | | | | A clang change caused the inclusion of `llvm::Type` and `lldb_private::Type` to be pulled into the global namespace due to the `using namespace llvm;` and `using namespace lldb_private;`. Explicitly qualify the `Type` to resolve the ambiguity. NFC llvm-svn: 312841
* Fix for bug 34510 - Minidump target does not resolve new symbols correctlyAdrian McCarthy2017-09-072-4/+0
| | | | | | | | | | | | | | | | Even though the content of the minidump does not change in a debugging session, frames can't be indiscriminately be cached since modules and symbols can be explicitly added after the minidump is loaded. The fix is simple, just let the base Thread::ClearStackFrames() do its job. submitted by amccarth on behalf of lemo Bug: https://bugs.llvm.org/show_bug.cgi?id=34510 Differential Revision: https://reviews.llvm.org/D37527 llvm-svn: 312735
* Fix lldb-mi test data_read_memory_bytes_globalTed Woodward2017-09-072-4/+4
| | | | | | | | | | | | | | | | | | | | Summary: Test was skipped because -data-evaluate-expression was thought to not work on globals. This is not the case - the issue was clang removes debug info for globals in cpp files that are not used. Add a reference to the globals in question, and fix memory patter in test to match memory pattern in testcase. Reviewers: ki.stfu, abidh Reviewed By: ki.stfu Subscribers: aprantl, lldb-commits Differential Revision: https://reviews.llvm.org/D37533 llvm-svn: 312726
* [CMake] Need to set WITH_LOCKDOWN on debugserver targetChris Bieneman2017-09-062-0/+24
| | | | | | | | | | Turns out WITH_LOCKDOWN define changes the struct layout and constructor implementation for RNBSocket which is used in debugserver.cpp, so we need to make sure this is consistent. In the future we should change WITH_LOCKDOWN to be configured in a generated header, but for now we can just set it correctly. <rdar://problem/33900552> llvm-svn: 312666
* Fix DW_FORM_strp parsingJan Kratochvil2017-09-051-4/+4
| | | | | | Differential revision: https://reviews.llvm.org/D37441 llvm-svn: 312562
* [ABI] Rewrite RegisterIsCalleeSaved.Davide Italiano2017-09-041-46/+11
| | | | | | | | | | | | | | | | | | The goal of this patch is twofold: First, it removes a wrong comment (at least, not correctly describing what the function does). Then, it rewrites the function to use a StringSwitch where the registers are enumerated explicitly instead of being computed programmatically. Other than being much shorter, it's much easier to read (and given the ABI won't change anytime soon, I don't think there's need to generalize). While here, I added an assert that the register name is always empty, as the previous implementation of the function assumed so. Differential Revision: https://reviews.llvm.org/D37420 llvm-svn: 312501
* [UUID] Reimplement comparison operators more canonically. NFCI.Davide Italiano2017-09-031-8/+4
| | | | llvm-svn: 312457
* [Interpreter] Simplify else after return. NFCI.Davide Italiano2017-09-031-3/+2
| | | | llvm-svn: 312454
* [Core/Value] Remove dead code that hasn't been touched in years. NFC.Davide Italiano2017-09-031-25/+0
| | | | llvm-svn: 312453
* Add test case for attach-by-pid from different cwdEd Maste2017-09-031-0/+24
| | | | | | | | | This was failing on FreeBSD prior to r312430. Patch by Vignesh Balu. Differential Revision: https://reviews.llvm.org/D32522 llvm-svn: 312431
* FreeBSD: attach to pid from different cwdEd Maste2017-09-031-1/+8
| | | | | | | | | | | | attach by pid worked when running from the directory from which the target was launched, but failed from a different directory. Use the kern.proc.pathname sysctl to locate the target, falling back to the original case of the target's argv[0] if that fails. Based on a patch from Vignesh Balu. Differential Revision: https://reviews.llvm.org/D32271 llvm-svn: 312430
* lldb-mi: -var-update can hang when traversing complex types with pointersTed Woodward2017-08-311-7/+7
| | | | | | | | | | | | | | | | | | | Summary: -var-update calls CMICmdCmdVarUpdate::ExamineSBValueForChange to check if a varObj has been updated. It checks that the varObj is updated, then recurses on all of its children. If a child is a pointer pointing back to a parent node, this will result in an infinite loop, and lldb-mi hanging. The problem is exposed by packages/Python/lldbsuite/test/tools/lldb-mi/variable/TestMiVar.py, but this test is skipped everywhere. This patch changes ExamineSBValueForChange to not traverse children of varObjs that are pointers. Reviewers: ki.stfu, zturner, clayborg, abidh Reviewed By: clayborg Subscribers: lldb-commits Differential Revision: https://reviews.llvm.org/D37154 llvm-svn: 312270
* [TypeSystem] Reduce code duplication merging two almost identical functions.Davide Italiano2017-08-311-14/+9
| | | | llvm-svn: 312267
* Now a ppc64le binary is correctly detected:Eugene Zemtsov2017-08-302-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (lldb) target create "tst" Current executable set to 'tst' (powerpc64le). (lldb) disassemble -n main tst`main: tst[0x7b0] <+0>: addis 2, 12, 2 tst[0x7b4] <+4>: addi 2, 2, 30544 tst[0x7b8] <+8>: mflr 0 Wihout the patch, the endianess was incorrect: (lldb) target create "tst" Current executable set to 'tst' (powerpc64). (lldb) disassemble -n main tst`main: tst[0x7b0] <+0>: .long 0x02004c3c ; unknown opcode tst[0x7b4] <+4>: rlwimi 23, 3, 8, 8, 28 tst[0x7b8] <+8>: lhzu 16, 2172(2) tst[0x7bc] <+12>: .long 0x100001f8 ; unknown opcode Simple binary used is identified as: $ file tst tst: ELF 64-bit LSB shared object, 64-bit PowerPC or cisco 7500, version 1 (SYSV), dynamically linked, interpreter /lib64/ld64.so.2, for GNU/Linux 3.2.0, BuildID[sha1]=17a8fa2b24ce2837ba6625fabb34e6b29c6c5db7, not stripped Patch by Gustavo Serra Scalet <gustavo.scalet@eldorado.org.br> Differential Revision: https://reviews.llvm.org/D36804 llvm-svn: 312151
* [IPv6] Fix a bug in the IPv6 listen behaviorChris Bieneman2017-08-292-3/+19
| | | | | | | | | | The socket bind address should either be localhost or anyaddress. This bug in the listen behavior was preventing lldb-server from opening sockets for non-localhost connections. The added test verifies that opening an anyaddress socket works and has a non-zero port assignment. This should resolve PR34183. llvm-svn: 312008
* update xpc service name.Jason Molenda2017-08-291-1/+1
| | | | llvm-svn: 311978
* Add the DWARF DWP files to the Xcode project.Jim Ingham2017-08-251-2/+14
| | | | llvm-svn: 311786
OpenPOWER on IntegriCloud