summaryrefslogtreecommitdiffstats
path: root/lldb/source/Core
Commit message (Collapse)AuthorAgeFilesLines
...
* <rdar://problem/13443931>Greg Clayton2013-03-192-42/+62
| | | | | | | | Fixed a crasher in the SourceManager where it wasn't checking the m_target member variable for NULL. In doing this fix, I hardened this class to have weak pointers to the debugger and target in case they do go away. I also changed SBSourceManager to hold onto weak pointers to the debugger and target so they don't keep objects alive by holding a strong reference to them. llvm-svn: 177365
* Performance improvements to the IsObjCNil () - we only try to resolve the ↵Enrico Granata2013-03-151-2/+5
| | | | | | | | value if the variable under consideration truly is an “Objective-C thing” This also changes the ClangASTContext to make sure that id is correctly marked as being such an ObjC thing llvm-svn: 177203
* <rdar://problem/12537646>Greg Clayton2013-03-141-8/+19
| | | | | | lldb remembers not-found source file, setting target.source-map doesn't make it re-check for it. Now this is fixed. Each time the source path remappings get updated, the modification ID in the PathMappingList gets bumped and then we know the re-check for sources. llvm-svn: 177125
* <rdar://problem/13421412>Greg Clayton2013-03-1412-36/+33
| | | | | | Many "byte size" members and variables were using a mixture of uint32_t and size_t. Switching over to using uint64_t everywhere. llvm-svn: 177091
* <rdar://problem/13404189>Greg Clayton2013-03-131-83/+65
| | | | | | | | | | | | | | Made the "--reverse" option to "source list" also be able to use the "--count". This helps us implement support for regexp source list command: (lldb) l -10 Which gets turned into: (lldb) source list --reverse --count 10 Also simplified the code that is used to track showing more source from the last file and line. llvm-svn: 176961
* DoesBranch needs to compute the instruction if it isn't already done.Jim Ingham2013-03-131-1/+1
| | | | | | Handle the "alternate_isa" correctly. llvm-svn: 176922
* Remove an unused #include.Jim Ingham2013-03-131-2/+0
| | | | llvm-svn: 176920
* <rdar://problem/13372857> Greg Clayton2013-03-111-59/+0
| | | | | | Fixed the exception breakpoints to always use a file filter to make setting exception breakpoint efficient. llvm-svn: 176821
* Fix assert in RegisterValue::SetBytes if we're trying toJason Molenda2013-03-091-1/+1
| | | | | | | | write a 32-byte value into a 32-byte ymm vector reg - that is allowed. <rdar://problem/13350587> llvm-svn: 176740
* Add recognition of two more armv7 variants, armv7m and armv7em.Jason Molenda2013-03-081-4/+14
| | | | | | <rdar://problem/13361372> llvm-svn: 176674
* <rdar://problem/13338643>Greg Clayton2013-03-042-211/+17
| | | | | | | | | | | | | | | | DWARF with .o files now uses 40-60% less memory! Big fixes include: - Change line table internal representation to contain "file addresses". Since each line table is owned by a compile unit that is owned by a module, it makes address translation into lldb_private::Address easy to do when needed. - Removed linked address members/methods from lldb_private::Section and lldb_private::Address - lldb_private::LineTable can now relink itself using a FileRangeMap to make it easier to re-link line tables in the future - Added ObjectFile::ClearSymtab() so that we can get rid of the object file symbol tables after we parse them once since they are not needed and kept memory allocated for no reason - Moved the m_sections_ap (std::auto_ptr to section list) and m_symtab_ap (std::auto_ptr to the lldb_private::Symtab) out of each of the ObjectFile subclasses and put it into lldb_private::ObjectFile. - Changed how the debug map is parsed and stored to be able to: - Lazily parse the debug map for each object file - not require the address map for a .o file until debug information is linked for a .o file llvm-svn: 176454
* Convert from the C-based LLVM Disassembler shim to the full MC Disassembler ↵Jim Ingham2013-03-022-12/+40
| | | | | | | | | | | | API's. Calculate "can branch" using the MC API's rather than our hand-rolled regex'es. As extra credit, allow setting the disassembly flavor for x86 based architectures to intel or att. <rdar://problem/11319574> <rdar://problem/9329275> llvm-svn: 176392
* Finish up CMake support for LLDB (tested on Linux)Daniel Malea2013-02-281-0/+9
| | | | | | | | | - add missing scripts (driver, tests, etc...) - enable running of tests from cmake with "make check-lldb" target - fix up problem with clang dependencies (this enables parallel builds) - implement platform-specific FIXMEs in source/CMakeLists.txt llvm-svn: 176306
* Use the Error parameter in ValueObject::ReadPointedString to actually report ↵Enrico Granata2013-02-281-109/+114
| | | | | | common errors llvm-svn: 176302
* Fixed a case where the result of std::string's c_str() method was being ↵Greg Clayton2013-02-271-4/+3
| | | | | | called on a local variable and returned as a const char * incorrectly. We used to cache the thread names for threads in the current host process, but we shoudn't be caching that as the names can change over time, so now a std::string is returned from Host::GetThreadName(). llvm-svn: 176217
* Add GNU indirect function support in expressions for Linux.Matt Kopec2013-02-272-5/+18
| | | | llvm-svn: 176206
* Call Process::Finalize directly in Debugger::Destroy, rather than having it ↵Jim Ingham2013-02-271-4/+1
| | | | | | | | | | | done in the Process destructor. Doing it there can be too late depending on what the internal state and ProcessGDBRemote Async threads are doing. <rdar://problem/13297536> llvm-svn: 176203
* <rdar://problem/13265297> Greg Clayton2013-02-233-4/+4
| | | | | | StackFrame assumes m_sc is additive, but m_sc can lose its target. So now the SymbolContext::Clear() method takes a bool that indicates if the target should be cleared. Modified all existing code to properly set the bool argument. llvm-svn: 175953
* Adding CMake build system to LLDB. Some known issues remain:Daniel Malea2013-02-211-0/+76
| | | | | | | | | | | | | | - generate-vers.pl has to be called by cmake to generate the version number - parallel builds not yet supported; dependency on clang must be explicitly specified Tested on Linux. - Building on Mac will require code-signing logic to be implemented. - Building on Windows will require OS-detection logic and some selective directory inclusion Thanks to Carlo Kok (who originally prepared these CMakefiles for Windows) and Ben Langmuir who ported them to Linux! llvm-svn: 175795
* <rdar://problem/4529976>Enrico Granata2013-02-211-7/+10
| | | | | | | Adding data formatters for iterators for std::map and std::vector (both libc++ and libstdcpp) This does not include reverse iterators since they are both trickier (due to requirements the standard imposes on them) and much less useful llvm-svn: 175787
* ValueObjectSynthetic could be wrapping a ValueObjectDynamic. In that case, ↵Enrico Granata2013-02-191-3/+3
| | | | | | we want to report that the ValueObject is dynamic since synthetic values are supposed to be just their parent with different children llvm-svn: 175563
* <rdar://problem/13121056>Greg Clayton2013-02-161-61/+418
| | | | | | | | | Fixed a crasher when the ConnectionFileDescriptor was used in a process with over FD_SETSIZE (1024) files open. It would corrupt the stack and cause the stack checker to assert and kill the program. The final fix was to "#define _DARWIN_UNLIMITED_SELECT" at the top of the one and only file that uses select () in the LLDB codebase and then make an array of "fd_set" objects so they can handle more than 1024 file descriptors. The new code can handle as many file descriptors as a process can create. llvm-svn: 175378
* Only enable RTTI for cxa_demangle.cppFilipe Cabecinhas2013-02-151-6/+7
| | | | | | | If testing on Linux+clang proves it needs RTTI, wa can remove the conditionals. llvm-svn: 175242
* <rdar://problem/13198767>Greg Clayton2013-02-141-1/+2
| | | | | | When dumping instructions, resolve the address specified as a file address if the target doesn't have anything loaded. llvm-svn: 175131
* Fixed 2 more issues found by the address sanitizer:Greg Clayton2013-02-082-226/+203
| | | | | | | 1 - A store off the end of a buffer in ValueObject.cpp 2 - DataExtractor had cases where bad offsets could cause invalid memory to be accessed. llvm-svn: 174757
* Fixed an bug found by running LLDB with the address sanitizer! We were ↵Greg Clayton2013-02-071-4/+7
| | | | | | accessing one past the end of the buffer. llvm-svn: 174578
* Removed debug print line I left in.Greg Clayton2013-02-061-2/+0
| | | | llvm-svn: 174556
* <rdar://problem/13159777> Greg Clayton2013-02-062-4/+40
| | | | | | | | | | | | | | lldb was mmap'ing archive files once per .o file it loads, now it correctly shares the archive between modules. LLDB was also always mapping entire contents of universal mach-o files, now it maps just the slice that is required. Added a new logging channel for "lldb" called "mmap" to help track future regressions. Modified the ObjectFile and ObjectContainer plugin interfaces to take a data offset along with the file offset and size so we can implement the correct caching and efficient reading of parts of files without mmap'ing the entire file like we used to. The current implementation still keeps entire .a files mmaped (once) and entire slices from universal files mmaped to ensure that if a client builds their binaries during a debug session we don't lose our data and get corrupt object file info and debug info. llvm-svn: 174524
* Moving from std::auto_ptr<char> to std::string for simple string memory ↵Enrico Granata2013-02-011-11/+10
| | | | | | | | management. It is better practice and, also, it is not clear whether std::auto_ptr<> is smart enough to know about delete[] vs. delete llvm-svn: 174236
* <rdar://problem/9141269>Greg Clayton2013-01-301-0/+69
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Cleaned up the objective C name parsing code to use a class. Now breakpoints that are set by name that are objective C methods without the leading '+' or '-' will resolve. We do this by expanding all the objective C names for a given string. For example: (lldb) b [MyString cStringUsingEncoding:] Will set a breakpoint with multiple possible names: -[MyString cStringUsingEncoding:] +[MyString cStringUsingEncoding:] Also if you have a category, it will strip the category and set a breakpoint in all variants: (lldb) [MyString(my_category) cStringUsingEncoding:] Will resolve to the following names: -[MyString(my_category) cStringUsingEncoding:] +[MyString(my_category) cStringUsingEncoding:] -[MyString cStringUsingEncoding:] +[MyString cStringUsingEncoding:] Likewise when we have: (lldb) b -[MyString(my_category) cStringUsingEncoding:] It will resolve to two names: -[MyString(my_category) cStringUsingEncoding:] -[MyString cStringUsingEncoding:] llvm-svn: 173858
* <rdar://problem/12890171>Enrico Granata2013-01-291-7/+12
| | | | | | | | Providing a compact display mode for "po" to use where the convenience variable name and the pointer value are both hidden. This is for convenience when dealing with ObjC instances where the description often gets it right and the debugger-provided information is not useful to most people. If you need either of these, "expr" will still show them. llvm-svn: 173748
* <rdar://problem/12978143>Enrico Granata2013-01-289-3878/+39
| | | | | | | | | | | Data formatters now cache themselves. This commit provides a new formatter cache mechanism. Upon resolving a formatter (summary or synthetic), LLDB remembers the resolution for later faster retrieval. Also moved the data formatters subsystem from the core to its own group and folder for easier management, and done some code reorganization. The ObjC runtime v1 now returns a class name if asked for the dynamic type of an object. This is required for formatters caching to work with the v1 runtime. Lastly, this commit disposes of the old hack where ValueObjects had to remember whether they were queried for formatters with their static or dynamic type. Now the ValueObjectDynamicValue class works well enough that we can use its dynamic value setting for the same purpose. llvm-svn: 173728
* Add "target.process.stop-on-shared-library-events" setting, and make it work.Jim Ingham2013-01-261-4/+4
| | | | | | | | | | | Add the ability to give breakpoints a "kind" string, and have the StopInfoBreakpoint print that in the brief description if set. Also print the kind - if set - in the breakpoint listing. Give kinds to a bunch of the internal breakpoints. We were deleting the Mac OS X dynamic loader breakpoint as though the id we had stored away was a breakpoint site ID, but in fact it was a breakpoint id, so we never actually deleted it. Fixed that. llvm-svn: 173555
* <rdar://problem/13069948>Greg Clayton2013-01-2542-489/+477
| | | | | | | | | | | | Major fixed to allow reading files that are over 4GB. The main problems were that the DataExtractor was using 32 bit offsets as a data cursor, and since we mmap all of our object files we could run into cases where if we had a very large core file that was over 4GB, we were running into the 4GB boundary. So I defined a new "lldb::offset_t" which should be used for all file offsets. After making this change, I enabled warnings for data loss and for enexpected implicit conversions temporarily and found a ton of things that I fixed. Any functions that take an index internally, should use "size_t" for any indexes and also should return "size_t" for any sizes of collections. llvm-svn: 173463
* <rdar://problem/12711206>Enrico Granata2013-01-232-62/+65
| | | | | | | | | | Extending ValueObjectDynamicValue so that it stores a TypeAndOrName instead of a TypeSP. This change allows us to reflect the notion that a ValueObject can have a dynamic type for which we have no debug information. Previously, we would coalesce that to the static type of the object, potentially losing relevant information or even getting it wrong. This fix ensures we can correctly report the class name for Cocoa objects whose types are hidden classes that we know nothing about (e.g. __NSArrayI for immutable arrays). As a side effect, our --show-types argument to frame variable no longer needs to append custom dynamic type information. llvm-svn: 173216
* Adding a custom summary for libc++ std::vector<bool>Enrico Granata2013-01-161-0/+4
| | | | | | | vector<bool> is specialized and the existing general summary for vectors would lie to the user. Tackling libstdc++ and synthetic children is the following, less critical, part of this task llvm-svn: 172671
* Remove std::string input arguments and replace with "const char *".Greg Clayton2013-01-161-1/+1
| | | | llvm-svn: 172647
* <rdar://problem/13010909>Greg Clayton2013-01-151-2/+2
| | | | | | Don't accidentally sign extend unsigned bitfields. llvm-svn: 172506
* <rdar://problem/12790664>Enrico Granata2013-01-142-71/+194
| | | | | | Single-character Unicode data formatters llvm-svn: 172492
* Add ifdef LLDB_DISABLE_PYTHON around newly added use ofJason Molenda2013-01-121-0/+2
| | | | | | | | AddCXXSummary in FormatManager::LoadSystemFormatters(); that function pulls in code that assumes python; can't be used without the ifdef. llvm-svn: 172300
* <rdar://problem/12239827>Enrico Granata2013-01-121-2/+15
| | | | | | Making a summary for std::wstring as provided by libstdc++ along with a relevant test case llvm-svn: 172286
* <rdar://problem/12239827>Enrico Granata2013-01-123-9/+186
| | | | | | | | | Providing a data formatter for libc++ std::wstring In the process, refactoring the std::string data formatter to be written in C++ so that commonalities between the two can be exploited Also, providing a new API on the ValueObject to navigate a hierarchy by index-path Lastly, an appropriate test case is included llvm-svn: 172282
* <rdar://problem/12973809> Greg Clayton2013-01-111-18/+34
| | | | | | | | | | | | | Fixed an issue with the auto loading of script resources in debug info files. Any platform can add support for this, and on MacOSX we allow dSYM files to contain python modules that get automatically loaded when a dSYM file is associated with an executable or shared library. The modifications will now: - Let the module locate the symbol file naturally instead of using a function that only works in certain cases. This helps us to locate the script resources as long as the dSYM file can be found. - Don't try and do any of this if the script interpreter has scripting disabled. - Allow more than one scripting resource to be found in a symbol file by returning the list - Load the scripting resources when a symbol file is added via the "target symbols add" command. - Be smarter about matching the dSYM mach-o file to an existing executable in the target images by stripping extensions on the symfile basname if needed. llvm-svn: 172275
* <rdar://problem/12990038>Greg Clayton2013-01-111-1/+1
| | | | | | Fixed an issue where the platform auto select code was changing the architecture and causing the wrong architecture to be assigned to the target. llvm-svn: 172251
* Modified Value.cpp to share the code that gets the values as bytes ↵Greg Clayton2013-01-111-9/+51
| | | | | | | | | | | | | | | | | | | | | (Value::GetValueAsData()) so now Value::ResolveValue() doesn't do its own thing by reading memory directly. Also modified the Value class so that you can evaluate expressions without a process, yet with some sections loaded in the target. This allows casting pointers that are in data sections to types and being able to evaluate expressions in the data. For example: (lldb) target create a.out (lldb) target modules load --file a.out --slide 0 ... find address of something in data ... (lldb) script expr_opts = lldb.SBExpressionOptions() v = lldb.target.EvaluateExpression('(foo *)0x1230000', expr_opts) print v vv = lldb.value(v) print v.pt.x Above we were able to cast a pointer to an address which was in a.out's data section and print out entire structures and navigate to the child ivars of the expression. llvm-svn: 172227
* Making the Unicode formatters visually nicer by using the same prefix ↵Enrico Granata2013-01-111-11/+11
| | | | | | | | characters as the compiler expects in C++ code Also, marking the Unicode data formatters test cases as dataformatter related for the benefit for the --category flag in dotest.py llvm-svn: 172167
* <rdar://problem/11383764>Enrico Granata2013-01-112-7/+62
| | | | | | Making a data formatter for wchar_t * llvm-svn: 172165
* <rdar://problem/12725746>Enrico Granata2013-01-102-126/+225
| | | | | | | | Providing data formatters for char16_t* and char32_t* C++11-style Unicode strings Using this chance to refactor the UTF data reader used for data formatters for added generality Added a relevant test case llvm-svn: 172119
* Added emulation of shifts to the IR interpreter.Sean Callanan2013-01-091-0/+16
| | | | | | <rdar://problem/12978619> llvm-svn: 172013
* Add a "--reverse" or "-r" option to the "list" with no options command. ↵Jim Ingham2013-01-091-22/+59
| | | | | | | | | | | This will list backwards from the last source point listed. Also fix the setting of the default file & line to the file containing main, when you do a plain "list". <rdar://problem/12685226> llvm-svn: 171945
OpenPOWER on IntegriCloud