summaryrefslogtreecommitdiffstats
path: root/lldb/source/Core
Commit message (Collapse)AuthorAgeFilesLines
...
* <rdar://problem/12953853>Greg Clayton2013-01-082-3/+22
| | | | | | | | | | Setting breakpoints using "breakpoint set --selector <SEL>" previously didn't when there was no dSYM file. Also fixed issues in the test suite that arose after fixing the bug. Also fixed the log channels to properly ref count the log streams using weak pointers to the streams. This fixes a test suite problem that would happen when you specified a full path to the compiler with the "--compiler" option. llvm-svn: 171816
* <rdar://problem/12389806> Jason Molenda2013-01-041-1/+9
| | | | | | | | Have the disassembler's Instruction::Dump always insert at least one space character between an opcode and its arguments, don't let a long opcode name abut the arguments. llvm-svn: 171561
* Cleaned up the UUID mismatch just printing itself whenever it wants to by ↵Greg Clayton2012-12-141-2/+2
| | | | | | allowing an optional feedback stream to be passed along when getting the symbol vendor. llvm-svn: 170174
* <rdar://problem/11689939>Enrico Granata2012-12-131-4/+19
| | | | | | | | | | Supporting a compact display syntax for ObjC pointers where 0x00.....0 is replaced by a much more legible "nil" e.g. this would show: (NSArray *) $2 = nil instead of: (NSArray *) $2 = 0x0000000000000000 <nil> llvm-svn: 170161
* Removed the == and != operators from ArchSpec, sinceSean Callanan2012-12-132-29/+23
| | | | | | | | | | | | equality can be strict or loose and we want code to explicitly choose one or the other. Also renamed the Compare function to IsEqualTo, to avoid confusion. <rdar://problem/12856749> llvm-svn: 170152
* <rdar://problem/12639506> Enrico Granata2012-12-111-2/+2
| | | | | | Make sure that the user's choice of a format for dumping aggregate types is persisted to child members llvm-svn: 169809
* <rdar://problem/12709976>Enrico Granata2012-12-101-130/+135
| | | | | | Adding a summary for NSError llvm-svn: 169792
* <rdar://problem/11844604>Greg Clayton2012-12-101-4/+4
| | | | | | When displaying function.name-with-args format will now print "varname=<unavailable>" instead of omitting argument names and values when there is an error reading the value. llvm-svn: 169781
* Enable RTTI for liblldbCore.a when GCC is the compilerDaniel Malea2012-12-101-0/+11
| | | | | | - gcc does not like -fno-rtti mixed with dynamic_cast<> (in cxa_demangle.cpp) llvm-svn: 169767
* <rdar://problem/12848118>Enrico Granata2012-12-101-14/+6
| | | | | | | Making MightHaveChildren() always return true regardless for our own data formatters This is meant to optimize performance for common most-often-not-empty container classes llvm-svn: 169759
* <rdar://problem/12817233>Enrico Granata2012-12-101-1/+1
| | | | | | Change the wording of NSNumber summary from absurd value to unexpected value when a tagged pointer shows up that does not match our knowledge of the internals llvm-svn: 169751
* Fix a few more clang (3.2) warnings on Linux:Daniel Malea2012-12-073-4/+4
| | | | | | | | | | | | | | | | | - remove unused members - add NO_PEDANTIC to selected Makefiles - fix return values (removed NULL as needed) - disable warning about four-char-constants - remove unneeded const from operator*() declaration - add missing lambda function return types - fix printf() with no format string - change sizeof to use a type name instead of variable name - fix Linux ProcessMonitor.cpp to be 32/64 bit friendly - disable warnings emitted by swig-generated C++ code Patch by Matt Kopec! llvm-svn: 169645
* More Linux warnings fixes (remove default labels as needed):Daniel Malea2012-12-0710-104/+0
| | | | | | | | - as per http://llvm.org/docs/CodingStandards.html#don-t-use-default-labels-in-fully-covered-switches-over-enumerations Patch by Matt Kopec! llvm-svn: 169633
* Separate initing the stdout/stderr for running the Python Script interpreter ↵Jim Ingham2012-12-071-1/+3
| | | | | | | | | | from initing the lldb.target/frame/etc globals, and only do the latter when it makes sense to. <rdar://problem/12554049> llvm-svn: 169614
* Merge rename fix from libcxxabi (r169402: rename class with name that ↵Daniel Malea2012-12-061-3/+3
| | | | | | clashes with GCC 4.6/4.7) llvm-svn: 169515
* <rdar://problem/12560257>Greg Clayton2012-12-063-5/+4
| | | | | | Fixed zero sized arrays to work correctly. This will only happen once we get a clang that emits correct debug info for zero sized arrays. For now I have marked the TestStructTypes.py as an expected failure. llvm-svn: 169465
* <rdar://problem/12749733>Greg Clayton2012-12-051-0/+13
| | | | | | Always allows getting builtin types by name even if there is no backing debug information. llvm-svn: 169424
* Fix Linux build warnings due to redefinition of macros:Daniel Malea2012-12-0514-0/+27
| | | | | | | | | - add new header lldb-python.h to be included before other system headers - short term fix (eventually python dependencies must be cleaned up) Patch by Matt Kopec! llvm-svn: 169341
* In the data formatters, if we know the resultSean Callanan2012-12-041-5/+2
| | | | | | | | | | | | type of an Objective-C selector, don't bother making the expression parser resolve it all over again. Just send the message straight to the object pointer as if it were an id, and cast the result. <rdar://problem/12799087> llvm-svn: 169300
* <rdar://problem/12798131> Greg Clayton2012-12-041-1/+1
| | | | | | | | | | | | Cleaned up the option parsing code to always pass around the short options as integers. Previously we cast this down to "char" and lost some information. I recently added an assert that would detect duplicate short character options which was firing during the test suite. This fix does the following: - make sure all short options are treated as "int" - make sure that short options can be non-printable values when a short option is not required or when an option group is mixed into many commands and a short option is not desired - fix the help printing to "do the right thing" in all cases. Previously if there were duplicate short character options, it would just not emit help for the duplicates - fix option parsing when there are duplicates to parse options correctly. Previously the option parsing, when done for an OptionGroup, would just start parsing options incorrectly by omitting table entries and it would end up setting the wrong option value llvm-svn: 169189
* <rdar://problem/12742973>Greg Clayton2012-12-031-30/+51
| | | | | | Forwarding a fix for a crasher in the demangler. llvm-svn: 169136
* Save and restore terminal state when lldb is suspended with SIGTSTP and ↵Jim Ingham2012-11-301-1/+20
| | | | | | | | | resumed with SIGCONT. Readline & gdb have a bunch of code to handle older UNIX'es with other job control mechanisms. I didn't try to replicate that. llvm-svn: 169032
* Resolve printf formatting warnings on Linux:Daniel Malea2012-11-2921-88/+94
| | | | | | | | - use macros from inttypes.h for format strings instead of OS-specific types Patch from Matt Kopec! llvm-svn: 168945
* Rename __lambda to __lambda_node (apply r164404 from libcxxabi)Daniel Malea2012-11-291-3/+3
| | | | | | | - fixes gcc 4.6 build problems - resolves open bugzilla http://llvm.org/bugs/show_bug.cgi?id=13889 llvm-svn: 168835
* Fixing a silly typo in the previous patchEnrico Granata2012-11-271-1/+2
| | | | llvm-svn: 168748
* <rdar://problem/12754509>Enrico Granata2012-11-271-2/+3
| | | | | | | Make sure that ValueObjectDynamicValue clears itself when no dynamic type information can be found This behavior was supposed to be already happening (as per the comment lines) llvm-svn: 168743
* Revision of the patch from Andrew Kaylor <andrew.kaylor@intel.com> to ↵Jim Ingham2012-11-131-9/+18
| | | | | | prevent missing an event added in WaitForEventsInternal, narrowing the time in which we are not accepting new events. Also, made everything that was protected private, since there really isn't any good reason why subclasses would have to muck with the listener internals. llvm-svn: 167857
* Patch from Andrew Kaylor that fixes a race condition in the Listener.cpp.Greg Clayton2012-11-121-10/+13
| | | | llvm-svn: 167778
* Minor cleanups to the new ModuleList notification APIs: passing in the ↵Enrico Granata2012-11-081-7/+5
| | | | | | ModuleList as part of the callbacks, and not copying the notifier as part of copy constructing and assigning llvm-svn: 167592
* <rdar://problem/12586350>Enrico Granata2012-11-083-38/+151
| | | | | | | | | | | | | | This commit does three things: (a) introduces a new notification model for adding/removing/changing modules to a ModuleList, and applies it to the Target's ModuleList, so that we make sure to always trigger the right set of actions whenever modules come and go in a target. Certain spots in the code still need to "manually" notify the Target for several reasons, so this is a work in progress (b) adds a new capability to the Platforms: locating a scripting resources associated to a module. A scripting resource is a Python file that can load commands, formatters, ... and any other action of interest corresponding to the loading of a module. At the moment, this is only implemented on Mac OS X and only for files inside .dSYM bundles - the next step is going to be letting the frameworks themselves hold their scripting resources. Implementors of platforms for other systems are free to implement "the right thing" for their own worlds (c) hooking up items (a) and (b) so that targets auto-load the scripting resources as the corresponding modules get loaded in a target. This has a few caveats at the moment: - the user needs to manually add the .py file to the dSYM (soon, it will also work in the framework itself) - if two modules with the same name show up during the lifetime of an LLDB session, the second one won't be able to load its scripting resource, but will otherwise work just fine llvm-svn: 167569
* Add new ArchSpec methods, IsCompatibleMatch() and IsExactMatch(). Jason Molenda2012-11-041-176/+91
| | | | | | | | | | | | | | | | | | | | | The operator== method is a synonym for IsExactMatch(). The essential difference between these two is that IsCompatibleMatch() will say that armv7 and armv7s are compatible and return true. IsExactMatch() will say that armv7 and armv7s are not a match. An armv7s cpu can run either generic armv7 binaries or armv7s binaries (the latter being tuned for it). When we're picking the slice of a universal Mach-O file to load in an armv7s Target, we need to be able to first look for an exact cpu subtype match (armv7s == armv7s) and failing that, looking for a slice with a compatible architecture. Update ObjectContainerUniversalMachO::GetObjectFile to prefer an exact match of the cpu type, falling back to a compatible match if necessary. <rdar://problem/12593515> llvm-svn: 167365
* Caught two cases where we were passing a Stream* without checking for NULLEnrico Granata2012-11-031-3/+6
| | | | llvm-svn: 167342
* Change DataExtractor::Dump() to use a series of if..else ifJason Molenda2012-11-012-12/+13
| | | | | | | | | | | statements instead of a switch for the size of the floating point types; some architectures sizeof double and sizeof long double are the same and that's invalid in a switch. Fix the LLDB_DISABLE_PYTHON ifdef block in FormatManager::LoadObjCFormatters so it builds on arm again. llvm-svn: 167263
* More fixes from MSVC warnings found by Carlo Kok.Greg Clayton2012-10-311-2/+2
| | | | llvm-svn: 167171
* Fixed build warnings.Greg Clayton2012-10-301-0/+1
| | | | llvm-svn: 167065
* Path from Ashok Thirumurthi:Greg Clayton2012-10-302-3/+8
| | | | | | | | | | | | The attached patch adds eValueTypeVector to lldb_private::Value. The nested struct Vector is patterned after RegisterValue::m_data.buffer. This change to Value allows ClangExpressionDeclMap::LookupDecl to return vector register data for consumption by InterpreterStackFrame::ResolveValue. Note that ResolveValue was tweaked slightly to allocate enough memory for vector registers. An immediate result of this patch is that "expr $xmm0" generates the same results on Linux as on the Mac, which is good enough for TestRegisters.py. In addition, the log of m_memory.PrintData(data_region.m_base, data_region.m_extent) shows that the register content has been resolved successfully. On the other hand, the output is glaringly empty: runCmd: expr $xmm0 output: (unsigned char __attribute__((ext_vector_type(16)))) $0 = {} Expecting sub string: vector_type Matched llvm-svn: 167033
* <rdar://problem/11449953> Change Debugger::SetOutputFileHandle() so that it ↵Enrico Granata2012-10-293-20/+82
| | | | | | | | | does not automatically initialize the script interpreter in order to transfer its output file handle to it This should delay initialization of Python until strictly necessary and speed-up debugger startup Also, convert formatters for SEL and BOOL ObjC data-types from Python to C++, in order to reap more performance benefits from the above changes llvm-svn: 166967
* Improve the broadcast event dumping.Greg Clayton2012-10-291-1/+19
| | | | llvm-svn: 166950
* Moving ValueObjectCast over to its own .h/.cpp files instead of sharing ↵Enrico Granata2012-10-273-104/+134
| | | | | | | | | | | ValueObjectDynamic.h/.cpp Removing the IsDynamic() and GetStaticValue() calls, so that they will default to the base class behavior: - non-dynamic - itself as the static value This is in contrast with the previous behavior which could be confusing and could potentially cause issues when using those objects llvm-svn: 166857
* Reverting the changes to Scalar since this class needs to follow C rules for ↵Enrico Granata2012-10-241-9/+9
| | | | | | type promotion llvm-svn: 166626
* Reimplementing SBValue/ValueObject.GetValueAsUnsigned() in terms of ↵Enrico Granata2012-10-242-11/+11
| | | | | | appropriate calls in Scalar - Making sure Scalar does the right thing when casting signed values to unsigned ones. llvm-svn: 166618
* <rdar://problem/12523238> Commit 2 of 3Enrico Granata2012-10-231-4/+12
| | | | | | | | | | | Adding the new has_children (or MightHaveChildren() in C++) for the existing synthetic children providers In a few cases, the new call is going to be much more efficient than the previous num_children > 0 check When the optimization was marginal (e.g. std::vector<>), the choice was to use num_children in order to keep implementation details in one function instead of duplicating code Next step is to provide test cases llvm-svn: 166506
* <rdar://problem/12523238> Commit 1 of 3Enrico Granata2012-10-232-3/+48
| | | | | | | | | | | | This commit enables the new HasChildren() feature for synthetic children providers Namely, it hooks up the required bits and pieces so that individual synthetic children providers can implement a new (optional) has_children call Default implementations have been provided where necessary so that any existing providers continue to work and behave correctly Next steps are: 2) writing smart implementations of has_children for our providers whenever possible 3) make a test case llvm-svn: 166495
* Fixing a compiler warning about has_children being used before being initializedEnrico Granata2012-10-231-1/+1
| | | | llvm-svn: 166462
* <rdar://problem/12493007>Greg Clayton2012-10-232-0/+32
| | | | | | | | | | | Added a new API call to help efficiently determine if a SBValue could have children: bool SBValue::MightHaveChildren (); This is inteneded to be used bui GUI programs that need to show if a SBValue needs a disclosure triangle when displaying a hierarchical type in a tree view without having to complete the type (by calling SBValue::GetNumChildren()) as completing the type is expensive. llvm-svn: 166460
* <rdar://problem/12437442>Enrico Granata2012-10-224-17/+53
| | | | | | | | | | | Given our implementation of ValueObjects we could have a scenario where a ValueObject has a dynamic type of Foo* at one point, and then its dynamic type changes to Bar* If Bar* has synthetic children enabled, by the time we figure that out, our public API is already vending SBValues wrapping a DynamicVO, instead of a SyntheticVO and there was no trivial way for us to change the SP inside an SBValue on the fly This checkin reimplements SBValue in terms of a wrapper, ValueImpl, that allows this substitutions on-the-fly by overriding GetSP() to do The Right Thing (TM) As an additional bonus, GetNonSyntheticValue() now works, and we can get rid of the ForceDisableSyntheticChildren idiom in ScriptInterpreterPython Lastly, this checkin makes sure the synthetic VOs get the correct m_value and m_data from their parents (prevented summaries from working in some cases) llvm-svn: 166426
* <rdar://problem/12473003> Greg Clayton2012-10-221-3/+15
| | | | | | | | Allow type searches to specify a type keyword when searching for type. Currently supported type keywords are: struct, class, union, enum, and typedef. So now you can search for types with a string like "struct foo". llvm-svn: 166420
* Fixed a bug that caused floating-point valuesSean Callanan2012-10-201-15/+23
| | | | | | | | to be printed truncated. <rdar://problem/12389615> llvm-svn: 166368
* Added the infrastructure necessary for plug-ins to be able to add their own ↵Greg Clayton2012-10-193-3/+114
| | | | | | | | | | | | | | | | | settings instead of having settings added to existing ones. In particular "target.disable-kext-loading" was added to "target" where it should actually be specific to the the dynamic loader plugin. Now the plug-in manager has the ability to create settings at the root level starting with "plugin". Each plug-in type can add new sub dictionaries, and then each plug-in can register a setting dictionary under its own short name. For example the DynamicLoaderDarwinKernel plug-in now registers a setting dictionary at: plugin dynamic-loader macosx-kernel (bool) disable-kext-loading To settings can be set using: (lldb) settings set plugin.dynamic-loader.macosx-kernel.disable-kext-loading true I currently only hooked up the DynamicLoader plug-ins, but the code is very easy to duplicate when and if we need settings for other plug-ins. llvm-svn: 166294
* Improvements to the data formatters logging - plus, new log messages when ↵Enrico Granata2012-10-173-31/+45
| | | | | | our dynamic type changes llvm-svn: 166133
OpenPOWER on IntegriCloud