summaryrefslogtreecommitdiffstats
path: root/lldb/source
Commit message (Collapse)AuthorAgeFilesLines
* Made the IR interpreter more robust in the presenceSean Callanan2011-10-213-24/+151
| | | | | | | | | of arbitrary pointers, allowing direct dereferences of literal addresses. Also disabled special-cased generation of certain expression results (especially casts), substituting the IR interpreter. llvm-svn: 142638
* Lock the Unwinder before accessing it.Jim Ingham2011-10-214-18/+16
| | | | llvm-svn: 142632
* Fixed some issues where we might not have one of the new apple acceleratorGreg Clayton2011-10-204-676/+159
| | | | | | | | | | | tables (like the .apple_namespaces) and it would cause us to index DWARF that didn't need to be indexed. Updated the MappedHash.h (generic Apple accelerator table) and the DWARF specific one (HashedNameToDIE.h) to be up to date with the latest and greatest hash table format. llvm-svn: 142627
* Modified the ASTDumper to return a "const char *" instead of a copy of theGreg Clayton2011-10-202-28/+36
| | | | | | | | | | std::string and modified all places that used the std::string it returned to use the "const char *". Also modified the expression parser to not crash when a function type fails to copy into the expression AST context. llvm-svn: 142561
* Moved lldb::user_id_t values to be 64 bit. This was going to be needed forGreg Clayton2011-10-1938-222/+320
| | | | | | | | | | | 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
* Changed lldb_private::Type over to use the intrusive ref counted pointersGreg Clayton2011-10-185-58/+42
| | | | | | | | | | | so we don't have to lookup types in a type list by ID. Changed the DWARF parser to remove the "can externally complete myself" bits from the type when we are in the process of completing the type itself to avoid an onslaught of external visible decl requests from the clang::ExternalASTSource. llvm-svn: 142461
* Fix build under gcc.Johnny Chen2011-10-181-2/+2
| | | | | | Patch from Dawn. llvm-svn: 142402
* Remove stale comment.Johnny Chen2011-10-181-1/+0
| | | | llvm-svn: 142392
* Modify the help text for watching a variable or its pointee.Johnny Chen2011-10-181-2/+2
| | | | llvm-svn: 142391
* This patch fixes debugging of single threaded apps on Linux. Johnny Chen2011-10-1813-31/+600
| | | | | | | | It also adds some asserts and additional logging support. from dawn@burble.org llvm-svn: 142384
* Removed some debug support I accidentallySean Callanan2011-10-181-3/+0
| | | | | | committed. llvm-svn: 142376
* Improved logging, replacing the old ASTDumper (whichSean Callanan2011-10-182-545/+87
| | | | | | | | | | we never used) with a much simpler class that wraps the relevant dump functions in Clang. This class also knows to disable external lookups on DeclContexts being dumped so it should be safe to print incomplete Decls. llvm-svn: 142359
* Add code to RegisterContextLLDB::InitializeNonZerothFrame to detect a ↵Jason Molenda2011-10-182-0/+42
| | | | | | | | | multiple stack frames with the same CFA (or an alternating sequence between two CFA values) to catch a handful of unwind cases where lldb will inf loop trying to unwind a stack. llvm-svn: 142331
* this patch introduces a new command script import command which takes as ↵Enrico Granata2011-10-175-21/+232
| | | | | | input a filename for a Python script and imports the module contained in that file. the containing directory is added to the Python path such that dependencies are honored. also, the module may contain an __lldb_init_module(debugger,dict) function, which gets called after importing, and which can somehow initialize the module's interaction with lldb llvm-svn: 142283
* Add a commnad to set a condition for a watchpoint. Example:Johnny Chen2011-10-175-12/+395
| | | | | | | | | | | | | | | watchpoint modify -c 'global==5' modifies the last created watchpoint so that the condition expression is evaluated at the stop point to decide whether we should proceed with the stopping. Also add SBWatchpont::SetCondition(const char *condition) to set condition programmatically. Test cases to come later. llvm-svn: 142227
* Handled the call operator properly.Sean Callanan2011-10-151-3/+8
| | | | llvm-svn: 142033
* Make "next" and "step-out" work when in stepping over or out of inlined ↵Jim Ingham2011-10-151-31/+199
| | | | | | functions. llvm-svn: 142031
* Make the step range plans capable of supporting multiple ranges. Also make ↵Jim Ingham2011-10-153-8/+47
| | | | | | their constructors public, there isn't any good reason why you shouldn't be able to make these plans. llvm-svn: 142026
* Make the "log enable lldb-step" output easier to parse.Jim Ingham2011-10-152-33/+60
| | | | llvm-svn: 142025
* Quiet the default "log enable lldb step" output down a little bit.Jim Ingham2011-10-152-4/+4
| | | | llvm-svn: 142024
* Add function decls to their parent decl context.Greg Clayton2011-10-142-37/+41
| | | | llvm-svn: 142011
* Make sure we create only unique one namespace per AST when parsing the DWARF.Greg Clayton2011-10-143-29/+57
| | | | llvm-svn: 142005
* Improved expression logging. Now all calls toSean Callanan2011-10-144-56/+85
| | | | | | | | | | | | | FindExternalVisibleDecls and FindExternalLexicalDecls are marked and given unique IDs, so that all logging done as part of their execution can be traced back to the proper call. Also there was some logging that really wasn't helpful in most cases so I disabled it unless verbose logging (log enable -v lldb expr) is enabled. llvm-svn: 141987
* Add SBWatchpoint::GetError() API, which is not currently populated as yet.Johnny Chen2011-10-142-10/+6
| | | | llvm-svn: 141979
* Added the ability to run expressions in any command. Expressions can be Greg Clayton2011-10-142-1/+330
| | | | | | | | | | | | | | | | | 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
* Add a test case to exercise the newly added SB API:Johnny Chen2011-10-141-1/+1
| | | | | | | lldb::SBWatchpoint SBTarget::WatchAddress (lldb::addr_t addr, size_t size, bool read, bool write) llvm-svn: 141931
* Improved logging for FindExternalLexicalDecls toSean Callanan2011-10-141-4/+14
| | | | | | | | make it easier to track down which members belong to which structs (and which call to FindExternalLexicalDecls is doing the reporting). llvm-svn: 141930
* SBValue::Watch() and SBValue::WatchPointee() are now the official API for ↵Johnny Chen2011-10-1419-547/+499
| | | | | | | | | | | | | | | | | | creating a watchpoint for either the variable encapsulated by SBValue (Watch) or the pointee encapsulated by SBValue (WatchPointee). Removed SBFrame::WatchValue() and SBFrame::WatchLocation() API as a result of that. Modified the watchpoint related test suite to reflect the change. Plus replacing WatchpointLocation with Watchpoint throughout the code base. There are still cleanups to be dome. This patch passes the whole test suite. Check it in so that we aggressively catch regressions. llvm-svn: 141925
* Modified the DWARF parser to take care of a 1 clang::DeclContext to manyGreg Clayton2011-10-132-47/+60
| | | | | | DIEs. Prior to this fix, there was a 1 to 1 mapping. llvm-svn: 141917
* Fixed a case where we might end up trying to parse a type in the DWARF ↵Greg Clayton2011-10-133-27/+72
| | | | | | parser for a method whose class isn't currently in the process of completing itself. Currently, methods of a class, must be parsed when the class type that contains the method is asked to complete itself through the clang::ExternalASTSource virtual functions. Now we "do the right thing" by checking if the class is being defined, and if so we parse it, else we tell the class to complete itself so everything happens correctly. llvm-svn: 141908
* Cleaned up a few functions that never get used.Sean Callanan2011-10-132-94/+0
| | | | | | | | | | | | | | Specifically, the expression parser used to use functions attached to SymbolContext to do lookups, but nowadays it searches a ModuleList or Module directly instead. These functions had no remaining clients so I removed them to prevent bit rot. I also removed a stray callback function from ClangExpressionDeclMap. llvm-svn: 141899
* Enabled the namespace-specific search functionality,Sean Callanan2011-10-132-5/+20
| | | | | | | | | | | | | which had previously been commented out while I tested it. It's not fully working yet, but it doesn't break our testsuite and it's an important piece of functionality. Also added some logging to SymbolFileDWARF to help diagnose entities that are found in a symbol file, but do not reside in the expected namespace. llvm-svn: 141894
* Moved the list of found namespaces into the searchSean Callanan2011-10-132-39/+71
| | | | | | | | | | | | | | | | | | | | | | context object. Having it populated and registered within a single FindExternalVisibleDecls call worked fine when there was only one call (i.e., when we were just looking in the global namespace). However, now FindExternalVisibleDecls is called for nested namespaces as well, which means that it is called not once but many times (once per module in which the parent namespace appears). This means that the namespace mapping is built up across many calls to the inferior FindExternalVisibleDecls, so I moved it into a data structure (the search context) that is shared by all calls. I also added some logging to make it easier to see what is happening during a namespace search, and cleaned up some existing logging. llvm-svn: 141888
* Revert the change to "target variable" that was causing test suite failures.Greg Clayton2011-10-131-1/+1
| | | | llvm-svn: 141879
* Cleaned up the SBWatchpoint public API.Greg Clayton2011-10-133-69/+110
| | | | llvm-svn: 141876
* Removed namespace qualification from symbol queries.Sean Callanan2011-10-136-19/+10
| | | | llvm-svn: 141866
* Completed the glue that passes a ClangNamespaceDecl *Sean Callanan2011-10-1310-48/+99
| | | | | | | | down through Module and SymbolVendor into SymbolFile. Added checks to SymbolFileDWARF that restrict symbol searches when a namespace is passed in. llvm-svn: 141847
* Always use the full variable name when dumping globals since they mightGreg Clayton2011-10-131-1/+1
| | | | | | be in namespaces. llvm-svn: 141845
* Add a version of ResolveFunction that takes a "const DWARFDebugInfoEntry *"Greg Clayton2011-10-132-70/+85
| | | | | | | and a "DWARFCompileUnit *" to avoid doing a DIE lookup twice and to prepare for using namespaces in the lookups. llvm-svn: 141843
* Now that we know the values are going to stick around,Sean Callanan2011-10-131-48/+9
| | | | | | | | | | | we don't need to look them up again when materializing. Switched over the materialization mechanism (for JIT expressions) and the lookup mechanism (for interpreted expressions) to use the VariableSP/Symbol that were found during parsing. llvm-svn: 141839
* Added a function to test if a ClangNamespaceDecl matches the current symbolGreg Clayton2011-10-132-1/+29
| | | | | | | file. This will help us to minimize lookups that can't possibly match anything in the current symbol file. llvm-svn: 141838
* Added the ability to see if a DIE is contained in a namespace.Greg Clayton2011-10-122-0/+40
| | | | llvm-svn: 141832
* Extended the lifetime of Clang parser objects to theSean Callanan2011-10-122-4/+11
| | | | | | | | | | | | | lifetime of ClangExpressionDeclMap. This allows ClangExpressionVariables found during parsing to be queried for their containing namespaces during expression execution. Other clients (like ClangFunction) explicitly delete this state, so they should not result in any memory leaks. llvm-svn: 141821
* Refactoring in preparation for having multipleSean Callanan2011-10-121-14/+12
| | | | | | | | | | | | | | calls to the FindExternalVisibleDecls function. FindExternalVisibleDecls was recording whether it had found generic function symbols in variables that were local to the function. Now, however, multiple calls occur in response to one request from Clang, since we may be searching across namespaces. To support that, I moved the local variables into a bitfield in NameSearchContext. llvm-svn: 141808
* Made the expression parser's type search call theSean Callanan2011-10-121-26/+24
| | | | | | proper namespace-aware APIs. llvm-svn: 141797
* Added support to ClagnExpressionDeclMap for findingSean Callanan2011-10-121-6/+27
| | | | | | data symbols in namespaces. llvm-svn: 141792
* Changed FindExternalVisibleDecls() to use the moduleSean Callanan2011-10-121-6/+19
| | | | | | | level FindFunctions() where appropriate and not use SymbolContext::FindFunctionsByName(). llvm-svn: 141789
* Made FindGlobalVariable() optionally search a specificSean Callanan2011-10-121-11/+15
| | | | | | | | module and namespace. Also made it use FindGlobalVariables() instead of the more heavyweight GetVariablesForVariableExpressionPath(). llvm-svn: 141783
* Added ClangNamespaceDecl * parameters to severalSean Callanan2011-10-1213-29/+49
| | | | | | | core Module functions that the expression parser will soon be using. llvm-svn: 141766
* Cleanups in preparation for making FindExternalVisibleDeclsSean Callanan2011-10-121-228/+169
| | | | | | | | look in individual modules rather than globally. Also some whitespace fixes. llvm-svn: 141765
OpenPOWER on IntegriCloud