summaryrefslogtreecommitdiffstats
path: root/lldb/source/Core
Commit message (Collapse)AuthorAgeFilesLines
...
* Change PowerPC to have the correct byte order.Greg Clayton2013-08-121-15/+15
| | | | llvm-svn: 188189
* Check for division by zero when performing modulusSean Callanan2013-08-081-14/+8
| | | | | | | | operations. <rdar://problem/14656908> llvm-svn: 187996
* The DisassemblerLLVMC has a retain cycle - the InstructionLLVMC's contained ↵Jim Ingham2013-07-312-16/+30
| | | | | | | | | | | | in its instruction list have a shared pointer back to their DisassemblerLLVMC. This checkin force clears the InstructionList in all the places we use the DisassemblerSP to stop the leaking for now. I'll go back and fix this for real when I have time to do so. <rdar://problem/14581918> llvm-svn: 187473
* Add format specifiers to various format ids so we can print thread ids in ↵Michael Sartain2013-07-301-109/+167
| | | | | | | | | | decimal on Linux and FreeBSD. CC: emaste Differential Revision: http://llvm-reviews.chandlerc.com/D1234 llvm-svn: 187425
* <rdar://problem/14521548>Greg Clayton2013-07-241-1/+3
| | | | | | Fixed a crasher where if you accidentally specify a size that is too large when reading memory, LLDB would crash. llvm-svn: 187060
* elf-core: Parse vendor-specific notesEd Maste2013-07-231-8/+31
| | | | | | | | | | | | | | ELF notes contain a 'name' field, which specifies a vendor who defines the format of the note. Examples are 'FreeBSD' or 'GNU', or it may be empty for generic notes. Add a case for FreeBSD-specific notes, leaving Linux and GNU notes, other vendor-specific notes, and generic notes to be handled by the existing code for now. Thanks to Samuel Jacob for reviewing and suggesting improvements. llvm-svn: 186973
* simple plugin now works with Linux fix assert in SetPluginInfo implement ↵Michael Sartain2013-07-172-2/+7
| | | | | | | | Linux ePathTypeLLDBSystemPlugins and ePathTypeLLDBUserPlugins implement Linux Host::Backtrace and Host::GetEnvironment add .gnu_debugdata comment Differential Revision: http://llvm-reviews.chandlerc.com/D1159 llvm-svn: 186475
* <rdar://problem/13793059>Greg Clayton2013-07-151-27/+79
| | | | | | | | | | | Added a setting to control timeout for kdp response packets. While I was at it, I also added a way to control the response timeout for gdb-remote packets. KDP defaults to 5 seconds, and GDB defaults to 1 second. These were the default values that were in the code prior to adding these settings. (lldb) settings set plugin.process.gdb-remote.packet-timeout 10 (lldb) settings set plugin.process.kdp-remote.packet-timeout 10 llvm-svn: 186360
* Fixed GetModuleSpecifications() to work better overall:Greg Clayton2013-07-121-12/+16
| | | | | | | | | | | - MachO files now correctly extract the UUID all the time - More file size and offset verification done for universal mach-o files to watch for truncated files - ObjectContainerBSDArchive now supports enumerating all objects in BSD archives (.a files) - lldb_private::Module() can not be properly constructed using a ModuleSpec for a .o file in a .a file - The BSD archive plug-in shares its cache for GetModuleSpecifications() and the create callback - Improved printing for ModuleSpec objects llvm-svn: 186211
* Huge change to clean up types.Greg Clayton2013-07-1114-824/+540
| | | | | | | | A long time ago we start with clang types that were created by the symbol files and there were many functions in lldb_private::ClangASTContext that helped. Later we create ClangASTType which contains a clang::ASTContext and an opauque QualType, but we didn't switch over to fully using it. There were a lot of places where we would pass around a raw clang_type_t and also pass along a clang::ASTContext separately. This left room for error. This checkin change all type code over to use ClangASTType everywhere and I cleaned up the interfaces quite a bit. Any code that was in ClangASTContext that was type related, was moved over into ClangASTType. All code that used these types was switched over to use all of the new goodness. llvm-svn: 186130
* Fix "source list -n printf" on Linux (printf is symbol alias for __printf)Michael Sartain2013-07-111-1/+61
| | | | | | Differential Revision: http://llvm-reviews.chandlerc.com/D1109 llvm-svn: 186104
* Cleanup on the unified section list changes. Main changes are:Greg Clayton2013-07-102-69/+42
| | | | | | | | | | | | | | | - ObjectFile::GetSymtab() and ObjectFile::ClearSymtab() no longer takes any flags - Module coordinates with the object files and contain a unified section list so that object file and symbol file can share sections when they need to, yet contain their own sections. Other cleanups: - Fixed Symbol::GetByteSize() to not have the symbol table compute the byte sizes on the fly - Modified the ObjectFileMachO class to compute symbol sizes all at once efficiently - Modified the Symtab class to store a file address lookup table for more efficient lookups - Removed Section::Finalize() and SectionList::Finalize() as they did nothing - Improved performance of the detection of symbol files that have debug maps by excluding stripped files and core files, debug files, object files and stubs - Added the ability to tell if an ObjectFile has been stripped with ObjectFile::IsStripped() (used this for the above performance improvement) llvm-svn: 185990
* Added a way to extract the module specifications from a file. A module ↵Greg Clayton2013-07-081-15/+24
| | | | | | | | | | | | | specification is information that is required to describe a module (executable, shared library, object file, ect). This information includes host path, platform path (remote path), symbol file path, UUID, object name (for objects in .a files for example you could have an object name of "foo.o"), and target triple. Module specification can be used to create a module, or used to add a module to a target. A list of module specifications can be used to enumerate objects in container objects (like universal mach files and BSD archive files). There are two new classes: lldb::SBModuleSpec lldb::SBModuleSpecList The SBModuleSpec wraps up a lldb_private::ModuleSpec, and SBModuleSpecList wraps up a lldb_private::ModuleSpecList. llvm-svn: 185877
* Use target DisplaySource if available so we can get mixed source and assembly.Michael Sartain2013-07-081-6/+9
| | | | | | This fixes "disassemble -m -n __printf". llvm-svn: 185845
* Remove lldb's custom copy of the C++ demangler, used only on MacJason Molenda2013-07-034-11069/+0
| | | | | | | | OS X. Testsuite shows no change in results using the system runtime's demangler. <rdar://problem/12029914> llvm-svn: 185510
* Split symbol support for ELF and Linux.Michael Sartain2013-07-014-57/+142
| | | | llvm-svn: 185366
* Formatting cleanup.Jim Ingham2013-07-011-3/+10
| | | | llvm-svn: 185357
* Prevent race in when stopping a "read thread"Tim Northover2013-06-271-2/+0
| | | | | | | | | | | Both StopReadThread and the thread being stopped set the thread id to 0 after m_read_thread_enabled was set to false. If the thread being stopped got there first then StopReadThread called pthread_join on an invalid thread number. This is not a Good Thing, Should fix a fairly regular segfault when quitting on Linux. llvm-svn: 185107
* Use canonical termios.h locationEd Maste2013-06-241-1/+1
| | | | llvm-svn: 184744
* Adding two new markers to the ${var..} specifierEnrico Granata2013-06-212-0/+19
| | | | | | | - %N = show the name of the variable - %> = show the expression path of the variable llvm-svn: 184502
* In thread and frame format strings, it is now allowed to use Python ↵Enrico Granata2013-06-201-0/+72
| | | | | | | | | | | | | | | functions to generate part or all of the output text Specifically, the ${target ${process ${thread and ${frame specifiers have been extended to allow a subkeyword .script:<fctName> (e.g. ${frame.script:FooFunction}) The functions are prototyped as def FooFunction(Object,unused) where object is of the respective SB-type (SBTarget for target.script, ... and so on) This has not been implemented for ${var because it would be akin to a Python summary which is already well-defined in LLDB llvm-svn: 184500
* Implemented a types.py module that allows types to be inspected for padding.Greg Clayton2013-06-192-6/+2
| | | | | | The script was able to point out and save 40 bytes in each lldb_private::Section by being very careful where we need to have virtual destructors and also by re-ordering members. llvm-svn: 184364
* Sort out a number of mismatched integer types in order to cut down the ↵Andy Gibbs2013-06-193-5/+5
| | | | | | number of compiler warnings. llvm-svn: 184333
* <rdar://problem/14194140>Enrico Granata2013-06-191-3/+20
| | | | | | Adding support for correctly extracting children out of vector types for data formatter purposes llvm-svn: 184262
* <rdar://problem/12717717>Enrico Granata2013-06-181-11/+9
| | | | | | | Modifying our data formatters matching algorithm to ensure that "const X*" is treated as equivalent to "X*" Also, a couple improvements to the "lldb types" logging llvm-svn: 184215
* Huge performance improvements when one breakpoint contains many locations.Greg Clayton2013-06-121-7/+42
| | | | | | | | | | 325,000 breakpoints for running "breakpoint set --func-regex ." on lldb itself (after hitting a breakpoint at main so that LLDB.framework is loaded) used to take up to an hour to set, now we are down under a minute. With warm file caches, we are at 40 seconds, and that is with setting 325,000 breakpoint through the GDB remote API. Linux and the native debuggers might be faster. I haven't timed what how much is debug info parsing and how much is the protocol traffic to/from GDB remote. That there were many performance issues. Most of them were due to storing breakpoints in the wrong data structures, or using the wrong iterators to traverse the lists, traversing the lists in inefficient ways, and not optimizing certain function name lookups/symbol merges correctly. Debugging after that is also now very efficient. There were issues with replacing the breakpoint opcodes in memory that was read, and those routines were also fixed. llvm-svn: 183820
* Use llvm::APFloat for formatting if a target is available. Each target when ↵Greg Clayton2013-06-111-48/+141
| | | | | | | | debugging has a "ASTContext" that helps us to use the correct floating point semantics. Now that APFloat supports toString we now use that. If we don't have a target, we still fall back on the old display methodology, but the important formatting should always have a target available and thus use the compiler floating point code. Modified the test programs to use floating point constants that always will display correctly. We had some numbers that were being rounded, and now that we are using clang, we no longer round them and we get more correct results. llvm-svn: 183792
* Remove eFormatHalfFloat as it isn't needed. eFormatFloat should be used and ↵Greg Clayton2013-06-111-20/+12
| | | | | | the byte size will tell us how to display it. llvm-svn: 183755
* <rdar://problem/12783351>Enrico Granata2013-06-111-0/+34
| | | | | | | | | | Add support for half-floats, as specified by IEEE-754-2008 With this checkin, you can now say: (lldb) x/7hf foo to read 7 half-floats at address foo llvm-svn: 183716
* Don't retry the Connect when starting up debugserver if the reason for the ↵Jim Ingham2013-06-071-0/+10
| | | | | | | | | | previous failure was EINTR. That means the user was trying to interrupt us, and we should just stop instead. <rdar://problem/13184758> llvm-svn: 183577
* Make the "SearchFilterByModuleListAndCU" work correctly for searches at the ↵Jim Ingham2013-06-071-1/+14
| | | | | | | | | | | | | CompUnit level. Fixes a bug in "break set --source-pattern-regexp" when a shared library is specified. Also cleaned up the help text for --source-pattern-regexp so it is a little clearer. <rdar://problem/14084261> llvm-svn: 183476
* Address::GetSection() turns a weak pointer to a shared pointer which is a ↵Jim Ingham2013-06-061-4/+4
| | | | | | | | little slow. So in Address::operator== & != do the cheap GetOffset() comparison first and only compare the sections if that is true. llvm-svn: 183452
* Fix various build warnings.Matt Kopec2013-06-032-8/+0
| | | | llvm-svn: 183140
* Use C-style include to match style in file (instead of C++ style)Daniel Malea2013-05-311-1/+1
| | | | | | - as per review comment from Dimitry Andric! llvm-svn: 183039
* FreeBSD cmake build fixes.Daniel Malea2013-05-311-0/+1
| | | | | | | | | - missing #include <cstdlib> in Mangled.cpp - missing include dirs in FreeBSD CMakeLists.txt Patch by Ed Maste! llvm-svn: 183032
* <rdar://problem/14035604>Enrico Granata2013-05-311-6/+12
| | | | | | | | | | | | | Fixing an issue where formats would not propagate from parents to children in all cases Details follow: an SBValue has children and those are fetched along with their values Now, one calls SBValue::SetFormat() on the parent Technically, the format choices should propagate onto the children (see ValueObject::GetFormat()) But if the children values are already fetched, they won't notice the format change and won't update themselves This commit fixes that by making ValueObject::GetValueAsCString() check if any format change intervened from the previous call to the current one A test case is also added llvm-svn: 183030
* Small code cleanupsEnrico Granata2013-05-311-0/+1
| | | | llvm-svn: 183024
* <rdar://problem/11109316>Enrico Granata2013-05-311-1/+1
| | | | | | | | | | | | | | | | | command script import now does reloads - for real If you invoke command script import foo and it detects that foo has already been imported, it will - invoke reload(foo) to reload the module in Python - re-invoke foo.__lldb_init_module This second step is necessary to ensure that LLDB does not keep cached copies of any formatter, command, ... that the module is providing Usual caveats with Python imports persist. Among these: - if you have objects lurking around, reloading the module won't magically update them to reflect changes - if module A imports module B, reloading A won't reload B These are Python-specific issues independent of LLDB that would require more extensive design work The --allow-reload (-r) option is maintained for compatibility with existing scripts, but is clearly documented as redundant - reloading is always enabled whether you use it or not llvm-svn: 182977
* Remove unused variable.Greg Clayton2013-05-291-1/+0
| | | | llvm-svn: 182892
* Fixed signed operations in the IR interpreter.Sean Callanan2013-05-241-0/+22
| | | | | | | | Scalar now can make itself signed if needed. <rdar://problem/13977632> llvm-svn: 182668
* ObjectFileELF::GetModuleSpecifications on Linux should work now.Michael Sartain2013-05-231-22/+52
| | | | | | | Which means "platform process list" should work and list the architecture. We are now parsing the elf build-id if it exists, which should allow us to load stripped symbols (looking at that next). llvm-svn: 182610
* Add ${ansi.XX} parsing to lldb prompt, use-color setting, and -no-use-colors ↵Michael Sartain2013-05-231-216/+60
| | | | | | | | | | command line options. settings set use-color [false|true] settings set prompt "${ansi.bold}${ansi.fg.green}(lldb)${ansi.normal} " also "--no-use-colors" on the command prompt llvm-svn: 182609
* <rdar://problem/13966084>Greg Clayton2013-05-231-1/+1
| | | | | | Make sure to not call "regexec" from <regex.h> with a NULL C string, otherwise we can crash. llvm-svn: 182607
* <rdar://problem/13880690>Greg Clayton2013-05-221-0/+3
| | | | | | Lock the lldb_private::Module mutex while tearing down the module to make sure we don't get clients accessing the contents on a module as it is going away. llvm-svn: 182511
* Adding a newline for better overall readabilityEnrico Granata2013-05-211-1/+1
| | | | llvm-svn: 182434
* <rdar://problem/13878726>Enrico Granata2013-05-212-8/+10
| | | | | | | | | | Yet another implementation of the python in dSYM autoload :) This time we are going with a ternary setting: true - load, do not warn false - do not load, do not warn warn - do not load, warn (default) llvm-svn: 182414
* s/to override/To override/Enrico Granata2013-05-211-1/+1
| | | | | | Thanks to Greg Clayton for catching this llvm-svn: 182339
* Improving the previous checkin about target.load-script-from-symbol-fileEnrico Granata2013-05-213-18/+25
| | | | | | | | | | There are two settings: target.load-script-from-symbol-file is a boolean that says load or no load (default: false) target.warn-on-script-from-symbol-file is also a boolean, it says whether you want to be warned when a script file is not loaded due to security (default: true) the auto loading on change for target.load-script-from-symbol-file is preserved llvm-svn: 182336
* <rdar://problem/13925626>Enrico Granata2013-05-202-1/+15
| | | | | | Correctly handle the case of a ValueObjectVariable backed by a Vector llvm-svn: 182330
* <rdar://problem/13925626>Enrico Granata2013-05-201-1/+1
| | | | | | Replacing an assertion with an error - at least we won’t crash llvm-svn: 182326
OpenPOWER on IntegriCloud