summaryrefslogtreecommitdiffstats
path: root/lldb
Commit message (Collapse)AuthorAgeFilesLines
* Revert "Improve the handling of missing elf symtab and missing symbol sizes"Tamas Berghammer2016-02-1010-151/+145
| | | | | | | | This reverts commit 252dda67782f2cbf838e375bce21ed4191f6d9ce. The commit caused several test failure on the OSX build bot. llvm-svn: 260377
* [RenderScript] Refactor allocation expressions Ewan Crawford2016-02-101-77/+85
| | | | | | | Patch refractors RS plugin code specifying how format strings are used to JIT the runtime. Author: Dean De Leo <dean@codeplay.com> llvm-svn: 260372
* Improve the handling of missing elf symtab and missing symbol sizesTamas Berghammer2016-02-1010-145/+151
| | | | | | | | | | | | * Generate artificial symbol names from eh_fame during symbol parsing so these symbols are already present when we calcualte the size of the symbols where 0 is specified. * Fix symbol size calculation for the last symbol in the file where it have to last until the end of the parent section. Differential revision: http://reviews.llvm.org/D16996 llvm-svn: 260369
* Fix handling of the arm IT instruction in the unwinderTamas Berghammer2016-02-106-64/+101
| | | | | | | | | | | | | | | | | | | | | | | | | The IT instruction can specify condition code for up to 4 consecutive instruction and it is used quite often by clang in epilogues causing an issue when trying to unwind from locations covered by the IT instruction and for locatins inmediately after the IT instruction. Changes made to fix it: * Introduce the concept of conditional instruction block what is a list of consecutive instructions with the same condition. We update the unwind information during the conditional instruction block and when we reach the end of it (first instruction with a differemt condition) then we restore the unwind information we had before the condition. * Fix a bug in the ARM instruction emulator where neither PC nor the ITSTATE was advanced when we reached an instruction what we can't decode. After the change we have no regression on android-arm running the regular test suit and TestStandardUnwind also passes when running it with clang as the compiler (previously it failed on an IT instruction). Differential revision: http://reviews.llvm.org/D16814 llvm-svn: 260368
* Use BKPT instead of UDF for arm/thumb breakpointsTamas Berghammer2016-02-102-10/+8
| | | | | | | | | The UDF instruction is deprecated in armv7 and in case of thumb2 instructions set it don't work well together with the IT instruction. Differential revision: http://reviews.llvm.org/D16853 llvm-svn: 260367
* Add new option to lldb-server to display its versionTamas Berghammer2016-02-101-15/+21
| | | | llvm-svn: 260366
* [LLDB][MIPS] Generalise MIPS arch namesMohit K. Bhakkad2016-02-103-3/+3
| | | | | | | | | | Patch by Nitesh Jain Reviewers: clayborg, jaydeep. Subscribers: zturner, bhushan, mohit.bhakkad, sagar, lldb-commits. Differential Revision: http://reviews.llvm.org/D16840 llvm-svn: 260362
* This is an idea to make "thread step-in --target" work for the commonJim Ingham2016-02-101-2/+85
| | | | | | | | | | | | | | | | | | | | | | | | | case where you have: 1 -> foo (bar(), 2 baz(), 3 lala()); 4 You are sitting on line 1, and want to step into foo, but not bar, baz & lala. Unfortunately there are line table entries for lines 1-3, and lldb doesn't know anything about the nesting of statement in these lines. So we'll have to use the user's intelligence... This patch adds: (lldb) thread step-in -t foo --end-line 4 That tells lldb to keep stepping in till line 4, but stop if you step into foo. I think I would remember to use this when faced with some of the long gnarly call sequences in lldb. But there might be ways I haven't thought of to make it more convenient. Jason suggests having "end" as a special token for --end-line which just means keep going to the end of the function, I really want to get into this thing... There should be an SB API and tests, which will come if this seems useful. llvm-svn: 260352
* Change lldb.value.__int__() so that it takes into account the signedness of ↵Enrico Granata2016-02-103-3/+61
| | | | | | | | | | the value being cast to return a Python number with the proper value The explicit APIs on SBValue obviously remain if one wants to be explicit in intent, or override this guess, but since __int__() has to pick one, an educated guess is definitely better than than always going to signed regardless Fixes rdar://24556976 llvm-svn: 260349
* Add a missing break.Jim Ingham2016-02-101-1/+1
| | | | llvm-svn: 260345
* Don't dereference the first element of an empty container.Adrian McCarthy2016-02-101-1/+1
| | | | llvm-svn: 260331
* Remove FreeBSD failure decorator from TestCppIncompleteTypesEd Maste2016-02-101-1/+0
| | | | | | | | | | CFLAGS is now being set correctly to pass -flimit-debug-info or -fno-limit-debug-info on FreeBSD. I'm not sure which change is responsible for the fix, though. llvm.org/pr25626 llvm-svn: 260330
* Add status for LLDB on Windows to status.html.Adrian McCarthy2016-02-091-10/+28
| | | | | | Differential Revision: http://reviews.llvm.org/D16902 llvm-svn: 260328
* Change `CoreTests` to LLDBCoreTests to avoid name clash.Zachary Turner2016-02-091-1/+1
| | | | | | | lld was already using a target named CoreTests so CMake was erroring due to this conflict. llvm-svn: 260326
* Added code that was commented out during testing to stops template member ↵Greg Clayton2016-02-091-5/+5
| | | | | | | | | functions from being added to class definitions (see revision 260308 for details). <rdar://problem/24483905> <rdar://problem/24508374> llvm-svn: 260322
* Fixed many issues that were causing differing type definition issues to show ↵Greg Clayton2016-02-093-32/+47
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | up when parsing expressions. 1) Turns out we weren't correctly uniquing types for C++. We would search our repository for "lldb_private::Process", but yet store just "Process" in the unique type map. Now we store things correctly and correctly unique types. 2) SymbolFileDWARF::CompleteType() can be called at any time in order to complete a C++ or Objective C class. All public inquiries into the SymbolFile go through SymbolVendor, and SymbolVendor correctly takes the module lock before it call the SymbolFile API call, but when we let CompilerType objects out in the wild, they can complete themselves at any time from the expression parser, so the ValueObjects or (SBValue objects in the public API), and many more places. So we now take the module lock when completing a type to avoid two threads being in the SymbolFileDWARF at the same time. 3) If a class has a template member function like: class A { <template T> void Foo(T t); }; The DWARF will _only_ contain a DW_TAG_subprogram for "Foo" if anyone specialized it. This would cause a class definition for A inside a.cpp that used a "int" and "float" overload to look like: class A { void Foo(int t); void Foo(double t); }; And a version from b.cpp that used a "float" overload to look like: class A { void Foo(float t); }; And a version from c.cpp that use no overloads to look like: class A { }; Then in an expression if you have two variables, one name "a" from a.cpp in liba.dylib, and one named "b" from b.cpp in libb.dylib, you will get conflicting definitions for "A" and your expression will fail. This all stems from the fact that DWARF _only_ emits template specializations, not generic definitions, and they are only emitted if they are used. There are two solutions to this: a) When ever you run into ANY class, you must say "just because this class doesn't have templatized member functions, it doesn't mean that any other instances might not have any, so when ever I run into ANY class, I must parse all compile units and parse all instances of class "A" just in case it has member functions that are templatized.". That is really bad because it means you always pull in ALL DWARF that contains most likely exact duplicate definitions of the class "A" and you bloat the memory that the SymbolFileDWARF plug-in uses in LLDB (since you pull in all DIEs from all compile units that contain a "A" definition) uses for little value most of the time. b) Modify DWARF to emit generic template member function definitions so that you know from looking at any instance of class "A" wether it has template member functions or not. In order to do this, we would have to have the ability to correctly parse a member function template, but there is a compiler bug: <rdar://problem/24515533> [PR 26553] C++ Debug info should reference DW_TAG_template_type_parameter This bugs means that not all of the info needed to correctly make a template member function is in the DWARF. The main source of the problem is if we have DWARF for a template instantiation for "int" like: "void A::Foo<int>(T)" the DWARF comes out as "void A::Foo<int>(int)" (it doesn't mention type "T", it resolves the type to the specialized type to "int"). But if you actually have your function defined as "<template T> void Foo(int t)" and you only use T for local variables inside the function call, we can't correctly make the function prototype up in the clang::ASTContext. So the best we can do for now we just omit all member functions that are templatized from the class definition so that "A" never has any template member functions. This means all defintions of "A" look like: class A { }; And our expressions will work. You won't be able to call template member fucntions in expressions (not a regression, we weren't able to do this before) and if you are stopped in a templatized member function, we won't know that are are in a method of class "A". All things we should fix, but we need <rdar://problem/24515533> fixed first, followed by: <rdar://problem/24515624> Classes should always include a template subprogram definition, even when no template member functions are used before we can do anything about it in LLDB. This bug mainly fixed the following Apple radar: <rdar://problem/24483905> llvm-svn: 260308
* Don't complete a class type just to test if it is a class. Code in ↵Greg Clayton2016-02-091-2/+2
| | | | | | CompilerType and in clang::QualType knows how to complete a type if it needs to. llvm-svn: 260299
* Fix incorrect usage of `str` in _match_decorator_property.Zachary Turner2016-02-091-1/+1
| | | | llvm-svn: 260292
* Remove skipIf<compiler> decorators.Zachary Turner2016-02-0915-25/+16
| | | | | | | These were supposed to have been removed in a previous patch, but I missed them. llvm-svn: 260291
* Remove decorators related to debug info types.Zachary Turner2016-02-096-31/+6
| | | | | | All existing usages were ported over to the common decorators. llvm-svn: 260290
* Delete all the xfail / skip decorators for specific compilers.Zachary Turner2016-02-0922-43/+26
| | | | | | Ported everything over to using expectedFailureAll. llvm-svn: 260289
* Remove expected failure and skip decorators for host os.Zachary Turner2016-02-098-44/+38
| | | | | | | All decorator invocations are updated to use the generic expectedFailureAll and skipIf decorators. llvm-svn: 260288
* If we set the DYLD_INSERT_LIBRARIES environment variable when launching ↵Greg Clayton2016-02-091-0/+4
| | | | | | debugserver, for use with /usr/lib/libgmalloc.dylib, then make sure we don't pass this environment variable on to any child processes. llvm-svn: 260284
* Don't enable -flimit-debug-info by default for the LLDB Xcode builds. This ↵Greg Clayton2016-02-091-24/+0
| | | | | | was put in back in 2011 when -flimit-debug-info did a lot less than it does now. With llvm-dsymutil doing ODR type unique stuff we still have reasonably sized dSYM files. llvm-svn: 260282
* Mention the --all-files option in the -p help string.Jim Ingham2016-02-091-1/+2
| | | | llvm-svn: 260247
* Fix invalid shift operator overload in ScalarPavel Labath2016-02-094-1/+37
| | | | | | | | | | | | | | Summary: This also fixes an infinite recursion between lldb_private::operator>> () and Scalar::operator>>= (). Reviewers: sagar, tberghammer, labath Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D16868 Patch by Marianne Mailhot-Sarrasin llvm-svn: 260239
* Fix a typo in an xfail decorator in TestExprsCharTamas Berghammer2016-02-091-1/+1
| | | | llvm-svn: 260216
* Fix an issue where pressing CTRL+C in the interactive script interpreter ↵Enrico Granata2016-02-091-1/+1
| | | | | | | | | | | | causes LLDB to crash This is because PyThreadState_Get() assumes a non-NULL thread state and crashes otherwise; but PyThreadState_GET is just a shortcut (in non-Python-debugging builds) for the global variable that holds the thread state The behavior of CTRL+C is slightly more erratic than one would like. CTRL+C in the middle of execution of Python code will cause that execution to be interrupted (e.g. time.sleep(1000)), but a CTRL+C at the prompt will just cause a KeyboardInterrupt and not exit the interpreter - worse, it will only trigger the exception once one presses ENTER. None of this is optimal, of course, but I don't have a lot of time to appease the Python deities with the proper spells right now, and fixing the crasher is already a good thing in and of itself llvm-svn: 260199
* [TestExprsChar] Fix a typo is failure archs listSiva Chandra2016-02-091-1/+1
| | | | | | | | | | Reviewers: zturner Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D17014 llvm-svn: 260192
* Remove skip and xfail decorators for target architecture.Zachary Turner2016-02-099-25/+10
| | | | | | | | | | | | | | | | This removes the following decorators: * skipIfI386 * expectedFailureI386 * expectedFailurex86_64 * skipIfArch * skipUnlessArch * skipUnlessI386 And other related decorators. All code using those decorators is updated to use expectedFailureAll and skipIf llvm-svn: 260178
* Remove skipIfHostPlatform and skipUnlessHostPlatform decorators.Zachary Turner2016-02-093-20/+4
| | | | llvm-svn: 260177
* Remove the skipUnlessArch decorator.Zachary Turner2016-02-093-35/+8
| | | | | | Convert everything over to using skipIf. llvm-svn: 260176
* A number of improvements to decorator conditionals.Zachary Turner2016-02-084-28/+30
| | | | | | | | | | | | | | | | | | | * Change the `not_in` function to be called `no_match`. This makes it clear that keyword arguments can be more than just lists. * Change the name of `_check_list_or_lambda` to `_match_decorator_property`. Again clarifying that decorator params are not always lists. * Always use a regex match when matching strings. This allows automatic support for regex matching on all decorator properties. Also support compiled regex values. * Fix a bug in the compiler check used by _decorateTest. The two arguments were reversed, the condition was always wrong. * Change one test that uses skipUnlessArch to use skipIf, to demonstrate that skipIf can now handle more scenarios. Differential Revision: http://reviews.llvm.org/D16938 llvm-svn: 260135
* Remove expectedFailureWindows decorator.Zachary Turner2016-02-08117-193/+181
| | | | | | | | | | | | | | | expectedFailureWindows is equivalent to using the general expectedFailureAll decorator with oslist="windows". Additionally, by moving towards these common decorators we can solve the issue of having to support decorators that can be called with or without arguments. Once all decorators are always called with arguments, and this is enforced by design (because you can't specify the condition you're decorating for without passing an argument) the implementation of the decorators can become much simpler Differential Revision: http://reviews.llvm.org/D16936 llvm-svn: 260134
* Show real error message in -data-evaluate-expressionEugene Leviant2016-02-083-4/+9
| | | | llvm-svn: 260082
* Revert "Enable test_lldbmi_settings_set_target_run_args_before on linux"Pavel Labath2016-02-081-0/+1
| | | | | | Test is still flaky. llvm-svn: 260081
* Have lldb-server log the timestamp in its log messagesPavel Labath2016-02-081-1/+1
| | | | llvm-svn: 260078
* [LLDB][MIPS] Fix TestExpressionInSyscall.py for MIPSBhushan D. Attarde2016-02-082-4/+26
| | | | | | | | | | | | SUMMARY: This patch fixes TestExpressionInSyscall.py and solves bug 23659 for MIPS. Corrected indentation at couple of places. Reviewers: clayborg Subscribers: mohit.bhakkad, sagar, jaydeep, lldb-commits Differential Revision: http://reviews.llvm.org/D16916 llvm-svn: 260072
* ProcessMachCore scans through the core file pages looking for aJason Molenda2016-02-063-49/+57
| | | | | | | | | | | | | | | | | | | | user process dyld binary and/or a mach kernel binary image. By default, it prefers the kernel if it finds both. But if it finds two kernel binary images (which can happen when random things are mapped into memory), it may pick the wrong kernel image. DynamicLoaderDarwinKernel has heuristics to find a kernel in memory; once we've established that there is a kernel binary in memory, call over to that class to see if it can find a kernel address via its search methods. If it does, use that. Some minor cleanups to DynamicLoaderDarwinKernel while I was at it. <rdar://problem/24446112> llvm-svn: 259983
* Per Jim's suggestion, move checks that we're not mixing and matching ↵Enrico Granata2016-02-063-2/+12
| | | | | | | | Debuggers and Commands deeper in the bowels of LLDB NFC llvm-svn: 259972
* Fix an issue where certain CommandObjects (or Options thereof) were being ↵Enrico Granata2016-02-065-29/+79
| | | | | | | | | | created once, bound to a specific CommandInterpreter (and hence a specific Debugger), and then cached for reuse across different Debugger instances Obviously, if the original Debugger goes away, those commands are holding on to now stale memory, which has the potential to cause crashes Fixes rdar://24460882 llvm-svn: 259964
* Fix "thread backtrace -s": option was misparsed because of a missing break.Jim Ingham2016-02-061-0/+1
| | | | | | <rdar://problem/24525106> llvm-svn: 259962
* Take 2: Use an artifical namespace so that member vars do not hide local vars.Siva Chandra2016-02-0512-13/+409
| | | | | | | | | | | | Summary: This relands r259810 with fix for failures on Mac. Reviewers: spyffe, tfiala Subscribers: tfiala, lldb-commits Differential Revision: http://reviews.llvm.org/D16900 llvm-svn: 259902
* Add support to detect arm hard float ABI based binaries for ABISysV_armOmair Javaid2016-02-054-7/+63
| | | | | | | | This patch adds logic to detect if underlying binary is using arm hard float abi and use that information while handling return values in ABISysV_arm. Differential revision: http://reviews.llvm.org/D16627 llvm-svn: 259885
* Bump up the packet timeout for gdbremote testsPavel Labath2016-02-051-1/+1
| | | | | | | Log confirmed that the we are sometimes timing out on the receive, even though the server is sending the correct packets. llvm-svn: 259878
* Add two more addresses to check for the address of the kernel in debug mode;Jason Molenda2016-02-051-0/+16
| | | | | | | also add some logging about where lldb is lookin for a kernel as it connects. <rdar://problem/24454582> llvm-svn: 259865
* Add a little logging to ProcessMachCore so it is easier to tell when a user ↵Jason Molenda2016-02-041-3/+16
| | | | | | | | | | process dyld or mach kernel binary are found, and if there are multiples of them found within a single corefile. <rdar://problem/24446112> llvm-svn: 259850
* Fix the search path for CMake filesNiels Ole Salscheider2016-02-041-4/+4
| | | | | | | This allows to find the LLVM's CMake files after moving them in r259821. llvm-svn: 259845
* Move the rest of the tests over to using the new decorator module.Zachary Turner2016-02-04343-803/+1246
| | | | llvm-svn: 259838
* Replace tabs with spaces for consistent indentation. No actual text changes.Adrian McCarthy2016-02-041-189/+189
| | | | llvm-svn: 259834
OpenPOWER on IntegriCloud