summaryrefslogtreecommitdiffstats
path: root/lldb
Commit message (Collapse)AuthorAgeFilesLines
* Add CopyDiagnostic to the DiagnosticManager.Jim Ingham2017-04-192-0/+11
| | | | | | | | From Gregor Milos (gmilos@apple.com), for: https://reviews.llvm.org/D32078 llvm-svn: 300733
* [Utility/StringLexer] Remove dead code.Davide Italiano2017-04-192-6/+0
| | | | | | Differential Revision: https://reviews.llvm.org/D32148 llvm-svn: 300729
* Teach RenderScriptRuntime about changed context representation.David Gross2017-04-191-30/+39
| | | | | | | | | | | | | | | | Summary: The runtime discovers contexts through RenderScriptRuntime::Capture*() methods. These methods see the low-level context representation. However, the runtime calls APIs that require the high-level context representation. Therefore, it needs to call yet another API to find the high-level representation associated with a given low-level representation. Subscribers: lldb-commits Differential Revision: https://reviews.llvm.org/D32184 llvm-svn: 300727
* Fix TestRegisterVariables for clang/armPavel Labath2017-04-191-2/+11
| | | | | | | | Clang rejects __attribute__((regparm)) when targetting arm. The default calling convention passes arguments in registers anyway, so we can just remove them in this case. llvm-svn: 300670
* Revert yesterdays IPv6 patchesPavel Labath2017-04-1928-665/+485
| | | | | | | | | | | | | The break the linux bots (and probably any other machine which would run the test suite in a massively parallel way). The problem is that it can happen that we only successfully create an IPv6 listening socket (because the relevant IPv4 port is used by another process) and then the connecting side attempts to connect to the IPv4 port and fails. It's not very obvious how to fix this problem, so I am reverting this until we come up with a solution. llvm-svn: 300669
* [CMake] Add configure check for sys/event.hChris Bieneman2017-04-191-0/+1
| | | | | | This enables the kqueue path in MainLoop for Darwin and BSD. llvm-svn: 300654
* One more attempt and WindowsChris Bieneman2017-04-191-0/+1
| | | | | | This is the last Windows compile error, so... Hit me with your best shot. llvm-svn: 300647
* Another netbsd build failure...Chris Bieneman2017-04-191-1/+0
| | | | llvm-svn: 300640
* Buildbot wack-a-mole!Chris Bieneman2017-04-191-1/+1
| | | | | | This should fix the netbsd bot I just broke. llvm-svn: 300638
* ifdefing out the signal handling code on WindowsChris Bieneman2017-04-191-6/+17
| | | | | | | | *fingers crossed* This might fix the Window bots, but I really don't know... llvm-svn: 300636
* Define HAVE_SIGACTION to 1 in Xcode buildChris Bieneman2017-04-181-0/+2
| | | | | | This is needed to make the Xcode project build since it doesn't have auto-generated Config header. llvm-svn: 300618
* Include time.h, and fix a Darwin warningChris Bieneman2017-04-181-8/+2
| | | | | | This is a little more cleanup from r300579. llvm-svn: 300615
* Fix Windows bot failureChris Bieneman2017-04-181-1/+8
| | | | | | timespec is not available on Windows, and we should use size_t instead of nfds_t. llvm-svn: 300610
* Fixing error on Android build (-Werror)Chris Bieneman2017-04-181-2/+2
| | | | | | This is fallout from r300579. llvm-svn: 300606
* Removing unused includeChris Bieneman2017-04-181-1/+0
| | | | | | This is causing the Windows bot failures. llvm-svn: 300605
* [CMake] Adding configure-time check for sigactionChris Bieneman2017-04-183-1/+4
| | | | | | Hopefully this will fix the netbsd bot that I broke... llvm-svn: 300590
* Writing multi-platform code is hard...Chris Bieneman2017-04-181-1/+1
| | | | | | Fixing another error from r300579. llvm-svn: 300589
* Fix broken windows build.Chris Bieneman2017-04-182-1/+7
| | | | | | This is not ideal, but it should get the bot going again. I'll need to revisit this if we want to get signal handling working on Windows. llvm-svn: 300587
* Fixing bot failure caused by r300579Chris Bieneman2017-04-181-1/+1
| | | | llvm-svn: 300582
* Update DebugServer to support IPv6 over TCPChris Bieneman2017-04-185-134/+159
| | | | | | | | | | | | | | Summary: This patch adds IPv6 support to debugserver. It follows a similar pattern to the changes proposed for LLDB/Host except that the listen implementation is only with kqueue(2) because debugserver is only supported on Darwin. Reviewers: jingham, jasonmolenda, clayborg Reviewed By: clayborg Subscribers: mgorny, lldb-commits Differential Revision: https://reviews.llvm.org/D31824 llvm-svn: 300580
* Update LLDB Host to support IPv6 over TCPChris Bieneman2017-04-1824-347/+479
| | | | | | | | | | | | | | | | | | | | | Summary: This patch adds IPv6 support to LLDB/Host's TCP socket implementation. Supporting IPv6 involved a few significant changes to the implementation of the socket layers, and I have performed some significant code cleanup along the way. This patch changes the Socket constructors for all types of sockets to not create sockets until first use. This is required for IPv6 support because the socket type will vary based on the address you are connecting to. This also has the benefit of removing code that could have errors from the Socket subclass constructors (which seems like a win to me). The patch also slightly changes the API and behaviors of the Listen/Accept pattern. Previously both Listen and Accept calls took an address specified as a string. Now only listen does. This change was made because the Listen call can result in opening more than one socket. In order to support listening for both IPv4 and IPv6 connections we need to open one AF_INET socket and one AF_INET6 socket. During the listen call we construct a map of file descriptors to addrin structures which represent the allowable incoming connection address. This map removes the need for taking an address into the Accept call. This does have a change in functionality. Previously you could Listen for connections based on one address, and Accept connections from a different address. This is no longer supported. I could not find anywhere in LLDB where we actually used the APIs in that way. The new API does still support AnyAddr for allowing incoming connections from any address. The Listen implementation is implemented using kqueue on FreeBSD and Darwin, WSAPoll on Windows and poll(2) everywhere else. Reviewers: zturner, clayborg Subscribers: jasonmolenda, labath, lldb-commits, emaste Differential Revision: https://reviews.llvm.org/D31823 llvm-svn: 300579
* Add back code to implement "frame var -a,-l,-g" filters.Jim Ingham2017-04-184-35/+171
| | | | | | | | | | r285226 dropped the code that did these checks. I am pretty sure that was inadvertent, so I added that back in and added a test for it. <rdar://problem/31661252> llvm-svn: 300564
* Introduce FPR and Debug Registers/NetBSD/amd64 supportKamil Rytarowski2017-04-188-39/+678
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This code offers Debug Registers (80386) model in LLDB/amd64. This is initial support and has one issue that will be addressed later, Debug Register trap (TRAP_DBREG) is registered as (TRAP_TRACE) for unknown reason. On the other hand this works good enough to move on and leave this bug to be squashed later. Improve the NativeProcessNetBSD::ReinitializeThreads() function, stop setting inside it SetStoppedByExec(). This fixes incorrect stop reason on attaching (SetStoppedBySignal(SIGSTOP)). This commits also has no functional style improvements from clang-format. This code also ships with FXSAVE support on NetBSD. Demo: ``` $ lldb ./watch (lldb) target create "./watch" Current executable set to './watch' (x86_64). (lldb) b main Breakpoint 1: where = watch`main + 15 at watch.c:8, address = 0x000000000040087f (lldb) r Process 1573 launched: './watch' (x86_64) Process 1573 stopped * thread #1, stop reason = breakpoint 1.1 frame #0: 0x000000000040087f watch`main(argc=1, argv=0x00007f7fffa12b88) at watch.c:8 5 { 6 int i, j, k; 7 -> 8 for (i = 0; i < 3; i++) 9 for (j = 0; j < 3; j++) 10 for (k = 0; k < 3; k++) 11 printf("Hello world! i=%d j=%d k=%d\n", i, j, k); (lldb) watch set var i Watchpoint created: Watchpoint 1: addr = 0x7f7fffa12b4c size = 4 state = enabled type = w declare @ '/public/lldb_devel/watch.c:6' watchpoint spec = 'i' new value: 0 (lldb) c Process 1573 resuming Hello world! i=0 j=0 k=0 Hello world! i=0 j=0 k=1 Hello world! i=0 j=0 k=2 Hello world! i=0 j=1 k=0 Hello world! i=0 j=1 k=1 Hello world! i=0 j=1 k=2 Hello world! i=0 j=2 k=0 Hello world! i=0 j=2 k=1 Hello world! i=0 j=2 k=2 Process 1573 stopped * thread #1, stop reason = trace frame #0: 0x00000000004008cc watch`main(argc=1, argv=0x00007f7fffa12b88) at watch.c:8 5 { 6 int i, j, k; 7 -> 8 for (i = 0; i < 3; i++) 9 for (j = 0; j < 3; j++) 10 for (k = 0; k < 3; k++) 11 printf("Hello world! i=%d j=%d k=%d\n", i, j, k) ``` FPR (in another program using libm) ``` (lldb) register read --all General Purpose Registers: rax = 0x000000000000001c rbx = 0x00007f7fff1d4fe0 rcx = 0x000000000000000c rdx = 0x0000000000000002 rdi = 0x0000746711d5b018 __sF + 152 rsi = 0x0000000000000001 rbp = 0x00007f7fff1d3d80 rsp = 0x00007f7fff1d3d60 r8 = 0x00007f7fff1d3470 r9 = 0x0000000000000000 r10 = 0x0000000000000001 r11 = 0x0000000000000202 r12 = 0x00007f7fff1d3da0 r13 = 0x00007d8ad2d88500 r14 = 0x0000000000000002 r15 = 0x00007f7fffa627e0 rip = 0x00000000004009e9 fpr`main + 217 at fpr.c:15 rflags = 0x0000000000000202 cs = 0x0000000000000047 fs = 0x0000000000000000 gs = 0x0000000000000000 ss = 0x000000000000003f ds = 0x000000000000003f es = 0x000000000000003f eax = 0x0000001c ebx = 0xff1d4fe0 ecx = 0x0000000c edx = 0x00000002 edi = 0x11d5b018 esi = 0x00000001 ebp = 0xff1d3d80 esp = 0xff1d3d60 r8d = 0xff1d3470 r9d = 0x00000000 r10d = 0x00000001 r11d = 0x00000202 r12d = 0xff1d3da0 r13d = 0xd2d88500 r14d = 0x00000002 r15d = 0xffa627e0 ax = 0x001c bx = 0x4fe0 cx = 0x000c dx = 0x0002 di = 0xb018 si = 0x0001 bp = 0x3d80 sp = 0x3d60 r8w = 0x3470 r9w = 0x0000 r10w = 0x0001 r11w = 0x0202 r12w = 0x3da0 r13w = 0x8500 r14w = 0x0002 r15w = 0x27e0 ah = 0x00 bh = 0x4f ch = 0x00 dh = 0x00 al = 0x1c bl = 0xe0 cl = 0x0c dl = 0x02 dil = 0x18 sil = 0x01 bpl = 0x80 spl = 0x60 r8l = 0x70 r9l = 0x00 r10l = 0x01 r11l = 0x02 r12l = 0xa0 r13l = 0x00 r14l = 0x02 r15l = 0xe0 unknown: fctrl = 0x037f fstat = 0x0220 ftag = 0x00 fop = 0x0000 fiseg = 0x11e1a52c fioff = 0x11e1a52c foseg = 0xff1d3d54 fooff = 0xff1d3d54 mxcsr = 0x00001fa0 mxcsrmask = 0x0000ffff st0 = {0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00} st1 = {0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00} st2 = {0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00} st3 = {0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00} st4 = {0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00} st5 = {0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00} st6 = {0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00} st7 = {0xa5 0xdb 0x2d 0xbd 0x93 0xae 0xb9 0xfe 0xfe 0x3f} mm0 = 0x3fe9d13800000000 mm1 = 0x3e0485fcce89c000 mm2 = 0x3fefd735e0000000 mm3 = 0x0000000000000000 mm4 = 0x3fe0000000000000 mm5 = 0x3fe00000005217f3 mm6 = 0x0000000000000000 mm7 = 0x3fefd735e0000000 xmm0 = {0x00 0x00 0x00 0x00 0x38 0xd1 0xe9 0x3f 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00} xmm1 = {0x00 0xc0 0x89 0xce 0xfc 0x85 0x04 0x3e 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00} xmm2 = {0x00 0x00 0x00 0xe0 0x35 0xd7 0xef 0x3f 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00} xmm3 = {0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00} xmm4 = {0x00 0x00 0x00 0x00 0x00 0x00 0xe0 0x3f 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00} xmm5 = {0xf3 0x17 0x52 0x00 0x00 0x00 0xe0 0x3f 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00} xmm6 = {0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00} xmm7 = {0x00 0x00 0x00 0xe0 0x35 0xd7 0xef 0x3f 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00} xmm8 = {0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00} xmm9 = {0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00} xmm10 = {0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00} xmm11 = {0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00} xmm12 = {0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00} xmm13 = {0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00} xmm14 = {0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00} xmm15 = {0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00} dr0 = 0x0000000000000000 dr1 = 0x0000000000000000 dr2 = 0x0000000000000000 dr3 = 0x0000000000000000 dr4 = 0x0000000000000000 dr5 = 0x0000000000000000 dr6 = 0x00000000ffff0ff0 dr7 = 0x0000000000000400 22 registers were unavailable. ``` Sponsored by <The NetBSD Foundation> Reviewers: labath, emaste, joerg, kettenis Reviewed By: labath Subscribers: #lldb Tags: #lldb Differential Revision: https://reviews.llvm.org/D32080 llvm-svn: 300548
* TestStaticVariables still fails on Linux.Jim Ingham2017-04-181-0/+2
| | | | llvm-svn: 300519
* This test is succeeding on macOS with clang.Jim Ingham2017-04-181-6/+1
| | | | llvm-svn: 300517
* Unify the common code in the ios, tvos, watchos platforms into a singleJason Molenda2017-04-1711-2178/+907
| | | | | | | | | PlatformRemoveDarwinDevice class, subclassed to those three so they can provide their specific information. <rdar://problem/30159764> llvm-svn: 300512
* [ClangASTContext] Placate `casts away qualifiers` warnings from GCC.Davide Italiano2017-04-171-4/+8
| | | | llvm-svn: 300476
* Don't ever reduce the timeout of a packet, only increase it.Greg Clayton2017-04-172-3/+15
| | | | | | Differential Revision: https://reviews.llvm.org/D32087 llvm-svn: 300455
* ThreadSanitizer plugin: Support Swift access races and fix how external ↵Kuba Mracek2017-04-162-17/+39
| | | | | | races are displayed. llvm-svn: 300416
* Fix crash when completing in the current directory.Zachary Turner2017-04-152-21/+41
| | | | llvm-svn: 300386
* [Interpreter] Make a static func a lambda and remove always_inline.Davide Italiano2017-04-141-8/+5
| | | | | | | | The attribute was fairly dubious as: a) we shouldn't tell the compiler when to inline functions, b) GCC complains that the function may be not always inlinable. llvm-svn: 300377
* [ARM/Emulation] Remove an unneeded comparison and simplify. NFCI.Davide Italiano2017-04-141-2/+2
| | | | | | | reg0 is always zero and comparison to an unsigned always yields true. llvm-svn: 300375
* Fix bot breakage from r300372Chris Bieneman2017-04-141-1/+1
| | | | | | Use #cmakedefine instead of #cmakedefine01 because the uses are ifndef instead of if. llvm-svn: 300374
* [Process/Utility] Remove dead code. NFCI.Davide Italiano2017-04-141-5/+0
| | | | llvm-svn: 300373
* [CMake] Support generating Config.hChris Bieneman2017-04-1412-263/+56
| | | | | | | | | | | | | | | | | | | Summary: This patch removes the hand maintained config files in favor of auto-generating the config file. We will still need to maintain the defines for the Xcode builds on Mac, but all CMake builds use the generated header instead. This will enable finer grained platform support tests and enable supporting LLDB on more platforms with less manual maintenance. I have only tested this patch on Darwin, and any help testing it out on other platforms would be greatly appreciated. I've probably messed something up somewhere. Reviewers: labath, zturner Reviewed By: labath Subscribers: krytarowski, emaste, srhines, lldb-commits, mgorny Differential Revision: https://reviews.llvm.org/D31969 llvm-svn: 300372
* Increase the packet timeout for the jModulesInfo since it can take longer ↵Greg Clayton2017-04-141-0/+3
| | | | | | than the default 1 second timeout on some linux versions when many shared libraries are involved. llvm-svn: 300342
* Fixed to disassemble new packets and fixed the dumping of the 'x' packets.Greg Clayton2017-04-141-12/+41
| | | | llvm-svn: 300341
* Don't use uuid_clear(), non-darwin platforms includeJason Molenda2017-04-131-1/+1
| | | | | | | Utility/UuidCompatibility.h which gets you a definiton of uuid_t but none of the functions that operate on it. llvm-svn: 300162
* Use two LC_NOTE load commands for identifying the main binary thatJason Molenda2017-04-124-10/+156
| | | | | | | | | | | | | | | | | lldb should use when given a corefile. This uses an LC_NOTE "main bin spec" or an LC_NOTE "kern ver str" if they are present in a Mach-O core file. Core files may have multiple different binaries -- different kernels, or a mix of user process and kernel binaries -- and it can be difficult for lldb to detect the correct one to use simply by looking at the pages of memory. These two new LC_NOTE load commands allow for the correct binary to be recorded unambiguously. <rdar://problem/20878266> llvm-svn: 300138
* [NFC] Adding a new wrapper for getaddrinfoChris Bieneman2017-04-122-0/+64
| | | | | | | | | | | | | | Summary: This patch adds a new wrapper for getaddrinfo which returns a std::vector of SocketAddresses. While this patch doesn't add any uses of the new function, I have two separable patches that are dependent on this, so I put it in its own patch. Reviewers: zturner Reviewed By: zturner Subscribers: lldb-commits Differential Revision: https://reviews.llvm.org/D31822 llvm-svn: 300112
* Support Unit Testing debugserverChris Bieneman2017-04-126-85/+245
| | | | | | | | | | | | | | | | | Summary: This patch refactors the CMake build system's support for building debugserver to allow us to build the majority of debugserver's sources into the debugserverCommon library which can then be reused by unit tests. The first unit test I've written tests debug server's ability to accept incoming connections from LLDB. The test forks the process, and one side creates a listening socket using debugserver's socket API, the other side creates a transmitting socket using LLDB's TCPSocket class. I have no clue where to even start getting this connected into the LLDB Xcode project, so for now these tests are CMake-only. Reviewers: zturner, labath, jasonmolenda Subscribers: lldb-commits, mgorny Differential Revision: https://reviews.llvm.org/D31357 llvm-svn: 300111
* Add libc++ category to the remaining libc++ data formattersPavel Labath2017-04-127-76/+77
| | | | llvm-svn: 300054
* Fix TestCppIncompleteTypes for android/clangPavel Labath2017-04-121-2/+2
| | | | | | | LDFLAGS contains some .a files. If it is specified before the relevant object files, undefined symbol errors occur. llvm-svn: 300048
* Fix libc++ vector<bool> data formatter (bug #32553)Pavel Labath2017-04-125-208/+142
| | | | | | | | | | | | | | | | | Summary: The iteration list through the available data formatters was undefined, which meant that the vector<bool> formatter kicked in only in cases where it happened to be queried before the general vector formatter. To fix this, I merge the two data formatter entries into one, and select which implementation to use in the factory function. Reviewers: jasonmolenda, tberghammer, EricWF Subscribers: lldb-commits Differential Revision: https://reviews.llvm.org/D31880 llvm-svn: 300047
* Fix TestGuessLanguage for gccPavel Labath2017-04-121-1/+7
| | | | | | | | gcc emits DW_LANG_C89 even if we specify -std=c99 during compilation. Since this isn't an lldb bug, but just the way the compiler happens to be implemented, I teach the test to expect this situation correctly. llvm-svn: 300046
* Android.rules: setup correct objcopy pathPavel Labath2017-04-121-4/+12
| | | | | | This fixes a couple of tests when using android clang as a compiler. llvm-svn: 300045
* Teach SBFrame how to guess its language.Jim Ingham2017-04-1212-3/+181
| | | | | | <rdar://problem/31411646> llvm-svn: 300012
* Add missing annotation to TestDataFormatterUnorderedPavel Labath2017-04-111-0/+1
| | | | llvm-svn: 299934
* Remove Plugins/Process/POSIX from include_directoriesPavel Labath2017-04-116-46/+8
| | | | | | | | | | | | | | | | Summary: The files there can always be referred to using their full path, which is what most of the code has been doing already, so this makes the situation more consistent. Also fix the the code in the FreeBSD plugin to use the new paths. Reviewers: eugene, emaste Subscribers: lldb-commits, kettenis, mgorny, krytarowski Differential Revision: https://reviews.llvm.org/D31877 llvm-svn: 299933
* Update for alloca construction changesMatt Arsenault2017-04-101-2/+5
| | | | llvm-svn: 299898
OpenPOWER on IntegriCloud