summaryrefslogtreecommitdiffstats
path: root/lldb
Commit message (Collapse)AuthorAgeFilesLines
* lldb: move a test input to the test Inputs dirKrasimir Georgiev2019-09-172-1/+3
| | | | | | | | | | Summary: This makes the input file for a new test added in r372060 directly available in the Inputs subdirectory of the test dir. Differential Revision: https://reviews.llvm.org/D67655 llvm-svn: 372112
* [lldb] [Process/gdb-remote] Fix defaulting signal to invalid in action listMichal Gorny2019-09-171-2/+3
| | | | | | | | | | Fix processing of "C" packet with signal for the whole process to default signal value for action list to LLDB_INVALID_SIGNAL_NUMBER rather than 0. Differential Revision: https://reviews.llvm.org/D67625 llvm-svn: 372090
* Reland "[lldb][NFC] Make ApplyObjcCastHack less scary"Raphael Isemann2019-09-171-9/+5
| | | | | | First version had a typo. llvm-svn: 372077
* [test] Disable reproducer dump test on WindowsJonas Devlieghere2019-09-171-0/+1
| | | | llvm-svn: 372064
* [ScriptInterpreter] Initialize globals when loading a scripting module.Jonas Devlieghere2019-09-173-6/+16
| | | | | | | | | | | | | The LoadScriptingModule used by command script import wasn't initializing the LLDB global variables (things like `lldb.frame` and `lldb.debugger`). They would get initialized however when running the interactive script interpreter or running a single script line (e.g. `script print(lldb.frame)`). This patch fixes that by properly initializing the globals when loading a Python module. Differential revision: https://reviews.llvm.org/D67644 llvm-svn: 372060
* Revert "[lldb][NFC] Make ApplyObjcCastHack less scary"Jim Ingham2019-09-171-5/+9
| | | | | | | | | | | | | | This reverts commit 21641a2f6dbac22653befd03496e0850537882ff. It was causing the following test failures: lldb-Suite.lang/objc/objc-class-method.TestObjCClassMethod.py lldb-Suite.lang/objc/foundation.TestObjCMethodsString.py lldb-Suite.lang/objc/foundation.TestConstStrings.py lldb-Suite.lang/objc/radar-9691614.TestObjCMethodReturningBOOL.py lldb-Suite.lang/objc/foundation.TestObjCMethodsNSArray.py llvm-svn: 372057
* [test] Fail gracefully if the regex doesn't matchJonas Devlieghere2019-09-161-6/+11
| | | | | | | | This test is failing on the Fedora bot (staging). Rather than failing with an IndexError, we should trigger an assert and dump the log when the regex doesn't match. llvm-svn: 372052
* Fix swig python package pathHaibo Huang2019-09-161-4/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: The path defined in CMakeLists.txt doesn't match the path generated in our python script. This change fixes that. LLVM_LIBRARY_OUTPUT_INTDIR is defined as: ${CMAKE_BINARY_DIR}/${CMAKE_CFG_INTDIR}/lib${LLVM_LIBDIR_SUFFIX}) On the other hand, the path of site-package is generaged in get_framework_python_dir_windows() in finishSwigPythonLLDB.py as: (Dispite its name, the function is used for everything other than xcode) prefix/cmakeBuildConfiguration/distutils.sysconfig.get_python_lib() From lldb/CMakeLists.txt, we can see that: prefix=${CMAKE_BINARY_DIR}, cmakeBuildConfiguration=${CMAKE_CFG_INTDIR} And from python source code, we can see get_python_lib() always returns lib/pythonx.y/site-packages for posix, or Lib/site-packages for windows: https://github.com/python/cpython/blob/3.8/Lib/distutils/sysconfig.py#L128 We should make them match each other. Subscribers: mgorny, lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D67583 llvm-svn: 372047
* [Reproducer] Implement dumping packets.Jonas Devlieghere2019-09-162-3/+25
| | | | | | | | | This patch completes the dump functionality by adding support for dumping a reproducer's GDB remote packets. Differential revision: https://reviews.llvm.org/D67636 llvm-svn: 372046
* Fix warning: lambda capture 'temp_file_path' is not usedJonas Devlieghere2019-09-161-2/+1
| | | | llvm-svn: 372044
* [NFC] Move dumping into GDBRemotePacketJonas Devlieghere2019-09-163-5/+23
| | | | | | | | This moves the dumping logic from the GDBRemoteCommunicationHistory class into the GDBRemotePacket so that it can be reused from the reproducer command object. llvm-svn: 372028
* [lldb] Remove SetCount/ClearCount from FlagsRaphael Isemann2019-09-162-64/+3
| | | | | | | | | | | | | | | | | | Summary: These functions are only used in tests where we should test the actual flag values instead of counting all bits for an approximate check. Also these popcount implementation aren't very efficient and doesn't seem to be optimised to anything fast. Reviewers: davide, JDevlieghere Reviewed By: davide, JDevlieghere Subscribers: abidh, JDevlieghere, lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D67540 llvm-svn: 372018
* [lldb][NFC] Make ApplyObjcCastHack less scaryRaphael Isemann2019-09-161-9/+5
| | | | llvm-svn: 372017
* [test] Add -z separate-code to fix tests that ae sensitive to exact ↵Fangrui Song2019-09-166-6/+6
| | | | | | addresses after r371958 llvm-svn: 371962
* [lldb] Code cleanup: FormattersContainer.h: Use range-based for loops.Jan Kratochvil2019-09-141-12/+9
| | | | | | | Suggested for an other loop by Pavel Labath in: https://reviews.llvm.org/D66654#inline-605808 llvm-svn: 371922
* [Reproducer] Add reproducer dump command.Jonas Devlieghere2019-09-134-2/+266
| | | | | | | | | | | This adds a reproducer dump commands which makes it possible to inspect a reproducer from inside LLDB. Currently it supports the Files, Commands and Version providers. I'm planning to add support for the GDB Remote provider in a follow-up patch. Differential revision: https://reviews.llvm.org/D67474 llvm-svn: 371909
* [Reproducer] Move GDB Remote Packet into Utility. (NFC)Jonas Devlieghere2019-09-1317-246/+237
| | | | | | | | | | | | | | To support dumping the reproducer's GDB remote packets, we need the (de)serialization logic to live in Utility rather than the GDB remote plugin. This patch renames StreamGDBRemote to GDBRemote and moves the relevant packet code there. Its uses in the GDBRemoteCommunicationHistory and the GDBRemoteCommunicationReplayServer are updated as well. Differential revision: https://reviews.llvm.org/D67523 llvm-svn: 371907
* [test] Update TestAPILog to pass on Windows.Jonas Devlieghere2019-09-131-2/+2
| | | | | | | The pretty function macro is including __cdecl on Windows, which was causing the pattern matching to fail. This should fix that. llvm-svn: 371905
* [LLDB] Add missing breaks for switch statementTim Shen2019-09-131-0/+3
| | | | llvm-svn: 371902
* [test] Print the log output on failure.Jonas Devlieghere2019-09-131-2/+2
| | | | | | | | This ensures that if the assertion fails we dump the log content. This should help me investigate what the output looks like on Windows, where the test is failing. llvm-svn: 371899
* [Support] Add overload writeFileAtomically(std::function Writer)Jan Korous2019-09-131-22/+28
| | | | | | Differential Revision: https://reviews.llvm.org/D67424 llvm-svn: 371890
* [Reproducer] Include the this pointer in the API log.Jonas Devlieghere2019-09-132-10/+58
| | | | | | | | | | | | | | | The new centralized way of doing API logging through the reproducer macros is lacking a way to easily correlate instances of API objects. Logging the this pointer makes that significantly easier. For methods this is now always passed as the first argument, similar to the self argument in Python. This patch also adds a test case for API logging, which uncovered that we were not quoting strings. Differential revision: https://reviews.llvm.org/D67538 llvm-svn: 371885
* Fix error in ProcessLauncherWindows.cppAdrian McCarthy2019-09-131-1/+1
| | | | | | Restored missing parens on a function call. llvm-svn: 371882
* [lldb] - Update unit tests after lib/ObjectYAML change.George Rimar2019-09-132-5/+8
| | | | | | An update after r371865 llvm-svn: 371866
* [lldb][NFC] Remove ArgEntry::ref memberRaphael Isemann2019-09-1328-121/+120
| | | | | | | | | | | The StringRef should always be identical to the C string, so we might as well just create the StringRef from the C-string. This might be slightly slower until we implement the storage of ArgEntry with a string instead of a std::unique_ptr<char[]>. Until then we have to do the additional strlen on the C string to construct the StringRef. llvm-svn: 371842
* [lldb][NFC] Simplify Args::ReplaceArgumentAtIndexRaphael Isemann2019-09-131-9/+2
| | | | | | | | | This code is not on any performance critical path that would justify this shortening optimization. It also makes it possible to turn 'ref' into a function (as this is the only place where we modify this ArgEntry member). llvm-svn: 371836
* [lldb][NFC] Make ArgEntry::quote private and provide a getterRaphael Isemann2019-09-134-4/+5
| | | | llvm-svn: 371823
* For PR17164: split -fno-lax-vector-conversion into three differentRichard Smith2019-09-131-1/+1
| | | | | | | | | | | | | | | | | | | | | levels: -- none: no lax vector conversions [new GCC default] -- integer: only conversions between integer vectors [old GCC default] -- all: all conversions between same-size vectors [Clang default] For now, Clang still defaults to "all" mode, but per my proposal on cfe-dev (2019-04-10) the default will be changed to "integer" as soon as that doesn't break lots of testcases. (Eventually I'd like to change the default to "none" to match GCC and general sanity.) Following GCC's behavior, the driver flag -flax-vector-conversions is translated to -flax-vector-conversions=integer. This reinstates r371805, reverted in r371813, with an additional fix for lldb. llvm-svn: 371817
* [Target] Move InferiorCall to ProcessAlex Langford2019-09-134-66/+62
| | | | | | | | | | | | | | | | | | | Summary: InferiorCall is only ever used in Process, and it is not specific to POSIX. By moving it to Process, we can remove all dependencies on plugins from Process. Moving InferiorCall to Process seems to achieve this quite well. Additionally, the name InferiorCall is a little vague now, so we rename it something a bit more specific. Reviewers: JDevlieghere, clayborg, compnerd, labath Subscribers: lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D67472 llvm-svn: 371796
* The setUp/tearDown methods I added mssed up the test function; reorder.Jason Molenda2019-09-131-6/+7
| | | | | | Thanks to Ted Woodward for catching this one. llvm-svn: 371795
* [NFC] Sort source files in Utility/CMakeLists.txtJonas Devlieghere2019-09-121-3/+3
| | | | llvm-svn: 371784
* [lldb][NFC] Simplify makefiles also for breakpoint testsRaphael Isemann2019-09-1230-90/+30
| | | | | | | | These tests were temporarily missing when the big Makefile simplification patch landed, so this just applies the same change to these tests. llvm-svn: 371738
* [lldb] Remove duplicated breakpoint testsRaphael Isemann2019-09-129-502/+0
| | | | | | | | | | | | | | | | | After reverting the deletion of the functionalities/breakpoint tests, we now have some tests twice in the test/ folder which breaks dotest: * commands/breakpoint/basic * functionalities/breakpoint/breakpoint_command After looking over these tests, I think it makes sense to only keep the original functionalities/ folder. The commands/breakpoint/basic test are not exclusively testing the breakpoint command itself, so they shouldn't be in commands/ in the first place. Note that these folders have identical contents (beside small adjustments regarding the Makefile which landed after the restructuring). llvm-svn: 371734
* [Reproducer] Move the command loader into the reproducer (NFC)Jonas Devlieghere2019-09-113-48/+53
| | | | | | | | This just moves the CommandLoader utility into the reproducer namespace and makes it accessible outside the API layer. This is setting things up for a bigger change. llvm-svn: 371689
* [NFC] Reformat SBDebugger before making changesJonas Devlieghere2019-09-111-31/+14
| | | | llvm-svn: 371688
* [Reproducer] Move GDB Remote Provider into Reproducer (NFC)Jonas Devlieghere2019-09-113-44/+45
| | | | | | | | | | | | | | Originally the idea was for providers to be defined close to where they are used. While this helped designing the providers in such a way that they don't depend on each other, it also means that it's not possible to access them from a central place. This proved to be a problem for some providers and resulted in them living in the reproducer class. The ProcessGDBRemote provider is the last remaining exception. This patch makes things consistent and moves it into the reproducer like the other providers. llvm-svn: 371685
* [DWARF] Evaluate DW_OP_entry_valueVedant Kumar2019-09-119-8/+557
| | | | | | | | | | | | Add support for evaluating DW_OP_entry_value. This involves parsing DW_TAG_call_site_parameter and wiring the information through to the expression evaluator. rdar://54496008 Differential Revision: https://reviews.llvm.org/D67376 llvm-svn: 371668
* [Status] Add a LLDB_ERRORF macro for error reporting (similar to LLDB_LOGF)Vedant Kumar2019-09-111-0/+7
| | | | llvm-svn: 371667
* [Plugins/Process] Remove direct use of ClangASTContext from InferiorCallPOSIXAlex Langford2019-09-111-11/+21
| | | | | | | | | | | | | Summary: InferiorCallPOSIX directly grabs a ClangASTContext from the Target it has and does no error checking. I don't think these functions have a reason to know about clang specifically. Additionally, using `GetScratchTypeSystemForLanguage` forces us to do error checking since it returns an Expected. Differential Revision: https://reviews.llvm.org/D67427 llvm-svn: 371654
* Revert "[LLDB][ELF] Load both, .symtab and .dynsym sections"Konrad Kleine2019-09-116-119/+9
| | | | | | This reverts commit 3a4781bbf4f39a25562b4c61c9a9ab2483a96b41. llvm-svn: 371625
* Revert "[LLDB][ELF] Fixup for comments in D67390"Konrad Kleine2019-09-113-7/+8
| | | | | | This reverts commit 813f05915d29904878d926f9849ca3dbe78096af. llvm-svn: 371624
* [lldb][NFC] Make include directories in Clang expression parser a std::stringRaphael Isemann2019-09-114-11/+10
| | | | | | | | | We never compare these directories (where ConstString would be good) and essentially just convert this back to a normal string in the end. So we might as well just use std::string. Also makes it easier to unittest this code (which was the main motivation for this change). llvm-svn: 371623
* [lldb][NFC] Remove dead code in SBAddress::GetDescriptionRaphael Isemann2019-09-111-6/+0
| | | | llvm-svn: 371618
* [lldb][NFC] Sort files in unittests/Expression/CMakeLists.txtRaphael Isemann2019-09-111-1/+1
| | | | llvm-svn: 371614
* [LLDB][ELF] Fixup for comments in D67390Konrad Kleine2019-09-113-8/+7
| | | | llvm-svn: 371600
* [LLDB][ELF] Load both, .symtab and .dynsym sectionsKonrad Kleine2019-09-116-9/+119
| | | | | | | | | | | | | | | | | | | | | | | | | Summary: This change ensures that the .dynsym section will be parsed even when there's already is a .symtab. It is motivated because of minidebuginfo (https://sourceware.org/gdb/current/onlinedocs/gdb/MiniDebugInfo.html#MiniDebugInfo). There it says: Keep all the function symbols not already in the dynamic symbol table. That means the .symtab embedded inside the .gnu_debugdata does NOT contain the symbols from .dynsym. But in order to put a breakpoint on all symbols we need to load both. I hope this makes sense. My other patch D66791 implements support for minidebuginfo, that's why I need this change. Reviewers: labath, espindola, alexshap Subscribers: JDevlieghere, emaste, arichardson, MaskRay, lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D67390 llvm-svn: 371599
* [LLDB] Do not try to canonicalize gethostname() resultDavid Zarzycki2019-09-111-12/+1
| | | | | | | | | | | | | | | | This code is trying too hard and failing. Either the result of gethostname() is canonical or it is not. If it is not, then trying to canonicalize it is – for various reasons – a lost cause. For example, a given machine might have multiple network interfaces with multiple addresses per interface, each with a different canonical name. Separably, the result of HostInfoPosix::GetHostname() and latency thereof shouldn't depend on whether networking is up or down or what network the machine happened to be attached to at any given moment (like a laptop that travels between work and home). https://reviews.llvm.org/D67230 llvm-svn: 371596
* Ah, only skip this for embedded darwin targets.Jason Molenda2019-09-111-1/+1
| | | | llvm-svn: 371583
* Skip a test in TestProcessIO.py when running against ios devices.Jason Molenda2019-09-111-0/+1
| | | | llvm-svn: 371582
* Fix a thinko in handling the QSetLogging packet.Jim Ingham2019-09-101-3/+3
| | | | | | | The comparison against LOG_MEMORY shortcut all the LOG_MEMORY_* log channels. It has to come last. llvm-svn: 371560
OpenPOWER on IntegriCloud