summaryrefslogtreecommitdiffstats
path: root/lldb/source/Core
Commit message (Collapse)AuthorAgeFilesLines
...
* Bitfields in uint8_t's will have format eFormatChar and DataExtractor::DumpJason Molenda2011-11-081-0/+3
| | | | | | | doesn't handle bitfields in eFormatChar's correctly, only eFormatUnsigned. Fix DataExtractor::Dump to dump the bitfield eFormatChars correctly. llvm-svn: 144069
* Updated LLVM/Clang to pick up a fix for imports ofSean Callanan2011-11-041-1/+1
| | | | | | | | | | | | | | | C++ vtables, fixing a record layout problem in the expression parser. Also fixed various problems with the generation and unpacking of llvm.zip given our new better handling of multiple architectures in the LLVM build. (And added a log message that will hopefully catch record layout problems in the future.) llvm-svn: 143741
* Fixed the Xcode project building of LLVM to be a bit more user friendly:Greg Clayton2011-11-042-25/+63
| | | | | | | | | | | | | | | | | | | - If you download and build the sources in the Xcode project, x86_64 builds by default using the "llvm.zip" checkpointed LLVM. - If you delete the "lldb/llvm.zip" and the "lldb/llvm" folder, and build the Xcode project will download the right LLVM sources and build them from scratch - If you have a "lldb/llvm" folder already that contains a "lldb/llvm/lib" directory, we will use the sources you have placed in the LLDB directory. Python can now be disabled for platforms that don't support it. Changed the way the libllvmclang.a files get used. They now all get built into arch specific directories and never get merged into universal binaries as this was causing issues where you would have to go and delete the file if you wanted to build an extra architecture slice. llvm-svn: 143678
* We can't have the global vector of modules be a static object, or it might ↵Jim Ingham2011-10-311-2/+11
| | | | | | | | get destroyed before all the modules, which will then crash when the next modules tries to take itself off it. llvm-svn: 143402
* ValueObjectVariable::GetClangAST should check that it has a valid Type ↵Jim Ingham2011-10-311-1/+4
| | | | | | before accessing it. llvm-svn: 143393
* warnings: Fix a non-standard escape sequence.Daniel Dunbar2011-10-311-1/+1
| | | | llvm-svn: 143386
* warnings: Fix use of a non-standard escape.Daniel Dunbar2011-10-311-1/+1
| | | | llvm-svn: 143385
* warnings: Fix a bunch of -Wreorder problems.Daniel Dunbar2011-10-312-6/+6
| | | | llvm-svn: 143381
* warnings: Fix up several const qualified return types.Daniel Dunbar2011-10-311-1/+1
| | | | llvm-svn: 143379
* finish removal of alpha arch -- previous half-removal caused lldb to assert ↵Jason Molenda2011-10-291-1/+0
| | | | | | on startup llvm-svn: 143294
* Remove alpha from list of known architectures -- it was just removedJason Molenda2011-10-291-3/+0
| | | | | | from llvm TOT. llvm-svn: 143273
* Fixed the continuation dumping of instructions to properly advance the Greg Clayton2011-10-281-7/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | previous address only by the number of bytes consumed by the disassembly: (lldb) x/4i 0x0000000100000ea9 0x100000ea9: 66 c7 45 fa 10 00 movw $16, -6(%rbp) 0x100000eaf: c7 45 f4 20 00 00 00 movl $32, -12(%rbp) 0x100000eb6: e8 47 00 00 00 callq 0x0000000100000f02 ; void f<nullptr_t>(nullptr_t) 0x100000ebb: 8b 45 fc movl -4(%rbp), %eax (lldb) 0x100000ebe: 48 83 c4 10 addq $16, %rsp 0x100000ec2: 5d popq %rbp 0x100000ec3: c3 ret 0x100000ec4: 90 nop (lldb) 0x100000ec5: 90 nop 0x100000ec6: 90 nop 0x100000ec7: 90 nop 0x100000ec8: 90 nop (lldb) 0x100000ec9: 90 nop 0x100000eca: 90 nop 0x100000ecb: 90 nop 0x100000ecc: 90 nop (lldb) 0x100000ecd: 90 nop 0x100000ece: 90 nop 0x100000ecf: 90 nop 0x100000ed0: 55 pushq %rbp llvm-svn: 143254
* Added the ability for the target to specify Modules that will not be searchedJim Ingham2011-10-281-0/+23
| | | | | | | when setting breakpoints, but only if no module is specified. The Darwin platform uses this to not set breakpoints in dyld. llvm-svn: 143249
* Added support for the new ".apple_objc" accelerator tables. These tables areGreg Clayton2011-10-274-20/+126
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | in the same hashed format as the ".apple_names", but they map objective C class names to all of the methods and class functions. We need to do this because in the DWARF the methods for Objective C are never contained in the class definition, they are scattered about at the translation unit level and they don't even have attributes that say the are contained within the class itself. Added 3 new formats which can be used to display data: eFormatAddressInfo eFormatHexFloat eFormatInstruction eFormatAddressInfo describes an address such as function+offset and file+line, or symbol + offset, or constant data (c string, 2, 4, 8, or 16 byte constants). The format character for this is "A", the long format is "address". eFormatHexFloat will print out the hex float format that compilers tend to use. The format character for this is "X", the long format is "hex float". eFormatInstruction will print out disassembly with bytes and it will use the current target's architecture. The format character for this is "i" (which used to be being used for the integer format, but the integer format also has "d", so we gave the "i" format to disassembly), the long format is "instruction". Mate the lldb::FormatterChoiceCriterion enumeration private as it should have been from the start. It is very specialized and doesn't belong in the public API. llvm-svn: 143114
* Fixed the display of OSTypes (the four character codes).Greg Clayton2011-10-261-5/+1
| | | | llvm-svn: 143056
* Cleaned up many error codes. For any who is filling in error strings intoGreg Clayton2011-10-266-73/+71
| | | | | | | | | | | | | lldb_private::Error objects the rules are: - short strings that don't start with a capitol letter unless the name is a class or anything else that is always capitolized - no trailing newline character - should be one line if possible Implemented a first pass at adding "--gdb-format" support to anything that accepts format with optional size/count. llvm-svn: 142999
* Move Python.h includes out of the headers into the .cpp file where it's ↵Benjamin Kramer2011-10-231-1/+11
| | | | | | | | actually used. Python.h includes a ton of macros that can cause weird behavior down the road. llvm-svn: 142754
* Moved lldb::user_id_t values to be 64 bit. This was going to be needed forGreg Clayton2011-10-194-6/+6
| | | | | | | | | | | process IDs, and thread IDs, but was mainly needed for for the UserID's for Types so that DWARF with debug map can work flawlessly. With DWARF in .o files the type ID was the DIE offset in the DWARF for the .o file which is not unique across all .o files, so now the SymbolFileDWARFDebugMap class will make the .o file index part (the high 32 bits) of the unique type identifier so it can uniquely identify the types. llvm-svn: 142534
* Added the ability to run expressions in any command. Expressions can be Greg Clayton2011-10-141-1/+209
| | | | | | | | | | | | | | | | | inserted in commands by using backticks: (lldb) memory read `$rsp-16` `$rsp+16` (lldb) memory read -c `(int)strlen(argv[0])` `argv[0]` The result of the expression will be inserted into the command as a sort of preprocess stage where this gets done first. We might need to tweak where this preprocess stage goes, but it is very functional already. Added ansi color support to the Debugger::FormatPrompt() so you can use things like "${ansi.fg.blue}" and "${ansi.bold}" many more. This helps in adding colors to your prompts without needing to know the ANSI color code strings. llvm-svn: 141948
* Removed namespace qualification from symbol queries.Sean Callanan2011-10-133-3/+2
| | | | llvm-svn: 141866
* Completed the glue that passes a ClangNamespaceDecl *Sean Callanan2011-10-131-6/+6
| | | | | | | | down through Module and SymbolVendor into SymbolFile. Added checks to SymbolFileDWARF that restrict symbol searches when a namespace is passed in. llvm-svn: 141847
* Added ClangNamespaceDecl * parameters to severalSean Callanan2011-10-125-12/+20
| | | | | | | core Module functions that the expression parser will soon be using. llvm-svn: 141766
* Fix preprocessor warnings for no newline at the end of the source files.Greg Clayton2011-10-123-3/+3
| | | | llvm-svn: 141755
* Don't look up main to find the default source file till somebody actually ↵Jim Ingham2011-10-071-0/+33
| | | | | | asks for it. llvm-svn: 141422
* Re-organized the contents of RangeMap.h to be more concise and also allow ↵Greg Clayton2011-10-071-7/+2
| | | | | | | | | | for a Range, RangeArray, RangeData (range + data), or a RangeDataArray. We have many range implementations in LLDB and I will be converting over to using the classes in RangeMap.h so we can have one set of code that does ranges and searching of ranges. Fixed up DWARFDebugAranges to use the new range classes. Fixed the enumeration parsing to take a lldb_private::Error to avoid a lot of duplicated code. Now when an invalid enumeration is supplied, an error will be returned and that error will contain a list of the valid enumeration values. llvm-svn: 141382
* Stop empty C strings in summaries from showing "<data not available>" when aGreg Clayton2011-10-051-26/+25
| | | | | | | | "const char *" is NULL. Also cleaned up the display of strings when you have an array of chars that are all NULL. Previously we were showing: ""... We now show: "" llvm-svn: 141223
* Fixed an issue where a variable whose value is in a register might end upGreg Clayton2011-10-011-4/+1
| | | | | | not saying that its children are load addresses. llvm-svn: 140921
* Cleaned up the the code that figures out the inlined stack frames given a Greg Clayton2011-10-013-14/+19
| | | | | | | | | | | | | | | | | | | | | | | | symbol context that represents an inlined function. This function has been renamed internally to: bool SymbolContext::GetParentOfInlinedScope (const Address &curr_frame_pc, SymbolContext &next_frame_sc, Address &next_frame_pc) const; And externally to: SBSymbolContext SBSymbolContext::GetParentOfInlinedScope (const SBAddress &curr_frame_pc, SBAddress &parent_frame_addr) const; The correct blocks are now correctly calculated. Switched the stack backtracing engine (in StackFrameList) and the address context printing over to using the internal SymbolContext::GetParentOfInlinedScope(...) so all inlined callstacks will match exactly. llvm-svn: 140910
* Added more functionality to the public API to allow for betterGreg Clayton2011-09-261-0/+17
| | | | | | | | | | | | | | | | | | symbolication. Also improved the SBInstruction API to allow access to the instruction opcode name, mnemonics, comment and instruction data. Added the ability to edit SBLineEntry objects (change the file, line and column), and also allow SBSymbolContext objects to be modified (set module, comp unit, function, block, line entry or symbol). The SymbolContext and SBSymbolContext can now generate inlined call stack infomration for symbolication much easier using the SymbolContext::GetParentInlinedFrameInfo(...) and SBSymbolContext::GetParentInlinedFrameInfo(...) methods. llvm-svn: 140518
* Added to the public API to allow symbolication:Greg Clayton2011-09-241-3/+3
| | | | | | | | | | | | | | | | | - New SBSection objects that are object file sections which can be accessed through the SBModule classes. You can get the number of sections, get a section at index, and find a section by name. - SBSections can contain subsections (first find "__TEXT" on darwin, then us the resulting SBSection to find "__text" sub section). - Set load addresses for a SBSection in the SBTarget interface - Set the load addresses of all SBSection in a SBModule in the SBTarget interface - Add a new module the an existing target in the SBTarget interface - Get a SBSection from a SBAddress object This should get us a lot closer to being able to symbolicate using LLDB through the public API. llvm-svn: 140437
* Added the ability to restrict breakpoints by function name, function regexp, ↵Jim Ingham2011-09-233-8/+222
| | | | | | | | | | selector etc to specific source files. Added SB API's to specify these source files & also more than one module. Added an "exact" option to CompileUnit's FindLineEntry API. llvm-svn: 140362
* Converted the lldb_private::Process over to use the intrusiveGreg Clayton2011-09-2210-200/+224
| | | | | | | | | | | | | | | | | | | | shared pointers. Changed the ExecutionContext over to use shared pointers for the target, process, thread and frame since these objects can easily go away at any time and any object that was holding onto an ExecutionContext was running the risk of using a bad object. Now that the shared pointers for target, process, thread and frame are just a single pointer (they all use the instrusive shared pointers) the execution context is much safer and still the same size. Made the shared pointers in the the ExecutionContext class protected and made accessors for all of the various ways to get at the pointers, references, and shared pointers. llvm-svn: 140298
* Fix printf call in SearchFilterByModuleList::GetDescription.Jason Molenda2011-09-221-1/+1
| | | | llvm-svn: 140289
* The first part of a fix for being able to select an architecture slice fromGreg Clayton2011-09-212-8/+45
| | | | | | | | | | a file when the target has a triple with an unknown vendor and/or OS and the slice of the file itself has a valid vendor and/or OS. The Module now adopts the ObjectFile's architecture after a valid architecture has been loaded to make sure the module matches the object file. llvm-svn: 140236
* Add a new breakpoint type "break by source regular expression".Jim Ingham2011-09-213-1/+275
| | | | | | | | | Fix the RegularExpression class so it has a real copy constructor. Fix the breakpoint setting with multiple shared libraries so it makes one breakpoint not one per shared library. Add SBFileSpecList, to be used to expose the above to the SB interface (not done yet.) llvm-svn: 140225
* Update declarations for all functions/methods that accept printf-styleJason Molenda2011-09-207-29/+27
| | | | | | | | stdarg formats to use __attribute__ format so the compiler can flag incorrect uses. Fix all incorrect uses. Most of these are innocuous, a few were resulting in crashes. llvm-svn: 140185
* Change Error::SetErrorStringWithFormat() prototype to use anJason Molenda2011-09-203-8/+8
| | | | | | | | | __attribute__ format so the compiler knows that this method takes printf style formatter arguments and checks that it's being used correctly. Fix a couple dozen incorrect SetErrorStringWithFormat() calls throughout the sources. llvm-svn: 140115
* Don't put modules for .o files into the global shared module list. WeGreg Clayton2011-09-182-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | used to do this because we needed to find the shared pointer for a .o file when the .o file's module was needed in a SymbolContext since the module in a symbol context was a shared pointer. Now that we are using intrusive pointers we don't have this limitation anymore since any instrusive shared pointer can be made from a pointer to an object all on its own. Also switched over to having the Module and SymbolVendor use shared pointers to their object files as had a leak on MacOSX when the SymbolVendor's object file wasn't the same as the Module's (debug info in a stand along file (dSYM file)). Now everything will correctly clean itself up when the module goes away after an executable gets rebuilt. Now we correctly get rid of .o files that are used with the DWARF with debug map executables on subsequent runs since the only shared pointer to the object files in from the DWARF symbol file debug map parser, and when the module gets replaced, it destroys to old one along with all .o files. Also added a small optimization when using BSD archives where we will remove old BSD containers from the shared list when they are outdated. llvm-svn: 140002
* Adopt the intrusive pointers in:Greg Clayton2011-09-172-34/+23
| | | | | | | | | | | | lldb_private::Breakpoint lldb_private::BreakpointLocations lldb_private::BreakpointSite lldb_private::Debugger lldb_private::StackFrame lldb_private::Thread lldb_private::Target llvm-svn: 139985
* Removed the function:Greg Clayton2011-09-173-19/+12
| | | | | | | | | | | ModuleSP Module::GetSP(); Since we are now using intrusive ref counts, we can easily turn any pointer to a module into a shared pointer just by assigning it. llvm-svn: 139984
* Convert lldb::ModuleSP to use an instrusive ref counted pointer.Greg Clayton2011-09-171-1/+2
| | | | | | | | | We had some cases where getting the shared pointer for a module from the global module list was causing a performance issue when debugging with DWARF in .o files. Now that the module uses intrusive ref counts, we can easily convert any pointer to a shared pointer. llvm-svn: 139983
* Track whether a process was Launched or Attached to. If Attached, the ↵Jim Ingham2011-09-151-3/+15
| | | | | | detach when the debugger is destroyed, rather than killing the process. Also added a Debugger::Clear, which gets called in Debugger::Destroy to deal with all the targets in the Debugger. Also made the Driver's main loop call Destroy on the debugger, rather than just Destroying the currently selected Target's process. llvm-svn: 139853
* Fix ArchSpec::operator== to take the Triple into account as well as the ↵Jim Ingham2011-09-151-41/+63
| | | | | | Core. Also make the constructors explicit. llvm-svn: 139762
* SBSourceManager now gets the real source manager either from the Debugger or ↵Jim Ingham2011-09-132-15/+125
| | | | | | | | Target. Also, move the SourceManager file cache into the debugger so it can be shared amongst the targets. llvm-svn: 139564
* Fixed up the comments in the headerdoc to match the current implementationGreg Clayton2011-09-121-86/+1
| | | | | | | of how ConstString objects work, and removed the duplicate and out of date comments that were in the cpp file. llvm-svn: 139487
* Fixes for Symtab.cpp to take advantage of the new unique C string mapGreg Clayton2011-09-111-44/+0
| | | | | | changes that were just submitted. llvm-svn: 139478
* Renaming a bulk of method calls from Get() to something more descriptiveEnrico Granata2011-09-092-6/+6
| | | | llvm-svn: 139435
* Move the SourceManager from the Debugger to the Target. That way it can ↵Jim Ingham2011-09-083-12/+39
| | | | | | | | | | store the per-Target default Source File & Line. Set the default Source File & line to main (if it can be found.) at startup. Selecting the current thread & or frame resets the current source file & line, and "source list" as well as the breakpoint command "break set -l <NUM>" will use the current source file. llvm-svn: 139323
* Refactoring of Get() methods in FormatManager/FormatCategory to have ↵Enrico Granata2011-09-063-55/+46
| | | | | | | | | explicative names and return shared-pointers instead of bools Reduced the amount of memory required to avoid loops in DumpPrintableRepresentation() from 32 bits down to 1 bit - Additionally, disallowed creating summary strings of the form ${var%S} which did nothing but cause endless loops by definition llvm-svn: 139201
* Redesign of the interaction between Python and frozen objects:Enrico Granata2011-09-0610-313/+804
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - introduced two new classes ValueObjectConstResultChild and ValueObjectConstResultImpl: the first one is a ValueObjectChild obtained from a ValueObjectConstResult, the second is a common implementation backend for VOCR and VOCRCh of method calls meant to read through pointers stored in frozen objects ; now such reads transparently move from host to target as required - as a consequence of the above, removed code that made target-memory copies of expression results in several places throughout LLDB, and also removed code that enabled to recognize an expression result VO as such - introduced a new GetPointeeData() method in ValueObject that lets you read a given amount of objects of type T from a VO representing a T* or T[], and doing dereferences transparently in private layer it returns a DataExtractor ; in public layer it returns an instance of a newly created lldb::SBData - as GetPointeeData() does the right thing for both frozen and non-frozen ValueObject's, reimplemented ReadPointedString() to use it en lieu of doing the raw read itself - introduced a new GetData() method in ValueObject that lets you get a copy of the data that backs the ValueObject (for pointers, this returns the address without any previous dereferencing steps ; for arrays it actually reads the whole chunk of memory) in public layer this returns an SBData, just like GetPointeeData() - introduced a new CreateValueFromData() method in SBValue that lets you create a new SBValue from a chunk of data wrapped in an SBData the limitation to remember for this kind of SBValue is that they have no address: extracting the address-of for these objects (with any of GetAddress(), GetLoadAddress() and AddressOf()) will return invalid values - added several tests to check that "p"-ing objects (STL classes, char* and char[]) will do the right thing Solved a bug where global pointers to global variables were not dereferenced correctly for display New target setting "max-string-summary-length" gives the maximum number of characters to show in a string when summarizing it, instead of the hardcoded 128 Solved a bug where the summary for char[] and char* would not be shown if the ValueObject's were dumped via the "p" command Removed m_pointers_point_to_load_addrs from ValueObject. Introduced a new m_address_type_of_children, which each ValueObject can set to tell the address type of any pointers and/or references it creates. In the current codebase, this is load address most of the time (the only notable exception being file addresses that generate file address children UNLESS we have a live process) Updated help text for summary-string Fixed an issue in STL formatters where std::stlcontainer::iterator would match the container's synthetic children providers Edited the syntax and help for some commands to have proper argument types llvm-svn: 139160
OpenPOWER on IntegriCloud