summaryrefslogtreecommitdiffstats
path: root/lldb/source/Core
Commit message (Collapse)AuthorAgeFilesLines
...
* Fixed name lookups for names that contain "::" but aren't actually C++ ↵Greg Clayton2014-10-221-0/+2
| | | | | | | | | | | | qualified C++ names. To do this, I fixed the CPPLanguageRuntime::StripNamespacesFromVariableName() function to use a regular expression that correctly determines if the name passed to it is a qualfied C++ name like "a::b::c" or "b::c". The old version of this function was treating '__54-[NSUserScriptTask executeWithInterpreter:arguments::]_block_invoke' as a match with a basename of ']_block_invoke'. Also fixed a case in the by name lookup of functions where we wouldn't look for the full name if we actually tried to call CPPLanguageRuntime::StripNamespacesFromVariableName() and got an empty basename back. <rdar://problem/18527866> llvm-svn: 220432
* Re-use the GetMatchAtIndex() that uses the StringRef to avoid code ↵Greg Clayton2014-10-221-13/+7
| | | | | | duplication and properly detect when a capture is invalid and return false. llvm-svn: 220431
* Fix a problem where summary strings could not use a synthetically generated ↵Enrico Granata2014-10-221-0/+1
| | | | | | value as part of themselves llvm-svn: 220414
* Expose the type-info flags at the public API layer. These flags provide much ↵Enrico Granata2014-10-213-51/+51
| | | | | | more informational content to consumers of the LLDB API than the existing TypeClass. Part of the fix for rdar://18517593 llvm-svn: 220322
* Make the "synchronous" mode actually work without race conditions.Greg Clayton2014-10-211-172/+8
| | | | | | There were many issues with synchronous mode that we discovered when started to try and add a "batch" mode. There was a race condition where the event handling thread might consume events when in sync mode and other times the Process::WaitForProcessToStop() would consume them. This also led to places where the Process IO handler might or might not get popped when it needed to be. llvm-svn: 220254
* Put #if 0 blocks around three sections of code that are intentionallyJason Molenda2014-10-171-1/+7
| | | | | | | | | | | | unreachable so we don't get warnings about them. Completely initialize a structure instead of leaving some of its fields potentially indeterminate (although in reality they would all be set before use -- but the compiler warning doesn't know that). clang warning. llvm-svn: 220017
* Mechanical change to FastDemangle to make it closer to the lldbJason Molenda2014-10-151-645/+839
| | | | | | | coding conventions. Lots of whitespace et al changes but no content changes. llvm-svn: 219856
* Add synthetic children support for NSIndexPathEnrico Granata2014-10-151-0/+1
| | | | llvm-svn: 219852
* Allow ThreadLauncher::LaunchThread() to specify a minimum stack byte size ↵Greg Clayton2014-10-151-2/+12
| | | | | | | | | | | | when launching threads. This defaults to zero, which means to use the system default. NOTE: Windows will need to implement this. <rdar://problem/18644448> llvm-svn: 219821
* Don't lock the IOHandlerList::m_mutex in Debugger::RunIOHandler(...) since ↵Greg Clayton2014-10-131-1/+0
| | | | | | | | if a process is resumed or halted, it will try to push/pop the process IOHandler and it will deadlock. <rdar://problem/18610852> llvm-svn: 219620
* Reinstate setting addr_width to the result of the computation,Eric Christopher2014-10-111-1/+1
| | | | | | but in the conditional rather than at initialization time. llvm-svn: 219549
* Remove default case from a fully covered switch.Eric Christopher2014-10-111-1/+0
| | | | llvm-svn: 219548
* Fix unused variable warning from r219544.Eric Christopher2014-10-101-1/+0
| | | | llvm-svn: 219547
* LLDB AddressSanitizer instrumentation runtime plugin, breakpint on error and ↵Kuba Brecka2014-10-102-0/+120
| | | | | | | | | | | | | | | | | | | | | | | | | report data extraction Reviewed at http://reviews.llvm.org/D5592 This patch gives LLDB some ability to interact with AddressSanitizer runtime library, on top of what we already have (historical memory stack traces provided by ASan). Namely, that's the ability to stop on an error caught by ASan, and access the report information that are associated with it. The report information is also exposed into SB API. More precisely this patch... adds a new plugin type, InstrumentationRuntime, which should serve as a generic superclass for other instrumentation runtime libraries, these plugins get notified when modules are loaded, so they get a chance to "activate" when a specific dynamic library is loaded an instance of this plugin type, AddressSanitizerRuntime, which activates itself when it sees the ASan dynamic library or founds ASan statically linked in the executable adds a collection of these plugins into the Process class AddressSanitizerRuntime sets an internal breakpoint on __asan::AsanDie(), and when this breakpoint gets hit, it retrieves the report information from ASan this breakpoint is then exposed as a new StopReason, eStopReasonInstrumentation, with a new StopInfo subclass, InstrumentationRuntimeStopInfo the StopInfo superclass is extended with a m_extended_info field (it's a StructuredData::ObjectSP), that can hold arbitrary JSON-like data, which is the way the new plugin provides the report data the "thread info" command now accepts a "-s" flag that prints out the JSON data of a stop reason (same way the "-j" flag works now) SBThread has a new API, GetStopReasonExtendedInfoAsJSON, which dumps the JSON string into a SBStream adds a test case for all of this I plan to also get rid of the original ASan plugin (memory history stack traces) and use an instance of AddressSanitizerRuntime for that purpose. Kuba llvm-svn: 219546
* Add a new disassembly-format specification so that the disassemblerJason Molenda2014-10-105-52/+267
| | | | | | | | | | | | | | | | | | | | | output style can be customized. Change the built-in default to be more similar to gdb's disassembly formatting. The disassembly-format for a gdb-like output is ${addr-file-or-load} <${function.name-without-args}${function.concrete-only-addr-offset-no-padding}>: The disassembly-format for the lldb style output is {${function.initial-function}{${module.file.basename}`}{${function.name-without-args}}:\n}{${function.changed}\n{${module.file.basename}`}{${function.name-without-args}}:\n}{${current-pc-arrow} }{${addr-file-or-load}}: The two backticks in the lldb style formatter triggers the sub-expression evaluation in CommandInterpreter::PreprocessCommand() so you can't use that one as-is ... changing to use ' characters instead of ` would work around that. <rdar://problem/9885398> llvm-svn: 219544
* Add an API on ValueObject to retrieve the desired dynamic/synthetic ↵Enrico Granata2014-10-091-0/+50
| | | | | | combination all at once, if available, working somewhat hard to avoid returning an invalid ValueObject in the process llvm-svn: 219423
* Extend synthetic children to produce synthetic values (as in, those that ↵Enrico Granata2014-10-086-15/+45
| | | | | | | | | | | | | | | | | GetValueAsUnsigned(), GetValueAsCString() would return) The way to do this is to write a synthetic child provider for your type, and have it vend the (optional) get_value function. If get_value is defined, and it returns a valid SBValue, that SBValue's value (as in lldb_private::Value) will be used as the synthetic ValueObject's Value The rationale for doing things this way is twofold: - there are many possible ways to define a "value" (SBData, a Python number, ...) but SBValue seems general enough as a thing that stores a "value", so we just trade values that way and that keeps our currency trivial - we could introduce a new level of layering (ValueObjectSyntheticValue), a new kind of formatter (synthetic value producer), but that would complicate the model (can I have a dynamic with no synthetic children but synthetic value? synthetic value with synthetic children but no dynamic?), and I really couldn't see much benefit to be reaped from this added complexity in the matrix On the other hand, just defining a synthetic child provider with a get_value but returning no actual children is easy enough that it's not a significant road-block to adoption of this feature Comes with a test case llvm-svn: 219330
* Create a ConnectionGenericFile class for Windows.Zachary Turner2014-10-061-0/+16
| | | | | | | | | | | | | This is the first step in getting ConnectionFileDescriptor ported to Windows. It implements a connection against a disk file for windows. This supports connection strings of the form file://PATH which are currently supported only on posix platforms in ConnectionFileDescriptor. Reviewed by: Greg Clayton Differential Revision: http://reviews.llvm.org/D5608 llvm-svn: 219145
* Move ConnectionFileDescriptor to platform-specific Host directory.Zachary Turner2014-10-063-814/+1
| | | | | | | | | | | | As part of getting ConnectionFileDescriptor working on Windows, there is going to be alot of platform specific work to be done. As a result, the implementation is moving into Host. This patch performs the code move and fixes up call-sites appropriately. Reviewed by: Greg Clayton Differential Revision: http://reviews.llvm.org/D5548 llvm-svn: 219143
* Fix a problem where LLDB was constructing a TypeImpl marking the dynamic ↵Enrico Granata2014-10-061-1/+1
| | | | | | type as the static type. Instead use the TypeImpl() constructor correctly llvm-svn: 219142
* Very minimal support 24-bit kalimbas. Vanilla "memory read" for data sectionsMatthew Gardiner2014-09-293-32/+31
| | | | | | | | | | | works, as do breakpoints, run and pause, display zeroth frame. See http://reviews.llvm.org/D5503 for a fuller description of the changes in this commit. llvm-svn: 218596
* Enable llgs to build against experimental Android AOSP ↵Todd Fiala2014-09-271-3/+45
| | | | | | | | | | | | lldb/llvm/clang/compiler-rt repos. See http://reviews.llvm.org/D5495 for more details. These are changes that are part of an effort to support building llgs, within the AOSP source tree, using the Android.mk build system, when using the llvm/clang/lldb git repos from AOSP replaced with the experimental ones currently in github.com/tfiala/aosp-{llvm,clang,lldb,compiler-rt}. llvm-svn: 218568
* Fix up the HostThread interface, making the interface simpler.Zachary Turner2014-09-232-14/+10
| | | | | | | Reviewed by: Greg Clayton Differential Revision: http://reviews.llvm.org/D5417 llvm-svn: 218325
* ConnectionFileDescriptor::Connect()'s handling of the "fd://" methodJason Molenda2014-09-231-3/+0
| | | | | | | | | was broken in r214984 by the addition of an unconditional error return at the start of the code block handling this method. Remove the errant lines. <rdar://problem/18416691> llvm-svn: 218291
* Test suite runs better again after recent fixes that would select a platform ↵Greg Clayton2014-09-191-1/+1
| | | | | | | | | | | | | if a "file a.out" auto selected a different platform than the selected one. Changes include: - fix it so you can select the "host" platform using "platform select host" - change all callbacks that create platforms to returns shared pointers - fix TestImageListMultiArchitecture.py to restore the "host" platform by running "platform select host" - Add a new "PlatformSP Platform::Find(const ConstString &name)" method to get a cached platform - cache platforms that are created and re-use them instead of always creating a new one llvm-svn: 218145
* Adds two new functions to SBTarget FindGlobalVariables and ↵Carlo Kok2014-09-191-0/+20
| | | | | | FindGlobalFunctions that lets you search by name, by regular expression and by starts with. llvm-svn: 218140
* Fix the ctor ivar initialization formatting for Debugger,Jason Molenda2014-09-121-16/+16
| | | | | | | TypeValidatorImpl, FileAction, and ProcessLaunchInfo to match the lldb coding convention. llvm-svn: 217653
* Create a HostThread abstraction.Zachary Turner2014-09-093-45/+49
| | | | | | | | | | | | | This patch moves creates a thread abstraction that represents a thread running inside the LLDB process. This is a replacement for otherwise using lldb::thread_t, and provides a platform agnostic interface to managing these threads. Differential Revision: http://reviews.llvm.org/D5198 Reviewed by: Jim Ingham llvm-svn: 217460
* Start plumbing the type validator logic through to the ValueObjects; allow a ↵Enrico Granata2014-09-051-2/+25
| | | | | | ValueObject to have a validator, to update it from the FormatManager, and to retrieve (and cache) the result of the validation llvm-svn: 217282
* Add error report when Module::GetObjectFile() fails to find a plugin to open ↵Todd Fiala2014-09-051-0/+4
| | | | | | | | an object file. Change by Stephane Sezer. llvm-svn: 217251
* ASan malloc/free history threadsKuba Brecka2014-09-041-0/+104
| | | | | | Reviewed at http://reviews.llvm.org/D4596 llvm-svn: 217116
* Add an interface on ArchSpec to provide lldb client codeMatthew Gardiner2014-09-011-0/+34
| | | | | | | with a mechanism to query if the current target architecture has non 8-bit bytes. llvm-svn: 216867
* lldb - towards AArch64 being recognised as platform architectureTodd Fiala2014-08-281-0/+36
| | | | | | | | See http://reviews.llvm.org/D4381. Change by Paul Osmialowski. llvm-svn: 216668
* Update LLDB to use LLVM's DynamicLibrary.Zachary Turner2014-08-272-27/+23
| | | | | | | | | LLDB had implemented its own DynamicLibrary class for plugin support. LLVM has an equivalent mechanism, so this patch deletes the duplicated code in LLDB and updates LLDB to reference the mechanism provided by LLVM. llvm-svn: 216606
* Add support for kalimba architecture variants 3, 4 and 5.Matthew Gardiner2014-08-271-2/+18
| | | | | | | | Add entries to core_definitions and elf_arch_entries for those variants. Select the subtype for the variant by parsing the e_flags field of the elf header. llvm-svn: 216541
* It was pointed out to me that an offset of 0 makes sense for ObjC, but not ↵Enrico Granata2014-08-261-2/+1
| | | | | | always for C++, and this API claims to be general enough that it should not drop C++ usability on the floor for no good reason. Fix it with an explicit offset argument llvm-svn: 216487
* Add an API on ValueObject to generate a 'synthetic child' of base class ↵Enrico Granata2014-08-261-0/+42
| | | | | | type. Note that in this commit, the term synthetic child is not meant to refer to data formatters, but to the programmatically-generated children stored inside a ValueObject itself llvm-svn: 216483
* When adding a dSYM to an existing ObjectFile, we can have a situationJason Molenda2014-08-221-0/+11
| | | | | | | | | | | | | | | | | | with binaries in the dyld shared cache (esp on iOS) where the file address for the executable binary (maybe from memory, maybe from an expanded copy of the dyld shared cache) is different from the file address in the dSYM. In that case, ObjectFileMachO replaces the file addresses from the original binary with the dSYM file addresses (usually 0-based) -- lldb doesn't have a notion of two file addresses for a given module so they need to agree. There was a cache of file addresses over in the Symtab so I added a method to the Module and the objects within to clear any file address caches if they exist, and added an implementation in the Symtab module to do that. <rdar://problem/16929569> llvm-svn: 216258
* Move Host::GetLLDBPath to HostInfo.Zachary Turner2014-08-212-5/+7
| | | | | | | | This continues the effort to get Host code moved over to HostInfo, and removes many more instances of preprocessor defines along the way. llvm-svn: 216195
* Fix on Linux for ReadThread lingering after inferior exitsTodd Fiala2014-08-211-2/+13
| | | | | | | | | | | See this email thread: http://lists.cs.uiuc.edu/pipermail/lldb-commits/Week-of-Mon-20140818/012487.html This patch handles the case where the inferior process exits but leaves the ReadThread in a continuous loop reading from the communication pipe. On MacOSX, the ReadThread exits when it receives a 0 return value from the read due to EOF. On Linux the read returns -1 and sets errno to EIO error, this does not currently cause the thread to shutdown so it continues to read from the comm. In Communication::ReadThread I added a handler for eConnectionStatusError to disconnect and shutdown the thread. Change by Alex Pepper. llvm-svn: 216194
* Move Host::GetArchitecture to HostInfo::GetArchitecture.Zachary Turner2014-08-201-7/+8
| | | | | | | | As a side effect, this patch also eliminates all of the preprocessor conditionals previously used to implement GetArchitecture(). llvm-svn: 216074
* Add an accessor to ValueObject that determines if the object represents a ↵Enrico Granata2014-08-191-0/+20
| | | | | | base class, and also returns the depth of base-class-ness. For instance if one has class C : public B {} class B : public A {}, the value for A nested in B nested in C would be a base class of depth 2 llvm-svn: 216032
* Move some Host logic into HostInfo class.Zachary Turner2014-08-191-2/+2
| | | | | | | | | | | | | | | | | | This patch creates a HostInfo class, a static class used to answer basic queries about the host platform. As part of this change, some functionality is moved from Host to HostInfo, and relevant fixups are performed in the rest of the codebase. This is part of a larger effort to isolate more code in the Host layer into platform-specific groups, to make it easier to make platform specific changes for a particular Host without breaking other hosts. Reviewed by: Greg Clayton Differential Revision: http://reviews.llvm.org/D4963 llvm-svn: 215992
* Don't search for module resources at all if the setting is set to "false". Greg Clayton2014-08-182-4/+6
| | | | llvm-svn: 215936
* add missing break. Fix CID 1229446 & 1203680Sylvestre Ledru2014-08-181-3/+5
| | | | llvm-svn: 215894
* Fix the missleading indentation. Fix CID 1096332Sylvestre Ledru2014-08-181-1/+1
| | | | llvm-svn: 215893
* When attempting to print function names with arguments in frame formatting, ↵Enrico Granata2014-08-161-1/+23
| | | | | | attempt to detect templated functions, and replace the argument list with values outside the template marking. Turns C::f<(this=0x00007fff5fbffb70, x=2, y=1)0>(int, int) into C::f<(C::V)0>(this=0x00007fff5fbffb70, x=2, y=1), which definitely looks more like the real thing. Fixes rdar://14882237 llvm-svn: 215800
* In order for the debug script filename to be valid as a module name, LLDB ↵Enrico Granata2014-08-161-1/+2
| | | | | | does some textual replacements. However, if one were unaware of this, they might name their script using the 'untampered' file name and they would get no feedback about it. Add logic to LLDB to make sure we tell people about those changes if it turns out they might need to know. Fixes rdar://14310572 llvm-svn: 215798
* Disable the command pipe in ConnectionFileDescriptor for Windows.Zachary Turner2014-08-071-1/+8
| | | | | | | | | | The select() API on Windows is not compatible with objects other than sockets, so passing a descriptor for the command pipe to this function is guaranteed to fail. ConnectionFileDescriptor is still broken on Windows after this patch, but slightly less broken than before. llvm-svn: 215172
* Creates a socket host object.Zachary Turner2014-08-061-925/+153
| | | | | | | | | | | | | | | | | | This patch moves the logic of many common socket operations into its own class lldb_private::Socket. It then modifies the ConnectionFileDescriptor class, and a few users of that class, to use this new Socket class instead of hardcoding socket logic directly. Finally, this patch creates a common interface called IOObject for any objects that support reading and writing, so that endpoints such as sockets and files can be treated the same. Differential Revision: http://reviews.llvm.org/D4641 Reviewed by: Todd Fiala, Greg Clayton llvm-svn: 214984
OpenPOWER on IntegriCloud